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

Fixed UX issue where assets sidenav would collapse if custom status label is selected #12330

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

snipe
Copy link
Owner

@snipe snipe commented Jan 10, 2023

This is a bit of an awkward fix tbh. To reproduce this:

  1. Create a custom status label and mark it as shown in the nav.
  2. Using the hamburger menu, expand the sidenav so it's not the compact version
  3. When you click on the custom status label in the sidenav in the Assets section, the asset top level menu collapses

The reason for this is because custom status labels don't actually point to the /hardware sections, instead they point to the status labels listing, since the non-custom ones are working with the meta status, while the custom ones are a specific status ID. This is a sort of visual workaround which I don't love, but I think should solve the problem for most people.

Before

Screen Recording 2023-01-10 at 1 36 11 AM 2023-01-10 01_44_07

After

Screen Recording 2023-01-10 at 1 38 57 AM 2023-01-10 01_45_08

…l is selected

Signed-off-by: snipe <snipe@snipe.net>
@what-the-diff
Copy link

what-the-diff bot commented Jan 10, 2023

  • The class "active" is added to the li element when a user visits /hardware or any statuslabels/* page.
  • A new condition was added in order for the active state of an asset's status label to be highlighted on its respective show page (e.g., Deployed).

Signed-off-by: snipe <snipe@snipe.net>
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

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

This doesn’t even seem like that dirty of a fix to me; it looks and works just fine IMHO! Thank you!

@snipe snipe merged commit 50fdf9c into develop Jan 10, 2023
@snipe snipe deleted the fixes/custom_status_label_sidenav branch January 10, 2023 09:55
@brianhoganm
Copy link

Thanks for fixing the sidenav - works great on the demo. Can't wait to update my Snipe-IT. I rely very heavily on status labels.

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.

None yet

3 participants