Skip to content

Making top nav menu responsive #16618

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

Merged
merged 1 commit into from
Mar 2, 2023
Merged

Making top nav menu responsive #16618

merged 1 commit into from
Mar 2, 2023

Conversation

selfcontained
Copy link
Contributor

@selfcontained selfcontained commented Mar 1, 2023

Description

This makes some updates to the top nav menu so it's more responsive, stems from a discussion @gtsiolis and I had about improving responsiveness. Main changes are:

For smaller screens

  • Gitpod Logo Hidden - Done to reduce the visual elements in the header for mobile. We probably have room for it if we want to keep it though.
  • Workspaces | Projects menu items shifted down to their own row
  • Admin | Feedback links moved into User Menu
a b
image image

Related Issue(s)

Relates to #4050

How to test

Release Notes

NONE

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
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-slow-database
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

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-bmh-responsive-top-nav.1 because the annotations in the pull request description changed
(with .werft/ from main)

@selfcontained selfcontained marked this pull request as ready for review March 1, 2023 01:09
@selfcontained selfcontained requested a review from a team March 1, 2023 01:09
@selfcontained selfcontained requested a review from gtsiolis as a code owner March 1, 2023 01:09
@github-actions github-actions bot added team: webapp Issue belongs to the WebApp team labels Mar 1, 2023
@selfcontained
Copy link
Contributor Author

/hold for feedback

@gtsiolis
Copy link
Contributor

gtsiolis commented Mar 2, 2023

Looking at this now! 👀

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.

Thanks for making these changes, @selfcontained! 🌮 🌮

Cross-posting relevant discussion from #16164 (comment) for visibility.

Left some minor non-blocking comments we can pick up in follow up issues or PRs.

Let's merge this as code changes have already been approved in #16618 (review).

/unhold

perfection

return (
<div
className={classNames(
"text-base text-gray-500 dark:text-gray-400 flex items-center space-x-1 py-1",
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: The y-padding here is probably not needed as it's ignored by thy py-2, but it should be fine to resolve in a follow up PR to unblock this.

Suggested change
"text-base text-gray-500 dark:text-gray-400 flex items-center space-x-1 py-1",
"text-base text-gray-500 dark:text-gray-400 flex items-center space-x-1",

<div className="flex justify-between h-10 mb-3 w-full">
<div className="flex items-center">
{/* hidden on smaller screens */}
<Link to="/" className="hidden md:inline pr-3 w-10">
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: Seems like there could be room for keeping the logo but let's try this and see if we need to revert this.

<div className="flex justify-between items-center pr-3">
<Link to="/" className="pr-3 w-10">
<header className="app-container flex flex-col pt-4" data-analytics='{"button_type":"menu"}'>
<div className="flex justify-between h-10 mb-3 w-full">
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: The org menu seems to push the user menu icon beyond the viewport in some cases. We could introduce a custom max width instead of the max-w-xs used on the org menu but it's should be fine for now as it should be an edge case.

Example A Example B
Frame 1269-a Frame 1269-b

))}
{/* hidden on smaller screens (in it's own menu below on smaller screens) */}
<div className="hidden md:block pl-2">
<OrgPagesNav />
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: Looking forward for the changes in #16433 to land and tone down a bit these two links here.

Comment on lines +117 to +118
withAdminLink
withFeedbackLink
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Loving the move of these links on smaller viewports. 🔮

@roboquat roboquat merged commit b20150f into main Mar 2, 2023
@roboquat roboquat deleted the bmh/responsive-top-nav branch March 2, 2023 08:43
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Mar 6, 2023
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-none size/XL team: webapp Issue belongs to the WebApp team
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

4 participants