-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: auto-collapse sidebar for window width < lg #22393
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
7413cbe
to
04cebf5
Compare
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.
Tested this out and feels great
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.
This does work and seems like a pretty typical pattern. I'm not sure I like taking away the user's ability to re-expand the list, even though I see why we might want to auto-close it for them. Ideally if we are auto closing something, a user can hover on the menu itself, and expand it over the content main page content so they can still pick an option. This pattern here in Vuetify is a good example. But that's a bigger UX thing and doesn't block this PR imo, since the one other place we collapse the menu it cannot be expanded by the user.
The changes needed in this PR are related to the tests, lots of tests seem to expect the nav to be expanded on these pages and will need to be adjusted before this can merge.
There's also some vertical alignment problems on the rows on this branch at smaller breakpoints, not sure what that's about, possibly it is already fixed on the main feature branch:
@pstakoun @mike-plummer what's next for this PR?
|
@marktnoonan I would say yes, we do want this and we should update it. |
@marktnoonan it looks like that alignment issue is being addressed here #22635 |
Since our new process will need design 👀 on this PR, maybe @elevatebart or @mapsandapps can get us some confirmation ahead of time that this behavior is good to go, before we prioritize somebody cleaning up the conflicts and fixing the tests. Thinking about it more, here's my concern:
If we are going to decide for users when to expand/collapse the nav as a responsive thing, or on certain pages like the runner, maybe we should fully remove the button to toggle it, since there are now fewer situations where that's possible to do, and we override your preference anyway when we think it's better a different way. I think it's weird to have interaction patterns that are only valid some of the time, with no indication of what those times are. Better to just not have it. But the root issue of space here could also be solved by having the means of toggling the nav be more discoverable in the first place, so if a user wants more space, they can easily see how to get it. This feedback has already been given be a few people in a more general sense. With a visible control, even if we do sometimes disable the resizing, we can also visually remove the button that triggers it, so it's always clear whether resizing is available or not. |
@marktnoonan (or whomever): where did the request & requirements for this feature come from? there's no associated ticket. (just wanting context.) i can take this to design, yeah. |
@mapsandapps I think this was suggested by product and prototyped when ACI was adding the "Latest Runs" and "Average Duration" columns to the Specs Explorer - there was concern that there was insufficient screen real estate for all that at smaller viewport sizes. There's currently a "good enough" approach in place that abbreviates column headers and hides the Avg Duration column as viewport shrinks but that's probably not ideal |
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.
approved by design ✅
Looks like we got three ✅ but since the original branch is merged, someone will need to rebase this. The OP is off for the next little while, anyone want to rebase? |
04cebf5
to
3cd36dd
Compare
@lmiller1990 Rebased onto |
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.
Approved! One tiny optional suggestion on the tests.
@@ -139,7 +141,7 @@ describe('App: Settings', () => { | |||
cy.loginUser() | |||
|
|||
cy.visitApp() | |||
cy.findByText('Settings').click() | |||
cy.findByTestId('sidebar-link-settings-page').click() |
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.
Hmm, should this be cy.get(SidebarSettingsLinkSelector)
? Or it's probably more typical for all the others to be findByTestId('sidebar-link-settings-page')
, since the selector is a test id.
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
User facing changelog
Automatically collapse sidebar, and keep it collapsed, when window width is narrow to better utilize screen real estate.
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?