-
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
Update dashboard navigation #10309
Update dashboard navigation #10309
Conversation
/werft run 👍 started the job as gitpod-build-gt-update-dashboard-navigation.4 |
@@ -100,6 +98,7 @@ export default function Menu() { | |||
|
|||
// Hide most of the top menu when in a full-page form. | |||
const isMinimalUI = ["/new", "/teams/new", "/open"].includes(location.pathname); | |||
const isWorkspacesUI = ["/workspaces"].includes(location.pathname); |
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.
thought: The idea here is that for the workspaces' page we'd like to remove the tabs but also keep the navigation up there.
"flex block font-medium dark:text-gray-400 px-3 py-1 rounded-2xl transition ease-in-out font-semibold " + | ||
(p.selected | ||
? "text-gray-50 bg-gray-800 dark:text-gray-900 dark:bg-gray-50" | ||
: "hover:bg-gray-100 dark:hover:bg-gray-700"); |
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: Some overriding is happening here, but haven't checked in depth.
components/dashboard/src/Menu.tsx
Outdated
{projectSlug && !prebuildId && ( | ||
<Link to={`${teamOrUserSlug}/${projectSlug}${prebuildId ? "/prebuilds" : ""}`}> | ||
<span className=" flex h-full text-base text-gray-50 bg-gray-800 dark:bg-gray-50 dark:text-gray-900 font-semibold ml-2 px-3 py-1 rounded-2xl border-gray-100"> | ||
{project?.name} | ||
</span> | ||
</Link> | ||
)} | ||
{prebuildId && ( | ||
<div className="flex h-full ml-2 py-1"> | ||
<img alt="" className="mr-3 filter-grayscale m-auto transform -rotate-90" src={CaretDown} /> | ||
<span className="text-base text-gray-600 dark:text-gray-400 font-semibold">{prebuildId}</span> | ||
<Link to={`${teamOrUserSlug}/${projectSlug}${prebuildId ? "/prebuilds" : ""}`}> | ||
<span className=" flex h-full text-base text-gray-500 bg-gray-50 hover:bg-gray-100 dark:text-gray-400 dark:bg-gray-800 dark:hover:bg-gray-700 font-semibold ml-2 px-3 py-1 rounded-2xl border-gray-100"> | ||
{project?.name} | ||
</span> | ||
</Link> | ||
)} | ||
{prebuildId && ( | ||
<div className="flex ml-2"> | ||
<div className="flex pl-0 pr-1 py-1.5"> | ||
<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path | ||
fill-rule="evenodd" | ||
clip-rule="evenodd" | ||
d="M7.293 14.707a1 1 0 0 1 0-1.414L10.586 10 7.293 6.707a1 1 0 1 1 1.414-1.414l4 4a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414 0Z" | ||
fill="#78716C" | ||
/> | ||
</svg> | ||
</div> | ||
<Link to={`${teamOrUserSlug}/${projectSlug}/${prebuildId}`}> | ||
<span className="flex h-full text-base text-gray-50 bg-gray-800 dark:bg-gray-50 dark:text-gray-900 font-semibold px-3 py-1 rounded-2xl border-gray-100"> | ||
{prebuildId.substring(0, 8).trimEnd()} | ||
</span> | ||
</Link> | ||
</div> | ||
)} |
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.
thought: Not sure if this could be better handled. Sorry for the potentially duplicate code here, but it helped push this forward, @AlexTugarev! 😬
/werft run 👍 started the job as gitpod-build-gt-update-dashboard-navigation.5 |
2fc4f89
to
3645b52
Compare
@gtsiolis, when selecting the name of any team or my account name from the redesigned pill menu, I get redirected to |
@AlexTugarev Yes, this is expected as the goal of this new navigation is to separate the workspaces page from the team-specific pages, and more. Muscle memory could be one of the reasons why this was confusing.
🍊 🍊 🍊 🍊 Also, the UX of the team selector is still missing two things. Re-pasting from the PR description:
🍋 🍋 🍋 🍋 In case, the new highlighted Workspaces menu went unnoticed, it could be worth considering using a narrower container width. Re-posting also from the PR description:
|
3645b52
to
2f897ee
Compare
@AlexTugarev I just re-read what you wrote in #10309 (comment)! This is not expected! Clicking on the team scope should go back to the team projects, not personal account projects. I've added this also in the PR description:
|
/werft run 👍 started the job as gitpod-build-gt-update-dashboard-navigation.8 |
Thanks for double-checking. Agree this seems to be odd. Just loom'd it https://www.loom.com/share/396efa9fb5044a0fb08214cd0985c2fa |
/werft run 👍 started the job as gitpod-build-gt-update-dashboard-navigation.9 |
a4d9353
to
386f2f7
Compare
386f2f7
to
6ed1432
Compare
const classes = | ||
"flex h-full text-base py-0 " + | ||
(!projectSlug && !isWorkspacesUI && !isAdminUI && teamOrUserSlug | ||
? "text-gray-50 bg-gray-800 dark:text-gray-900 dark:bg-gray-50 border-gray-700" | ||
: "text-gray-500 bg-gray-50 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 dark:border-gray-700"); |
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.
thought: Probably not the best way to handle classes for the left and right part of the team scope selector. 😇
In case anyone from the
|
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.
That works really nice! 🎉
🙏🏻 Thanks for improving the situation, @gtsiolis!
w.r.t to preserving the team selection when navigating to /workspaces, this should not block us from merging this as is. Also, I did not miss it at all, that said, personally I wouldn't mind not doing it at all.
Thanks for taking a look, @AlexTugarev! ✨ Agree with your comments in #10309 (review). However, I think it could save users some extra clicks if we also kept the team selection when visiting workspaces and admin. I've opened #10496 to track this and continue the discussion. I've also updated the tasks and changes to consider in #8385 to include the remaining tasks mentioned here. Cc @jldec |
Description
Update dashboard navigation per #8385.
Notable changes:
Some bugs that still need to be addressed:
/projects
when clicking on the personal account scope and go to/t/$TEAM/projects
when clicking on the team scope.What's missing for completing #8385:
Reposting things to consider from #8385:
Other things worth considering
Related Issue(s)
Related to #8385.
Screenshots
Release Notes