Skip to content

Commit d624bfe

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(ui): preserve panel and auth control semantics
1 parent e4464e8 commit d624bfe

3 files changed

Lines changed: 41 additions & 13 deletions

File tree

‎apps/sim/app/(interfaces)/chat/components/auth/password/password-auth.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default function PasswordAuth({ identifier }: PasswordAuthProps) {
7272
placeholder='Enter password'
7373
value={password}
7474
onChange={handlePasswordChange}
75+
className='h-[34px]'
7576
error={hasPasswordError}
7677
/>
7778
<div

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx‎

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,23 @@ function copilotDraftKey(
112112
): string | undefined {
113113
return workflowId ? `${workspaceId}:workflow-copilot:${workflowId}:${chatId ?? 'new'}` : undefined
114114
}
115+
116+
interface PanelTabChipProps {
117+
tab: PanelTab
118+
active: boolean
119+
onClick: () => void
120+
children: string
121+
}
122+
123+
function PanelTabChip({ tab, active, onClick, children }: PanelTabChipProps) {
124+
return (
125+
<Chip active={active} aria-pressed={active} onClick={onClick} data-tab-button={tab}>
126+
<span className={active ? 'text-[var(--text-primary)]' : 'text-[var(--text-secondary)]'}>
127+
{children}
128+
</span>
129+
</Chip>
130+
)
131+
}
115132
/**
116133
* Panel component with resizable width and tab navigation that persists across page refreshes.
117134
*
@@ -741,7 +758,7 @@ export const Panel = memo(function Panel() {
741758
<div className='flex gap-1.5'>
742759
<DropdownMenu open={isMenuOpen} onOpenChange={setIsMenuOpen}>
743760
<DropdownMenuTrigger asChild>
744-
<Button aria-label='Workflow actions' iconSize='regular'>
761+
<Button aria-label='Workflow actions' className='size-[30px]'>
745762
<MoreHorizontal className='size-[14px]' />
746763
</Button>
747764
</DropdownMenuTrigger>
@@ -802,7 +819,7 @@ export const Panel = memo(function Panel() {
802819
</DropdownMenu>
803820
<Button
804821
aria-label={isChatOpen ? 'Close chat' : 'Open chat'}
805-
iconSize='regular'
822+
className='size-[30px]'
806823
variant={isChatOpen ? 'active' : 'default'}
807824
onClick={() => setIsChatOpen(!isChatOpen)}
808825
>
@@ -853,28 +870,28 @@ export const Panel = memo(function Panel() {
853870
<div className='flex shrink-0 items-center justify-between px-2 pt-3.5'>
854871
<div className='flex gap-1'>
855872
{isCopilotTabAvailable && (
856-
<Chip
873+
<PanelTabChip
874+
tab='copilot'
857875
active={_hasHydrated && activeTab === 'copilot'}
858876
onClick={() => handleTabClick('copilot')}
859-
data-tab-button='copilot'
860877
>
861878
Chat
862-
</Chip>
879+
</PanelTabChip>
863880
)}
864-
<Chip
881+
<PanelTabChip
882+
tab='toolbar'
865883
active={_hasHydrated && activeTab === 'toolbar'}
866884
onClick={() => handleTabClick('toolbar')}
867-
data-tab-button='toolbar'
868885
>
869886
Toolbar
870-
</Chip>
871-
<Chip
887+
</PanelTabChip>
888+
<PanelTabChip
889+
tab='editor'
872890
active={_hasHydrated && activeTab === 'editor'}
873891
onClick={() => handleTabClick('editor')}
874-
data-tab-button='editor'
875892
>
876893
Editor
877-
</Chip>
894+
</PanelTabChip>
878895
</div>
879896
</div>
880897

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/output-panel.tsx‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,21 @@ export const OutputPanel = React.memo(function OutputPanel({
309309
onClick={handleHeaderClick}
310310
>
311311
<div className='flex items-center'>
312-
<Chip active={!showInput} onClick={handleOutputButtonClick} aria-label='Show output'>
312+
<Chip
313+
active={!showInput}
314+
aria-pressed={!showInput}
315+
onClick={handleOutputButtonClick}
316+
aria-label='Show output'
317+
>
313318
Output
314319
</Chip>
315320
{hasInputData && (
316-
<Chip active={showInput} onClick={handleInputButtonClick} aria-label='Show input'>
321+
<Chip
322+
active={showInput}
323+
aria-pressed={showInput}
324+
onClick={handleInputButtonClick}
325+
aria-label='Show input'
326+
>
317327
Input
318328
</Chip>
319329
)}

0 commit comments

Comments
 (0)