Skip to content

Commit 27c416e

Browse files
committed
Use text-only Workspaces launcher and tab
1 parent 02a65c6 commit 27c416e

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

‎apps/sim/platform/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Use `design-system/styles/rhythm.css` for title/detail, list and action gaps (2p
2424

2525
Home and Chat share a centered, border-box reading column (maximum width and inline gutter). Align the resting Home greeting with the Home navigation row using the shell’s shared row origin **inside** the moving content. The unpadded viewport keeps the fade at the window edge. The web opener sits at the expanded sidebar toolbar’s 12px top inset on every route. On Home it scrolls with the page. Electron keeps both controls in its native titlebar. Keep the same shell inset immediately above and below the footer. Major dashboard/sidebar sections are independently spaced at 24px. Responsive layouts can wrap, collapse or split panels; button height, padding and type stay stable.
2626

27-
Use `ControlRow` for the sidebar, identity controls, panel tabs, recent links, wrapping workspace choices and horizontal destination links. The row owns its 30px height, 8px inset and the placement and hover of a 24px action, including a leading remove button that replaces an existing glyph. Named workspace rows are text-only; a recent without a glyph keeps its remove action at the end. The Workspaces destination may have an icon. Keep the link, tab or button semantics on the rendered element, with sibling actions outside it. Whole section headers reveal their chevron on hover; identity controls need none. Ordinary text and icon triggers use `Button` / `IconButton`, including Base UI menu triggers. Pass icons and labels through their slots. Binary switches stay pill-shaped; clicking the selected half of a two-choice segment switches to the other half. Native keyboard choice navigation still selects its destination.
27+
Use `ControlRow` for the sidebar, identity controls, panel tabs, recent links, wrapping workspace choices and horizontal destination links. The row owns its 30px height, 8px inset and the placement and hover of a 24px action, including a leading remove button that replaces an existing glyph. Workspace names, the Workspaces launcher and its tab title are text-only. A recent without a glyph keeps its remove action at the end. Keep the link, tab or button semantics on the rendered element, with sibling actions outside it. Whole section headers reveal their chevron on hover; identity controls need none. Ordinary text and icon triggers use `Button` / `IconButton`, including Base UI menu triggers. Pass icons and labels through their slots. Binary switches stay pill-shaped; clicking the selected half of a two-choice segment switches to the other half. Native keyboard choice navigation still selects its destination.
2828

2929
Use `ActivityRow` for a first-line glyph or avatar, title/detail and centered trailing metadata. Use the chart, calendar, composer or attachment owner when those parts have a different interaction. See the [component ownership map](docs/component-ownership.md) before adding another family.
3030

‎apps/sim/platform/app/(shell)/chat/_components/panel/chat-panels.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { PanelContent } from '@/platform/app/(shell)/chat/_components/panel/pane
99
import { PanelTabs } from '@/platform/app/(shell)/chat/_components/panel/panel-tabs'
1010
import styles from '@/platform/app/(shell)/chat/_components/panel/panels.module.css'
1111
import { IconButton } from '@/platform/design-system/components/button/button'
12+
import type { TabItem } from '@/platform/design-system/components/tabs/tabs'
1213
import { platformHref } from '@/platform/design-system/navigation'
1314

1415
export type PanelDestination = 'start' | 'workspaces' | 'terminal' | 'file' | 'website'
@@ -18,13 +19,13 @@ interface PanelTab {
1819
resource?: PanelRecent
1920
}
2021

21-
const tabs = {
22+
const tabs: Record<PanelDestination, Pick<TabItem, 'label' | 'icon'>> = {
2223
start: { label: 'New tab', icon: 'I041' },
23-
workspaces: { label: 'Workspaces', icon: 'I025' },
24+
workspaces: { label: 'Workspaces' },
2425
terminal: { label: 'Terminal', icon: 'I107' },
2526
file: { label: 'File', icon: 'I015' },
2627
website: { label: 'Browser', icon: 'I041' },
27-
} as const
28+
}
2829

2930
const OpenPanel = createContext<((element: HTMLButtonElement) => void) | null>(null)
3031

‎apps/sim/platform/app/(shell)/chat/_components/panel/panel-content.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export function PanelContent({
113113
onOpen={() => onVisit('terminal')}
114114
/>
115115
<ActivityRow
116-
leading={<Icon name='I025' />}
117116
title='Workspaces'
118117
detail='Open a workspace'
119118
showChevron={false}

‎apps/sim/platform/design-system/components/activity-row/activity-row.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Icon } from '@/platform/design-system/components/icon/icon'
44
import { OverflowText } from '@/platform/design-system/components/overflow-text/overflow-text'
55

66
interface ActivityRowProps {
7-
leading: ReactNode
7+
leading?: ReactNode
88
title: string
99
count?: number
1010
detail: string
@@ -27,9 +27,11 @@ export function ActivityRow({
2727
return (
2828
<li>
2929
<button type='button' className={styles.row} onClick={onOpen}>
30-
<span className={styles.leading} aria-hidden='true'>
31-
{leading}
32-
</span>
30+
{leading && (
31+
<span className={styles.leading} aria-hidden='true'>
32+
{leading}
33+
</span>
34+
)}
3335
<span className={styles.copy}>
3436
<span className={styles.title} data-type='T059'>
3537
<OverflowText text={count ? `${title} ${count}` : title}>

‎apps/sim/platform/design-system/components/tabs/tabs.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import styles from '@/platform/design-system/components/tabs/tabs.module.css'
1111
export interface TabItem {
1212
id: string
1313
label: string
14-
icon: IconName
14+
icon?: IconName
1515
content: ReactNode
1616
}
1717

0 commit comments

Comments
 (0)