-
-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refactor] Sidebar cleanup (and a bit more that's related) (#3544)
* Delete settings scren code unused since the game settings were moved to a modal * These changes are needed for the previous commit too * Create a SidebarItem to cleanup the SidebarLinks component * Update/cleanup CSS for all sidebar components * Tell typescript these places do have a valid runner * Fix linter offense * Add translation back * Remove deadcode * Don't do `runner!`. Fix game_defaults url. Use `/library`. * remove `app/default` routes for settings, since that screen is only used for heroic's settings now * More cleanup of unused code * Fix settings url after rebase * Fix test clicking Settings in sidebar
- Loading branch information
Showing
22 changed files
with
620 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/frontend/components/UI/Sidebar/components/CurrentDownload/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.Sidebar { | ||
.currentDownload { | ||
font-size: var(--text-sm); | ||
padding: var(--space-md) 0; | ||
transition: 300ms; | ||
margin-top: var(--space-sm); | ||
align-self: end; | ||
|
||
& > .gameTitle { | ||
font-size: var(--text-md); | ||
transition: 600ms; | ||
font-weight: var(--bold); | ||
} | ||
|
||
&:hover > .gameTitle { | ||
color: var(--accent-overlay); | ||
transition: 600ms; | ||
} | ||
|
||
.downloadStatus { | ||
color: var(--success); | ||
font-family: var(--secondary-font-family); | ||
font-style: italic; | ||
font-weight: normal; | ||
font-size: var(--text-sm); | ||
line-height: var(--text-sm); | ||
} | ||
|
||
.MuiLinearProgress-bar1Determinate { | ||
background-color: var(--success); | ||
} | ||
|
||
.statusIcon { | ||
display: none; | ||
margin-inline-end: 10px; | ||
svg { | ||
width: 27px; | ||
height: auto; | ||
color: var(--success); | ||
} | ||
} | ||
} | ||
|
||
&.collapsed { | ||
.statusIcon { | ||
display: block; | ||
} | ||
.full-size { | ||
display: none; | ||
} | ||
} | ||
} |
40 changes: 0 additions & 40 deletions
40
src/frontend/components/UI/Sidebar/components/CurrentDownload/index.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/frontend/components/UI/Sidebar/components/HeroicVersion/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.Sidebar { | ||
.heroicVersion { | ||
display: flex; | ||
gap: 5px; | ||
font-size: var(--text-sm); | ||
cursor: pointer; | ||
transition: 300ms; | ||
color: var(--brand-text-01); | ||
|
||
&:hover { | ||
color: var(--accent); | ||
} | ||
} | ||
|
||
.heroicNewReleases { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-around; | ||
font-size: var(--text-sm); | ||
|
||
& > a { | ||
color: var(--accent); | ||
transition: 300ms; | ||
-webkit-app-region: no-drag; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
color: var(--accent-overlay); | ||
} | ||
} | ||
} | ||
|
||
&.collapsed { | ||
.heroicVersion { | ||
font-size: var(--text-xs); | ||
text-align: center; | ||
} | ||
|
||
.heroicVersion__title { | ||
display: none; | ||
} | ||
|
||
.heroicNewReleases { | ||
display: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
src/frontend/components/UI/Sidebar/components/SidebarItem/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
.Sidebar { | ||
.Sidebar__item { | ||
--sidebar-item-inactive-text-color: var( | ||
--navbar-inactive, | ||
var(--navbar-accent) | ||
); | ||
--sidebar-hover-text-color: var(--text-hover); | ||
--sidebar-item-active-text-color: var( | ||
--navbar-active, | ||
var(--accent-overlay, var(--accent)) | ||
); | ||
--sidebar-active-item-background: var(--navbar-active-background); | ||
|
||
display: flex; | ||
gap: 10px; | ||
width: 100%; | ||
padding: var(--space-xs) var(--sidebar-horizontal-padding); | ||
border: none; | ||
background: none; | ||
cursor: pointer; | ||
font-size: var(--text-md); | ||
color: var(--sidebar-item-inactive-text-color); | ||
transition: color 250ms; | ||
text-align: start; | ||
font-family: var(--primary-font-family); | ||
|
||
.Sidebar__itemIcon { | ||
width: 24px; | ||
display: inline-flex; | ||
justify-content: center; | ||
} | ||
|
||
&:focus-visible { | ||
outline: 2px solid var(--sidebar-hover-text-color); | ||
outline-offset: -2px; | ||
} | ||
|
||
&.active { | ||
color: var(--sidebar-item-active-text-color); | ||
|
||
.Sidebar__itemIcon { | ||
color: currentColor; | ||
} | ||
|
||
&.SidebarLinks__subItem { | ||
font-weight: var(--bold); | ||
} | ||
} | ||
&.active:not(.SidebarLinks__subItem) { | ||
background-color: var(--sidebar-active-item-background); | ||
} | ||
|
||
&.SidebarLinks__subItem { | ||
&, | ||
&:hover { | ||
padding-block: var(--space-3xs); | ||
padding-inline: var(--space-xl) var(--sidebar-horizontal-padding); | ||
font-size: var(--text-sm); | ||
line-height: 20px; | ||
white-space: break-spaces; | ||
} | ||
&::before { | ||
content: '• '; | ||
} | ||
& + .Sidebar__item:not(.SidebarLinks__subItem) { | ||
margin-top: 4px; | ||
} | ||
} | ||
|
||
&:hover { | ||
background-color: var(--navbar-active-background); | ||
transition: 0.1s; | ||
padding-inline-start: 12px; | ||
} | ||
|
||
@media screen and (max-width: 730px) { | ||
&, | ||
&:hover { | ||
padding: var(--space-3xs) var(--sidebar-horizontal-padding) | ||
var(--space-3xs) var(--space-lg); | ||
} | ||
} | ||
} | ||
|
||
&.collapsed { | ||
.Sidebar__item { | ||
padding: var(--space-xs) 0; | ||
|
||
& > span { | ||
display: none; | ||
} | ||
|
||
&.SidebarLinks__subItem { | ||
padding: var(--space-xs) var(--sidebar-horizontal-padding); | ||
&::before { | ||
display: none; | ||
} | ||
} | ||
|
||
&.active svg, | ||
& svg { | ||
transform: scale(1.2); | ||
padding: var(--space-2xs) 0; | ||
} | ||
|
||
.Sidebar__itemIcon { | ||
margin: 0 auto; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.