Skip to content

Commit 9571882

Browse files
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6wtellaho
authored andcommitted
fix(channels): align split panel header with shared AuxiliaryPanelHeader
The channel-management side pane hand-rolled its split-layout header instead of using the shared AuxiliaryPanelHeader, drifting from the user-profile pane and the channel header to its left: a stray bottom hairline border, tighter px-4 py-1.5 + gap-0.5 spacing, and a custom -ml-2 h-7 w-7 back button. Reuse <AuxiliaryPanelHeader> the way UserProfilePanel does so the header matches by construction — no border, default px-5 py-2 / h-9 row, plain size=icon buttons. DialogPrimitive.Title/Description accessibility wiring is preserved; the non-split overlay branch is untouched. Co-authored-by: Taylor Ho <[email protected]> Signed-off-by: Taylor Ho <[email protected]>
1 parent 7f96225 commit 9571882

1 file changed

Lines changed: 27 additions & 32 deletions

File tree

‎desktop/src/features/channels/ui/ChannelManagementSheet.tsx‎

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ import {
5353
import { Input } from "@/shared/ui/input";
5454
import { Textarea } from "@/shared/ui/textarea";
5555
import {
56+
AuxiliaryPanelHeader,
5657
AuxiliaryPanelHeaderGroup,
5758
AuxiliaryPanelTitle,
5859
auxiliaryPanelContentPaddingClass,
5960
} from "@/shared/layout/AuxiliaryPanelHeader";
60-
import { channelChrome } from "@/shared/layout/chromeLayout";
6161
import { useScrollBoundaryLock } from "@/shared/hooks/useScrollBoundaryLock";
6262
import {
6363
OverlayPanelBackdrop,
@@ -675,33 +675,28 @@ function ChannelManagementPanelContent({
675675
return (
676676
<>
677677
{isSplitLayout ? (
678-
<div
679-
className={cn(
680-
"pointer-events-none relative z-30 bg-background/80 backdrop-blur-md after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-border/35 after:content-[''] supports-backdrop-filter:bg-background/70 dark:bg-background/70 dark:backdrop-blur-xl dark:supports-backdrop-filter:bg-background/55",
681-
channelChrome.negativeMargin,
682-
)}
683-
>
684-
<div className="pointer-events-auto relative z-30 flex min-h-8 shrink-0 cursor-default select-none items-center gap-2.5 px-4 py-1.5 sm:pr-3">
685-
<AuxiliaryPanelHeaderGroup className="gap-0.5">
686-
{activeView === "canvas" ? (
687-
<Button
688-
aria-label="Back to channel"
689-
className="-ml-2 h-7 w-7"
690-
data-testid="channel-management-back"
691-
onClick={() => setActiveView("summary")}
692-
size="icon"
693-
type="button"
694-
variant="ghost"
695-
>
696-
<ChevronLeft />
697-
</Button>
698-
) : null}
699-
<DialogPrimitive.Title asChild>
700-
<AuxiliaryPanelTitle>
701-
{activeView === "canvas" ? "Canvas" : "Channel"}
702-
</AuxiliaryPanelTitle>
703-
</DialogPrimitive.Title>
704-
</AuxiliaryPanelHeaderGroup>
678+
<AuxiliaryPanelHeader>
679+
<AuxiliaryPanelHeaderGroup>
680+
{activeView === "canvas" ? (
681+
<Button
682+
aria-label="Back to channel"
683+
className="shrink-0"
684+
data-testid="channel-management-back"
685+
onClick={() => setActiveView("summary")}
686+
size="icon"
687+
type="button"
688+
variant="outline"
689+
>
690+
<ChevronLeft />
691+
</Button>
692+
) : null}
693+
<DialogPrimitive.Title asChild>
694+
<AuxiliaryPanelTitle>
695+
{activeView === "canvas" ? "Canvas" : "Channel"}
696+
</AuxiliaryPanelTitle>
697+
</DialogPrimitive.Title>
698+
</AuxiliaryPanelHeaderGroup>
699+
<div className="ml-auto flex shrink-0 items-center gap-2">
705700
<Button
706701
aria-label="Close channel management"
707702
className="relative z-[60]"
@@ -718,11 +713,11 @@ function ChannelManagementPanelContent({
718713
>
719714
<X />
720715
</Button>
721-
<DialogPrimitive.Description className="sr-only">
722-
Channel settings
723-
</DialogPrimitive.Description>
724716
</div>
725-
</div>
717+
<DialogPrimitive.Description className="sr-only">
718+
Channel settings
719+
</DialogPrimitive.Description>
720+
</AuxiliaryPanelHeader>
726721
) : (
727722
<div
728723
className={cn(

0 commit comments

Comments
 (0)