Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codereview quick fixes #412

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions ui/src/components/General/CodeEditor/CodeEditor.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,24 @@
z-index: var(--bt-z-index-dropdown);

&__success {
display: flex;
align-items: center;
justify-content: center;
display: grid;
place-content: center;
padding: var(--bt-size-2) var(--bt-size-6);
border: var(--bt-size-1) solid green;
border-radius: var(--bt-size-5);
}

&__failed {
display: flex;
align-items: center;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placements are not in the center

Now:

Screen Shot 2024-01-09 at 8 06 35 pm

Before:
Screen Shot 2024-01-09 at 8 06 50 pm

justify-content: center;
display: grid;
place-content: center;
padding: var(--bt-size-2) var(--bt-size-6);
border: var(--bt-size-1) solid red;
border-radius: var(--bt-size-5);
}

button {
display: flex;
align-items: center;
justify-content: center;
display: grid;
place-content: center;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
$cp-top: 27px;
$cp-left: -12px;
$cp-bg-color: rgb(68, 68, 68);
$cp-z-index: 9999;

.cpwi {
&__color {
position: relative;
display: inline-block;
/* inline-block immediately overridden, assuming error and not for browser support */
display: flex;
align-items: center;
cursor: pointer;

&_dp {
background-color: $cp-bg-color;
background-color: rgb(68 68 68);
padding: var(--bt-size-10);
border-radius: var(--bt-size-10);
top: $cp-top;
left: $cp-left;
z-index: $cp-z-index;
top: 27px;
left: -12px;
z-index: 9999; /* Hacky? */
display: none;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use a variable from here src/styles/z-index.css

position: absolute;
}
Expand Down
28 changes: 10 additions & 18 deletions ui/src/components/General/Notification/Notification.module.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
$notification-size-200: 200px;
$notification-size-300: 300px;
$notification-status-color: #c83939;
$notification-size-minus-25: -25px;

.notification {
height: $notification-size-300;
width: $notification-size-200;
overflow-y: auto;
overflow-x: hidden;
height: 300px;
width: 200px;
overflow: hidden auto;
border-radius: var(--bt-size-8);

&__error {
Expand All @@ -16,25 +10,23 @@ $notification-size-minus-25: -25px;
}

&__button {
position: relative;
border: none;
box-shadow: none;
background-color: transparent;
cursor: pointer;
position: relative;
align-items: center;
display: flex;
align-items: center;

&__status {
position: absolute;
width: var(--bt-size-7);
height: var(--bt-size-7);
background-color: $notification-status-color;
position: absolute;
border-radius: var(--bt-size-percent-100);
top: var(--bt-size-5);
right: var(--bt-size-17);
border-color: white;
border-width: var(--bt-size-1);
border-style: solid;
background-color: #c83939;
border: var(--bt-size-1) solid white;
border-radius: var(--bt-size-percent-100);
}
}

Expand All @@ -45,8 +37,8 @@ $notification-size-minus-25: -25px;
}

&_features {
margin-left: -25px;
padding-top: var(--bt-size-8);
margin-left: $notification-size-minus-25;
padding-bottom: var(--bt-size-8);
list-style-type: square;

Expand Down
14 changes: 6 additions & 8 deletions ui/src/components/General/PopupSearch/PopSearch.module.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
$popsearch-height: 200px;
$popsearch-bg-dark: #646363;
$popsearch-bg-color: #e0e0e0;

.popsearch {
&__container {
max-height: $popsearch-height;
max-height: 200px;
overflow-y: auto;
margin-top: var(--bt-size-10);

Expand All @@ -13,17 +11,17 @@ $popsearch-bg-color: #e0e0e0;
align-items: center;
gap: var(--bt-size-10);
width: calc(100% - var(--bt-size-10));
padding: var(--bt-size-10) var(--bt-size-5);
margin: 0 var(--bt-size-5);
margin-top: var(--bt-size-5);
border-radius: var(--bt-size-8);
background-color: #ffff;
line-height: 22px;
margin: 0 var(--bt-size-5);
margin-top: var(--bt-size-5);
padding: var(--bt-size-10) var(--bt-size-5);
border: none;
cursor: pointer;
line-height: 22px;

&_light:hover {
background-color: $popsearch-bg-color;
background-color: #e0e0e0;
border-radius: var(--bt-size-5);
}

Expand Down
6 changes: 2 additions & 4 deletions ui/src/components/General/Warning/Warning.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.warning {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
display: grid;
place-content: center;
height: var(--bt-size-percent-100);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.button {
display: flex;
align-items: center;
justify-content: center;
display: grid;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now:
Screen Shot 2024-01-09 at 8 11 12 pm

Before:
Screen Shot 2024-01-09 at 8 11 38 pm

place-content: center;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
&__avatar {
display: flex;
align-items: center;
font-size: var(--font-size-fluid-1);
height: var(--bt-size-50);
width: var(--bt-size-50);
font-size: var(--font-size-fluid-1);
}

&__container {
Expand Down
5 changes: 2 additions & 3 deletions ui/src/components/Layouts/CopyInput/CopyInput.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.copyinput {
display: flex;
align-items: center;
justify-content: center;
display: grid;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now:
Screen Shot 2024-01-09 at 8 13 25 pm
Before:
Screen Shot 2024-01-09 at 8 13 44 pm

place-content: center;
overflow: hidden;
gap: var(--bt-size-5);

Expand Down
13 changes: 7 additions & 6 deletions ui/src/components/Layouts/FloatingBar/FloatingBar.module.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
.fb {
/* flex direction is already row
Move z-index near position,
flex properties together */
height: var(--bt-size-64);
position: absolute;
right: var(--bt-size-18);
z-index: var(--bt-z-index-dropdown);
display: flex;
height: var(--bt-size-64);
align-items: center;
justify-content: flex-end;
flex-direction: row;
position: absolute;
right: var(--bt-size-18);

&__container {
right: var(--bt-size-10);
position: sticky;
right: var(--bt-size-10);
display: flex;
align-items: center;
justify-content: flex-end;
flex-direction: row;
gap: var(--bt-size-10);
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.fh {
position: sticky;
padding: var(--bt-size-4);
border-radius: var(--bt-size-10);
display: flex;
align-items: center;
border-radius: var(--bt-size-10);
padding: var(--bt-size-4);
position: sticky;
flex-direction: row;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.fsb {
&__input {
display: flex;
align-items: center;
position: sticky;
border-radius: var(--bt-size-10);
padding: var(--bt-size-4);
border-radius: var(--bt-size-10);
display: flex;
align-items: center;
}
}

Expand Down
16 changes: 6 additions & 10 deletions ui/src/components/Layouts/Footer/Footer.module.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
$footer-vw-6: 6vw;
$footer-vw-5: 5vw;
$footer-color: #e8e8e8;

.footer {
position: sticky;
width: var(--bt-size-percent-100);
padding: var(--bt-size-30) var(--bt-size-percent-10) var(--bt-size-30)
var(--bt-size-percent-10);
box-shadow: var(--bt-footer-box-shadow);
display: grid;
grid-template-columns:
var(--bt-grid-template-1) var(--bt-grid-template-1) var(
--bt-grid-template-1
)
var(--bt-grid-template-1) var(--bt-grid-template-1);
box-shadow: var(--bt-footer-box-shadow);
position: sticky;
width: var(--bt-size-percent-100);

&__left {
padding-right: $footer-vw-5;
border-right: var(--bt-size-1) solid $footer-color;
margin-right: $footer-vw-6;
padding-right: 5vw;
margin-right: 6vw;
border-right: var(--bt-size-1) solid #e8e8e8;
}

&__right {
Expand Down
5 changes: 2 additions & 3 deletions ui/src/components/Layouts/Header/header.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.header {
display: flex;
align-items: center;
justify-content: center;
display: grid;
place-content: center;
height: var(--bt-size-64);

&_dark {
Expand Down
12 changes: 5 additions & 7 deletions ui/src/components/Layouts/Legal/Legal.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
}

h1 {
background-color: #c0c0c0;
border-radius: var(--bt-size-10);
display: flex;
align-items: center;
justify-content: center;
padding: var(--bt-size-percent-10);
/* can we do better */
margin-bottom: var(--bt-size-64) !important;
padding: var(--bt-size-percent-10);
border-radius: var(--bt-size-10);
background-color: #c0c0c0;
display: grid;
place-content: center;
}
}
10 changes: 3 additions & 7 deletions ui/src/components/Layouts/Menu/Menu.module.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
$menu-height: calc(100dvh - 204px);
$menu-mobile-height: calc(100dvh - 168px);
$menu-collapsed-height: calc(100dvh - 202px);

.menu {
height: $menu-height;
height: calc(100dvh - 204px);
overflow-y: auto;

&__collapsed {
height: $menu-collapsed-height;
height: calc(100dvh - 202px);
}

@media (max-width: 768px) {
height: $menu-mobile-height;
height: calc(100dvh - 168px);
}
}
7 changes: 3 additions & 4 deletions ui/src/components/Layouts/Sidebar/Sidebar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
display: block;
max-width: var(--bt-size-135);
max-height: var(--bt-size-55);
width: auto;
height: auto;
padding-top: var(--bt-size-10);
padding-bottom: var(--bt-size-10);
/* width and height are auto by default */
/* "logical property" does top and bottom padding as shorthand */
padding-block: var(--bt-size-10);
margin-bottom: var(--bt-size-10);

&_dark {
Expand Down
6 changes: 3 additions & 3 deletions ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
@import "./styles/other-overrides.css";

*,
*::before,
*::after {
::before,
::after {
box-sizing: border-box;
}

Expand All @@ -22,7 +22,7 @@
html,
body {
height: 100%;
overflow: hidden;
overflow: hidden; /* Why? Are things overflowing? */
}

body {
Expand Down
8 changes: 4 additions & 4 deletions ui/src/pages/About/About.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
&__intro {
p {
text-align: right;
font-size: 16px;
background: linear-gradient(
to bottom,
rgba(44, 44, 44, 0.802) 50%,
transparent 60%
rgb(44 44 44 / 0.802) 50%,
transparent 50%
);
/* font-size: 16px; Font size is already 16 by default */
padding: var(--bt-size-10);
border-radius: var(--bt-size-8);
background-repeat: repeat-y;
Expand All @@ -30,7 +30,7 @@
}

&_cover {
background: url("../../assets/About/cover.webp") no-repeat left /
background: url('../../assets/About/cover.webp') no-repeat left /
cover;
}
}
Expand Down
Loading
Loading