-
Notifications
You must be signed in to change notification settings - Fork 1.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
UX: Re-use left sub-menu for Settings and License page on admin dashboard #16427
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,15 @@ export default function Menu() { | |
const adminMenu: Entry = { | ||
title: "Admin", | ||
link: "/admin", | ||
alternatives: [...getAdminTabs().map((entry) => entry.link)], | ||
alternatives: [ | ||
...getAdminTabs().reduce( | ||
(prevEntry, currEntry) => | ||
currEntry.alternatives | ||
? [...prevEntry, ...currEntry.alternatives, currEntry.link] | ||
: [...prevEntry, currEntry.link], | ||
[] as string[], | ||
), | ||
], | ||
Comment on lines
+71
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: Not sure about this piece of code here, but UX looks good. I'll loop in @gitpod-io/engineering-webapp for visibility in case this needs a revert or a different approach. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, no problem! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for clarifying, @Devansu-Yadav! 🙇 |
||
}; | ||
|
||
const handleFeedbackFormClick = () => { | ||
|
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.
issue: The Admin menu becomes inactive when navigating to the license page. Could we keep it active?
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.
Fixed it! Was just a one-liner fix that was needed 😆
Actually, I completely missed out that updating the
getAdminTabs
function to remove the License page route might cause such an issue, as this function is being used to set the active state on the admin menu 😅.