-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(webapp): redesign the side menu project and organization menus #4066
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
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
c6138e3
feat(webapp): split the side menu project and organization menus
samejr f2e8a0e
feat(webapp): dim project menu trigger and add environment tooltip
samejr 440023b
feat(webapp): connect the environment selector to the project menu
samejr d7c6af0
feat(webapp): size side menu popover items to match the nav items
samejr 3aa2886
feat(webapp): pin the project and environment selectors above the scr…
samejr e9fe1d0
feat(webapp): make the side menu env switcher a segmented control
samejr f2a3cbe
feat(webapp): refine side menu selectors and spacing
samejr 8e37da9
feat(webapp): polish the project selector, help menu, and collapsed s…
samejr 2fe465c
feat(webapp): align the project section padding with the nav items
samejr 8f99e6a
Merge remote-tracking branch 'origin/main' into samejr/org-menu-update
samejr f593730
feat(webapp): add a collapse toggle button to the side menu footer
samejr d5c39f5
feat(webapp): remove the middle collapse handle in favor of the foote…
samejr 24557d8
fix(webapp): keep the project section bottom padding constant when co…
samejr 0b0f66d
feat(webapp): add an account menu to the side menu header
samejr 26aa1be
feat(webapp): use a custom chain link icon for private connections
samejr 6d701ab
feat(webapp): use the custom avatar icon for the profile picture plac…
samejr 347fabe
feat(webapp): redesign the account profile page with a row-based layout
samejr 0645834
feat(webapp): match the environment selector popover item sizing to t…
samejr 72cd93d
feat(webapp): highlight impersonation mode in the side menu
samejr c7e7766
feat(webapp): move Settings to the top of the organization settings s…
samejr ea62538
feat(webapp): align org and account side menu padding with the main s…
samejr 08c2ab7
fix(webapp): match Help & Feedback popover Shortcuts and Contact us i…
samejr 1a574d7
fix(webapp): keep the keyboard shortcut hint on the Help & Feedback S…
samejr 71c540b
feat(webapp): make the side menu resizable by dragging its right edge
samejr 11efa95
feat(webapp): move Ask AI into the Help & Feedback menu
samejr 907288a
feat(webapp): refine the side menu resize handle and trim the Manage …
samejr aa15a48
feat(webapp): snap side menu button hovers, add Help & Feedback chevron
samejr aec6288
fix(webapp): only render the Help & Feedback chevron when expanded
samejr 85feda0
fix(webapp): make every side menu item keyboard-focusable in DOM order
samejr a71886a
fix(webapp): inset the focus ring so it is not clipped
samejr baeb7bd
Merge origin/main into samejr/org-menu-update
samejr 635c9c7
chore(webapp): use the Tailwind v4 semantic color aliases in the side…
samejr f990d56
feat(webapp): move New organization to the top of the org switcher
samejr fc60f13
feat(webapp): move Manage branches to the top of the branches popover
samejr 0c8a1ac
fix(webapp): keep collapsed side menu section items out of the tab order
samejr 3cd5208
chore(webapp): round the focus ring corners one step more
samejr e8a2007
feat(webapp): use a thinner avatar placeholder on the account and tea…
samejr 654bfc3
feat(webapp): add a 1.25px avatar variant for the team page member rows
samejr fbc3d88
fix(webapp): hide the secondary side menu buttons while dragging to r…
samejr 93d3364
fix(webapp): keep side menu secondary buttons hidden during a fast drag
samejr e6cfa95
fix(webapp): stop invisible side menu buttons masking the row icons m…
samejr 2e3d1fb
feat(webapp): fade the org, project, env and help labels in while dra…
samejr 49f6968
fix(webapp): address side menu review feedback (debounce flush, dev b…
samejr 55be043
feat(webapp): fade side menu labels out in place instead of truncating
samejr 2c264d4
fix(webapp): keep the expand button visible while dragging the side m…
samejr 428f103
fix(webapp): animate the side menu scroll body's right padding on col…
samejr 3e10d10
fix(webapp): reserve the side menu scrollbar gutter without breaking …
samejr b06d18e
feat(webapp): reach the account menu from the collapsed side menu
samejr 289ee72
feat(webapp): show the collapsed Account submenu at the bottom of the…
samejr 43d8ada
fix(webapp): make the admin Cmd+Esc shortcut work globally
samejr d012cc9
fix(webapp): move the admin shortcut to Cmd+Option+A (Cmd+Esc was unc…
samejr d6ca3b2
chore(webapp): tighten the side menu code comments
samejr bf08228
fix(webapp): read impersonation state from useIsImpersonating in Glob…
samejr 0d62bdb
feat(webapp): fade the side menu scrollbar in on hover
samejr e6a8dea
Merge remote-tracking branch 'origin/main' into samejr/org-menu-update
samejr 29735f1
fix(webapp): remove top padding from the open side menu notification
samejr 89be730
Merge remote-tracking branch 'origin/main' into samejr/org-menu-update
samejr f7529b3
fix(webapp): ellipsis-truncate long dev branch names in the env selector
samejr 297c951
feat(webapp): head the org and account side menu popovers
samejr eb77082
Merge remote-tracking branch 'origin/main' into samejr/org-menu-update
samejr 159a39b
fix(webapp): clear isAnimating when a resize drag interrupts a collapse
samejr ac3bdfb
fix(webapp): hide the org popover heading when the side menu is colla…
samejr 2af68e0
Merge branch 'main' into samejr/org-menu-update
samejr 728b890
chore(webapp): condense the side menu server-changes note
samejr 1af8efb
Merge branch 'main' into samejr/org-menu-update
samejr d2b6250
Merge branch 'main' into samejr/org-menu-update
samejr 5ac7532
feat(webapp): animate the free plan banner off-screen as the side men…
samejr e5a3c0d
fix(webapp): cap the env selector label width when reused outside the…
samejr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| area: webapp | ||
| type: improvement | ||
| --- | ||
|
|
||
| Refreshed the side menu: separate organization and account menus, a new project switcher, and the menu is now resizable by dragging its edge. The account Profile page has also been redesigned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| export function ChainLinkIcon({ className }: { className?: string }) { | ||
| return ( | ||
| <svg | ||
| className={className} | ||
| width="24" | ||
| height="24" | ||
| viewBox="0 0 24 24" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| > | ||
| <path | ||
| d="M10 19.0004L9.82843 19.1719C8.26634 20.734 5.73368 20.734 4.17158 19.1719L3.82843 18.8288C2.26634 17.2667 2.26633 14.734 3.82843 13.1719L7.17158 9.8288C8.73368 8.2667 11.2663 8.2667 12.8284 9.8288L13.1716 10.1719C13.8252 10.8256 14.2053 11.6491 14.312 12.5004" | ||
| stroke="currentColor" | ||
| strokeWidth="2" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| /> | ||
| <path | ||
| d="M9.68799 12.5004C9.79463 13.3516 10.1748 14.1752 10.8284 14.8288L11.1715 15.1719C12.7336 16.734 15.2663 16.734 16.8284 15.1719L20.1715 11.8288C21.7336 10.2667 21.7336 7.73404 20.1715 6.17194L19.8284 5.8288C18.2663 4.2667 15.7336 4.2667 14.1715 5.8288L14 6.00037" | ||
| stroke="currentColor" | ||
| strokeWidth="2" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| /> | ||
| </svg> | ||
| ); | ||
| } |
22 changes: 22 additions & 0 deletions
22
apps/webapp/app/assets/icons/LeftSideMenuCollapsedIcon.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| export function LeftSideMenuCollapsedIcon({ className }: { className?: string }) { | ||
| return ( | ||
| <svg | ||
| className={className} | ||
| width="24" | ||
| height="24" | ||
| viewBox="0 0 24 24" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| > | ||
| <rect x="4" y="4" width="16" height="16" rx="3" stroke="currentColor" strokeWidth="2" /> | ||
| <rect x="6" y="6" width="2" height="12" rx="1" fill="currentColor" /> | ||
| <path | ||
| d="M12 14.5L14.5 12L12 9.5" | ||
| stroke="currentColor" | ||
| strokeWidth="2" | ||
| strokeLinecap="round" | ||
| strokeLinejoin="round" | ||
| /> | ||
| </svg> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { motion } from "framer-motion"; | ||
| import { useState } from "react"; | ||
|
|
||
| export function LeftSideMenuIcon({ | ||
| className, | ||
| hovered: controlledHovered, | ||
| }: { | ||
| className?: string; | ||
| /** Drives the animation when provided (e.g. parent hover); otherwise the icon uses its own hover. */ | ||
| hovered?: boolean; | ||
| }) { | ||
| const [internalHovered, setInternalHovered] = useState(false); | ||
| const isControlled = controlledHovered !== undefined; | ||
| const hovered = isControlled ? controlledHovered : internalHovered; | ||
|
|
||
| return ( | ||
| <svg | ||
| className={className} | ||
| width="24" | ||
| height="24" | ||
| viewBox="0 0 24 24" | ||
| fill="none" | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| onMouseEnter={isControlled ? undefined : () => setInternalHovered(true)} | ||
| onMouseLeave={isControlled ? undefined : () => setInternalHovered(false)} | ||
| > | ||
| <rect x="4" y="4" width="16" height="16" rx="2" stroke="currentColor" strokeWidth="2" /> | ||
| {/* Animate a transform (scaleX), not the SVG `width` attr — framer snaps the first animation | ||
| of an idle SVG geometry attribute. Left origin collapses the panel right-to-left. */} | ||
| <motion.rect | ||
| x="6" | ||
| y="6" | ||
| width="5" | ||
| height="12" | ||
| rx="1" | ||
| fill="currentColor" | ||
| initial={false} | ||
| style={{ originX: 0 }} | ||
| animate={{ scaleX: hovered ? 0.2 : 1 }} | ||
| transition={{ duration: 0.3, ease: "easeInOut" }} | ||
| /> | ||
| </svg> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { useNavigate, useSubmit } from "@remix-run/react"; | ||
| import { useEffect } from "react"; | ||
| import { useIsImpersonating } from "~/hooks/useOrganizations"; | ||
| import { useOptionalUser } from "~/hooks/useUser"; | ||
| import { adminPath } from "~/utils/pathBuilder"; | ||
|
|
||
| /** App-wide keyboard shortcuts, mounted once at the root so they work everywhere. Renders nothing. */ | ||
| export function GlobalShortcuts() { | ||
| const user = useOptionalUser(); | ||
| const isImpersonating = useIsImpersonating(); | ||
| const navigate = useNavigate(); | ||
| const submit = useSubmit(); | ||
|
|
||
| const isAdmin = Boolean(user?.admin) || isImpersonating; | ||
|
samejr marked this conversation as resolved.
samejr marked this conversation as resolved.
|
||
|
|
||
| useEffect(() => { | ||
| if (!isAdmin) return; | ||
|
|
||
| const onKeyDown = (event: KeyboardEvent) => { | ||
| // Admin escape hatch: Cmd+Option+A (Ctrl+Alt+A on Windows) opens the admin dashboard, or stops | ||
| // impersonating. Avoids Escape — Chrome/macOS never delivers a keydown for Escape+modifier (why | ||
| // the old Cmd+Esc did nothing). Matched on `event.code`, not `event.key`, because Option makes | ||
| // "A" report "å" (so a raw listener, not the `event.key`-based useShortcutKeys hook). | ||
| if (event.code !== "KeyA" || !event.altKey || !(event.metaKey || event.ctrlKey)) { | ||
| return; | ||
| } | ||
| event.preventDefault(); | ||
| if (isImpersonating) { | ||
| submit(null, { action: "/resources/impersonation", method: "delete" }); | ||
| } else { | ||
| navigate(adminPath()); | ||
| } | ||
| }; | ||
|
|
||
| document.addEventListener("keydown", onKeyDown); | ||
| return () => document.removeEventListener("keydown", onKeyDown); | ||
| }, [isAdmin, isImpersonating, navigate, submit]); | ||
|
|
||
| return null; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.