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

[dashboard] move org menu left #16164

Merged
merged 1 commit into from
Feb 6, 2023
Merged

[dashboard] move org menu left #16164

merged 1 commit into from
Feb 6, 2023

Conversation

svenefftinge
Copy link
Member

@svenefftinge svenefftinge commented Feb 1, 2023

Description

This PR changes the navigation as follows:

  1. moves the org selector to the left
  2. removes the project and prebuild pills in the top menu
  3. moves all the user specific pages into a /user slug and removes the org- prefix for billing and settings on orgs.
  4. moves the project tabs below the header and make the header always show the project name

TODO: the workspaces list needs to only show workspaces for the selected org, which requires more changes I'll do in a separate PR. Therefore:

/hold

Screenshot 2023-02-02 at 14 22 48

Related Issue(s)

Fixes #16046, #10976

How to test

Check the dashboard in the preview environments for any flaws regarding navigation.

Release Notes

Make organization selection a global setting.

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /werft no-test
    Run Leeway with --dont-test

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-se-org-menu.1 because the annotations in the pull request description changed
(with .werft/ from main)

@svenefftinge
Copy link
Member Author

svenefftinge commented Feb 1, 2023

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-se-org-menu.2
(with .werft/ from main)

@svenefftinge svenefftinge force-pushed the se/org-menu branch 2 times, most recently from b1eb1f5 to 2663b83 Compare February 2, 2023 13:14
@svenefftinge svenefftinge marked this pull request as ready for review February 2, 2023 13:22
@svenefftinge svenefftinge requested a review from a team February 2, 2023 13:22
@svenefftinge svenefftinge changed the title [dashboard] move org menu up/right [dashboard] move org menu left Feb 2, 2023
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Feb 2, 2023
@svenefftinge svenefftinge requested a review from gtsiolis February 2, 2023 13:23
@gtsiolis
Copy link
Contributor

gtsiolis commented Feb 2, 2023

Looking at this now! 👀

@gtsiolis
Copy link
Contributor

gtsiolis commented Feb 2, 2023

/werft run with-clean-slate-deployment

👍 started the job as gitpod-build-se-org-menu.5
(with .werft/ from main)

Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

These changes seem like a fast-forward into the future for navigation UX. 🔮

Adding hold from the description, which didn't work.

/hold

components/dashboard/src/projects/Project.tsx Show resolved Hide resolved
components/dashboard/src/menu/Menu.tsx Show resolved Hide resolved
components/dashboard/src/menu/Menu.tsx Show resolved Hide resolved
components/dashboard/src/menu/Menu.tsx Show resolved Hide resolved
<li className="flex-1"></li>
{user?.rolesOrPermissions?.includes("admin") && (
<li className="cursor-pointer">
<PillMenuItem name="Admin" link="/admin" />
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: Do know if this was by accident but now that the admin menu is not highlighted when active we could also resolve #15012, as long as we update the header to have a fixed title for the admin. Later on, moving this to the user menu could be better.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change this in this PR if there are other things that need to be addressed. If not, let's fix it afterward.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opened follow-up #16238 to keep track of this. Cc @svenefftinge

components/dashboard/src/projects/Project.tsx Show resolved Hide resolved
@geropl
Copy link
Member

geropl commented Feb 3, 2023

I really like the change! 🧡 🎉

  1. The Org-pill on the far left makes sense, as it leaves room for an "account selector" somewhere around the user icon on the far right. ⚖️
  2. Really like the new "tabs at the top". There is a little bit of jumping involved when switching orgs (with various name lengths), but I guess we'll get a handle on that at some point.
  3. I'm undecided whether we should keep the slug when switching orgs, or default to "/workspaces" or so. But let's keep that for now.
  4. There is a little mismatch now with the user settings, which have no visual tie to the User. But absolutely fine for now, maybe we find a way to highlight that connection later:
    image

@gtsiolis
Copy link
Contributor

gtsiolis commented Feb 3, 2023

@geropl Regarding [4] in #16164 (comment), changing the page title can help, see #16164 (comment).

Copy link
Contributor

@selfcontained selfcontained left a comment

Choose a reason for hiding this comment

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

Left a couple code related comments - wasn't sure how much of the menu code was just moved vs. new (I think it was mostly just moved?)

Some general feedback:

  • I like the org selector on the left, creates a better understanding of the information architecture hierarchy.

  • It seems odd that we hide the gitpod logo on smaller screens, we should always show the gitpod logo imo.

  • I think it's confusing how we make some of the top menu disappear sometimes, like when creating a new org or project. We should keep showing the same nav up top imo and not hide things.

image

  • Generally I worry with how noisy this makes the top nav. It's a lot, and smaller screens become pretty unusable with how they render. Figuring a better responsive implementation is probably a separate unit of work in itself (I think we have some good designs, we just need to implement them), but I worry this will make that job a bit harder.

image

<Route exact path="/org-settings" component={TeamSettings} />
<Route exact path="/org-billing" component={TeamBilling} />
<Route exact path="/settings" component={TeamSettings} />
<Route exact path="/billing" component={TeamBilling} />
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be helpful to put all of the org settings pages under a nested route, like /settings, /settings/billing, /settings/sso, etc. It will allow us to simplify some of the way we render those similar pages, and handle shared logic between them, and the grouping feels meaningful as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine with that. Could we look at it after this change? I don't believe these links are charged externally already.

}

export default function Menu() {
const user = useCurrentUser();
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing I noticed here (and on the team settings sub-menu) - we render a partial nav, then after data completes, we may add additional nav items (like settings and usage). I think it would be a much better experience if we instead loaded the data to determine the full nav menu items, then rendered. This is even more jarring now that they're on the top nav imo. We can utilize react-query to make subsequent renders not need the data calls too. I started something similar for the team settings sub-nav in a PR, and maybe it's a future improvement we can make for the org nav too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree. Would love to tackle this ina follow up PR.

@svenefftinge
Copy link
Member Author

I would like to get this merged ASAP, because of the large amount of changes it contains I'm concerned about endless conflict resolution sessions for everything that goes on in parallel. @selfcontained @geropl @gtsiolis I have addressed (and resolved the comment) most of your concerns. What is left could be tackled in a follow up PR.
Also, I believe it is ok to ship this without the update to the workspaces list. I'll work on that next week and have it land by the end of it.

@svenefftinge
Copy link
Member Author

/unhold

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

LGTM 🎨 ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/XXL team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] Relayout navigation in dashboard
5 participants