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
Hds::SideNav
- add @isCollapsible
and @isMinimized
arguments
#1630
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
1 Ignored Deployment
|
Hds::SideNav
- add @isCollapsable
and @isMinimized
argumentsHds::SideNav
- add @isCollapsible
and @isMinimized
arguments
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.
@alex-ju did a first pass and stress-tested the implementation. for now I don't see any blocker, just general comments/suggestions (and a few questions I want to discuss with you, I'll set up a meeting for this)
packages/components/addon/components/hds/side-nav/header/index.hbs
Outdated
Show resolved
Hide resolved
packages/components/tests/dummy/app/templates/components/side-nav.hbs
Outdated
Show resolved
Hide resolved
@alex-ju another thing to discuss: in the RFC I see mentioned that this feature is opt-in, but I don't see it in the code (but maybe I have missed it) |
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.
cf9adeb
to
9f858d0
Compare
@jorytindall, I've not been able to replicate this, and although I've not changed the layout of this component (I suspect if there's an issue with scrolling it's something that we'd see in the current implementation too) I'd be keen to look into this (even if it's part of a separate PR). Would you be able to provide me with the browser/os combination that's causing issues? |
@didoo I tried to address all the things we discussed in the sync review as well as the comments here, so it's good for another review whenever time allows |
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.
@alex-ju I haven't checked (yet) the CSS line by line, I intend to do it when it's 100% finalized.
In the meantime I've left a few comments that I hope can help in moving forward the PR to a "ready to merge" state.
c244fcd
to
03290b6
Compare
5f3f84f
to
b1d0076
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.
Reviewed latest changes and re-approved
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.
For some reason the preview of the demo app isn't working for me (all I get is a blank page). The only thing I wanted to confirm was the animation/easing between the toggle button and the SideNav and whether that was either fixed or reverted to the same values to solve that separation issue in the animation rendering. Looking through the code I think they are the same, but could be wrong.
Otherwise, everything looks solid to me π
website/docs/components/side-nav/partials/code/component-api.md
Outdated
Show resolved
Hide resolved
height: 36px; | ||
padding: 0 4px; | ||
color: var(--token-color-foreground-high-contrast); | ||
background: none; |
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.
Is this to override background styles being inherited from somewhere?
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.
a reset for the <button>
element
website/docs/components/side-nav/partials/code/component-api.md
Outdated
Show resolved
Hide resolved
website/docs/components/side-nav/partials/code/component-api.md
Outdated
Show resolved
Hide resolved
website/docs/components/side-nav/partials/code/component-api.md
Outdated
Show resolved
Hide resolved
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.
Added a few suggested text/punctuation edits.
@alex-ju any reason why the tab order is skipping the switchers/selects in the sidenav? |
yes, that's not an actual interactive element (it's a div styled to look like an organization select). this element is part of the demo app work that Cristiano suggested we introduce in a separate PR so we can address it there |
Co-authored-by: Kristin Bradley <kristin.bradley@hashicorp.com> Co-authored-by: Jory Tindall <jory.tindall@hashicorp.com>
π Summary
@isCollapsible
(defaultfalse
) to allow users to collapse/expand theSideNav
on any screen size (previously only available on narrow viewports)@isMinimized
(defaultfalse
) argument to allow applications to preserve/control the minimized state across sessionsSideNav
is smaller when minimizedand doesn't include the logo anymoreSideNav
has a light border to the rightπ οΈ Detailed description
As a prerequisite of this work, we separated the
minimized
/not-minimized
state fromis-deskop
/is-mobile
styles before introducing the optionalisCollapsible
argument that determines whether or not to show the expand/collapse button when in desktop mode. On mobile, the collapsible feature is always on, with the exception whenisResponsive
is explicitly set tofalse
.Note: To test the work during development we use a dummy demo app; this does not necessarily need to be merged in, but I kept it to ease the review.
π Preview current
Hds::SideNav
in a dummy appπ Preview proposed
Hds::SideNav
with@isCollapsible={{true}}
in a dummy appOngoing tasks:
Add keyboard shortcuts to expand/contract the navigationπΈ Screenshots
Default
Collapsible
The following screen captures illustrate the effects of setting
@isCollapsible={{true}}
in the dummy app, HCP and TFCLocal test in dummy app
Local test in HCP
sidenav-cloud-ui.mp4
Local test in TFC
sidenav-atlas.mp4
π External links
Jira ticket: HDS-2388
Figma file: https://www.figma.com/file/I4gqjXgIvyrX1hBAodx9sC/Collapsible-SideNav-Exploration-%26-Milestones?type=design&node-id=43471-138048&mode=dev
π Reviewer's checklist:
π¬ Please consider using conventional comments when reviewing this PR.