Skip to content
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

refactor: 💡 use hds side nav w/ hds frame instead of rose #2688

Open
wants to merge 7 commits into
base: llb/side-nav-refactor
Choose a base branch
from

Conversation

lisbet-alvarez
Copy link
Collaborator

@lisbet-alvarez lisbet-alvarez commented Feb 13, 2025

Description

Refactor to use Hds::SideNav and Hds::AppFrame components.
Note: There is an issue with the Hds::SideNav::List component so we are using the Hds::SideNav::Portal component in the meantime.

The side nav should not be visible on the onboarding, change-password , and authenticate routes.

Screenshots (if appropriate)

How to Test

  1. Validate all links in the side nav route to expected pages.
  2. Validate side nav is present in expected pages.
  3. Validate dropdown options still function as expected.
    a. user menu options such as sign-out, change-password, light mode, dark mode, etc.
    b. dev tool toggle options such as feature editions and licensed features.

Checklist

  • I have added before and after screenshots for UI changes
  • I have added JSON response output for API changes
  • I have added steps to reproduce and test for bug fixes in the description
  • I have commented on my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link

vercel bot commented Feb 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boundary-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 25, 2025 8:57pm
boundary-ui-desktop ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 25, 2025 8:57pm

Copy link
Collaborator

@ZedLi ZedLi left a comment

Choose a reason for hiding this comment

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

🤯 This looks incredible!

{{/if}}
</Rose::Nav::Sidebar>
{{#if this.session.isAuthenticated}}
{{#in-element this.sideBarContainer}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did we have to portal this in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thats a good point, i think the same thing can be accomplished using the side nav list directly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Edit: Just realized you are referring to the in-element helper usage. That is because we don't show the side nav on all routes but we do want the side nav to be inserted into the correct hds::frame component.

@@ -53,3 +53,20 @@ form {
color: inherit;
}
}

// TODO: This is a temporary fix that ensures changing the color theme won't alter the dropdown colors.
.hds-app-frame__sidebar .hds-side-nav {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hds team is helping us find a cleaner solution for this style override. So this fix is just temporary.

@lisbet-alvarez lisbet-alvarez marked this pull request as ready for review February 25, 2025 19:23
@lisbet-alvarez lisbet-alvarez requested a review from a team as a code owner February 25, 2025 19:23
@lisbet-alvarez lisbet-alvarez marked this pull request as draft February 25, 2025 19:48
@@ -37,7 +37,7 @@
<page.actions>
{{#if (or perms.canUpdate perms.canDelete)}}

<Hds::Dropdown as |dd|>
<Hds::Dropdown data-test-manage-alias as |dd|>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to specify that this is the manage alias dropdown in the targets route?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah great point!

Comment on lines +20 to +21
const DROPDOWN_BUTTON_SELECTOR =
'tbody tr td:last-child .hds-dropdown-toggle-icon';
Copy link
Collaborator

Choose a reason for hiding this comment

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

asking for learning: Did this need to be updated since we have more dropdown (specifically in the new side nav) elements on the screen? Either way, I think this is a good change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup that is correct!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants