Skip to content

[UI/UX] Fix some visual issues related to logs, dialogs, and RTL layout #3207

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

Merged
merged 1 commit into from
Nov 21, 2023
Merged
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
6 changes: 6 additions & 0 deletions src/frontend/components/UI/Sidebar/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,12 @@
padding: var(--space-2xs) 0;
}

.isRTL .Sidebar.collapsed .SidebarItemWithSubmenu:hover .SidebarSubmenu,
.isRTL .Sidebar.collapsed .SidebarItemWithSubmenu:focus-within .SidebarSubmenu {
right: var(--sidebar-width);
left: auto;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

submenu for settings and stores was floating on the left side of the screen for RTL languages

}

.Sidebar.collapsed .SidebarItemWithSubmenu:hover .SidebarSubmenu.settings,
.Sidebar.collapsed
.SidebarItemWithSubmenu:focus-within
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ body {
background: var(--accent);
}

::-webkit-scrollbar-corner,
::-webkit-resizer {
background: var(--gradient-body-background, var(--body-background));
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the corner at the bottom of the logs was white


.simple-keyboard {
position: absolute;
z-index: 10;
Expand Down
6 changes: 5 additions & 1 deletion src/frontend/screens/Game/GamePage/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}
}

.isRTL {
&.isRTL {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this fixes the menu and settings buttons too close, and the menu opening on the wrong direction

.gameTools {
right: auto !important;
left: 0px;
Expand All @@ -156,6 +156,10 @@
left: auto !important;
right: 1rem;
}
.backButton {
left: auto !important;
right: 12px;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the menu and settings buttons were overlapping the back button

}

.gameConfig {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.InstallModal__dialog {
width: 38vw;
height: fit-content;
width: 700px;
min-height: fit-content;
min-width: fit-content;
max-height: 95vh;
max-width: 80vw;
height: 90vh;
max-height: 1000px;
Copy link
Collaborator Author

@arielj arielj Nov 5, 2023

Choose a reason for hiding this comment

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

this makes the install modal (and, weirdly, the settings modal too) taller and wider

}

.InstallModal__dialog > .anticheatInfo {
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/screens/Settings/sections/LogSettings/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
grid-template-rows: 1fr;
column-gap: 0.5rem;
height: 25em;
width: 100%;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if no log, the log area was too narrow


.log-buttongroup {
display: flex;
flex-direction: column;
width: 150px;
width: 180px;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added some space to display game names in the log screen

gap: 1rem;
overflow-y: auto;
overflow-x: hidden;
Expand Down
6 changes: 5 additions & 1 deletion src/frontend/state/GlobalState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,13 @@ class GlobalState extends PureComponent<Props> {
libraryStatus,
sidebarCollapsed,
hideChangelogsOnStartup,
lastChangelogShown
lastChangelogShown,
language
} = this.state

const isRTL = RTL_LANGUAGES.includes(language)
document.body.classList.toggle('isRTL', isRTL)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we need the direction: rtl in the body to fix one issue with the scrollbar overlapping the content

there seems to be a bug in chrome that setting direction: rtl in the body doesn't move the scrollbar to the left side of the screen, but it seems to be a bug, we can't do much

it would work if the scroll were in a nested element, but then that breaks controllers


storage.setItem('updates', JSON.stringify(gameUpdates))
storage.setItem('sidebar_collapsed', JSON.stringify(sidebarCollapsed))
storage.setItem('hide_changelogs', JSON.stringify(hideChangelogsOnStartup))
Expand Down