Skip to content

Commit 8e37da9

Browse files
committed
feat(webapp): polish the project selector, help menu, and collapsed side menu
- Brighten the project selector trigger label and icon - Keep a constant 1px border on the project selector (transparent when collapsed) so it no longer nudges 1px on collapse - Animate the scroll section left padding in sync with the side menu collapse, matching its duration and easing - Remove the H shortcut key from the Help & Feedback button and surface it in a 500ms hover tooltip instead, keeping the shortcut working - Match the Help & Feedback label to the other side menu items (size and dimmed color)
1 parent f2a3cbe commit 8e37da9

2 files changed

Lines changed: 13 additions & 16 deletions

File tree

apps/webapp/app/components/navigation/HelpAndFeedbackPopover.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,13 @@ export function HelpAndFeedback({
7070
<QuestionMarkIcon className="size-5 min-w-5 shrink-0 text-success" />
7171
<span
7272
className={cn(
73-
"overflow-hidden whitespace-nowrap text-2sm text-text-bright transition-all duration-150",
73+
"overflow-hidden whitespace-nowrap text-[0.90625rem] font-medium tracking-[-0.01em] text-text-dimmed transition-all duration-150 group-hover:text-text-bright",
7474
isCollapsed ? "max-w-0 opacity-0" : "max-w-[150px] opacity-100"
7575
)}
7676
>
7777
Help & Feedback
7878
</span>
7979
</span>
80-
<ShortcutKey
81-
className={cn(
82-
"size-4 flex-none transition-all duration-150",
83-
isCollapsed ? "hidden" : ""
84-
)}
85-
shortcut={{ key: "h" }}
86-
variant="medium/bright"
87-
/>
8880
</PopoverTrigger>
8981
}
9082
content={
@@ -95,7 +87,7 @@ export function HelpAndFeedback({
9587
}
9688
side="right"
9789
sideOffset={8}
98-
hidden={!isCollapsed}
90+
delayDuration={isCollapsed ? 0 : 500}
9991
buttonClassName="!h-8 w-full"
10092
asChild
10193
disableHoverableContent

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,12 @@ export function SideMenu({
392392
: "scrollbar-gutter-stable scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600"
393393
)}
394394
>
395-
<div className="mb-6 flex w-full flex-col gap-4 overflow-hidden pl-2.5 pr-0">
395+
<div
396+
className={cn(
397+
"mb-6 flex w-full flex-col gap-4 overflow-hidden pr-0 transition-[padding] duration-200",
398+
isCollapsed ? "pl-1" : "pl-2.5"
399+
)}
400+
>
396401
<div className="w-full space-y-0">
397402
<SideMenuItem
398403
name="Tasks"
@@ -1028,22 +1033,22 @@ function ProjectSelector({
10281033
button={
10291034
<PopoverTrigger
10301035
className={cn(
1031-
"group flex h-8 items-center rounded pl-[0.4375rem] transition-colors hover:bg-charcoal-750",
1036+
"group flex h-8 items-center rounded border pl-[0.4375rem] transition-colors hover:bg-charcoal-750",
10321037
isCollapsed
1033-
? "justify-center pr-0.5"
1034-
: "justify-between border border-charcoal-700 pr-1",
1038+
? "justify-center border-transparent pr-0.5"
1039+
: "justify-between border-charcoal-700 pr-1",
10351040
className
10361041
)}
10371042
>
10381043
<span className="flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden">
1039-
<FolderOpenIcon className="size-5 shrink-0 text-text-dimmed transition group-hover:text-text-bright" />
1044+
<FolderOpenIcon className="size-5 shrink-0 text-text-bright" />
10401045
<span
10411046
className={cn(
10421047
"flex min-w-0 items-center overflow-hidden transition-all duration-200",
10431048
isCollapsed ? "max-w-0 opacity-0" : "max-w-[200px] opacity-100"
10441049
)}
10451050
>
1046-
<span className="truncate text-[0.90625rem] font-medium tracking-[-0.01em] text-text-dimmed transition group-hover:text-text-bright">
1051+
<span className="truncate text-[0.90625rem] font-medium tracking-[-0.01em] text-text-bright">
10471052
{project.name ?? "Select a project"}
10481053
</span>
10491054
</span>

0 commit comments

Comments
 (0)