-
Notifications
You must be signed in to change notification settings - Fork 47
Collapsible menu #1553
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
base: main
Are you sure you want to change the base?
Collapsible menu #1553
Conversation
|
Claude finished @bengtmagnus's task —— View job Code Review ResultsReviewing collapsible menu implementation for issues:
Issues FoundMissing Error Handling:
Performance Issues:
Bug:
|
|
Looks great! But clicking the username, that's only temporary? |
Ah! yes :) Will add a proper button for it. Just wanted to test the toggle on click. |
spuun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a fix for the CSP header.
Remove duplicate menu labels and tidy up javascript
ThomasSarlin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good and works well. Tried experimenting with a way to implement this without having to add the scroll event. The behavior is possible with pure css, but it got out of hand and ended up being a messier restructure of the whole page.
We could improve and prevent sending scroll events (and in turn update the css top variable for non-collapsed labels) when the menu is not collapsed but current implementation does not affect the page visually so it might be unnecessary.
WHAT is this pull request doing?
Makes it possible to switch between expanded and collapsed sidebar menu. When collapsed, only the icons are visible with a clear hover indicator on which page is applicable.
A variable is saved in LocalStorage to see if the menu should be collapsed or expanded when the page loads. This check is done directly in the head to avoid jumping. The collapsed/expanded class is set on the html tag.
Since we want overflow auto in the y-direction but hidden in the x-direction on the menu, the tooltips for the menu options need to be fixed. That's why I calculate the position with javascript.
HOW can this pull request be tested?
Switch between the different states