Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(ui): settings dropdown (#3062)
Fake-User5824d9c64b9a
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsxindex 292f6f913c..61e3ff91b9 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-operator-autocomplete.tsx@@ -92,7 +92,7 @@ export const SearchOperatorAutocomplete = (<Show when={filteredOptions().length > 0}><divdata-operator-dropdown- class="absolute left-0 top-full mt-1 z-action-menu bg-surface-0 border border-edge-muted rounded-sm shadow-md min-w-[200px] max-w-[320px] max-h-[240px] overflow-y-auto p-1"+ class="absolute left-0 top-full mt-1 z-action-menu bg-panel border border-edge-muted rounded-sm shadow-md min-w-[200px] max-w-[320px] max-h-[240px] overflow-y-auto p-1"onMouseDown={(e) => e.preventDefault()}><div class="px-2 py-1 text-[10px] text-ink-faint uppercase tracking-wider">diff --git a/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx b/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsxindex aed26402ed..8a77a2dc4f 100644--- a/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/soup-view-tabs.tsx@@ -168,7 +168,7 @@ export const CollapsedSoupViewTabs = () => {</DropdownMenu.Trigger><DropdownMenu.Portal><Layer depth={2}>- <DropdownMenu.Content class="z-action-menu bg-surface-0 border border-edge-muted rounded-sm shadow-sm p-1">+ <DropdownMenu.Content class="z-action-menu bg-page border border-edge-muted rounded-sm shadow-sm p-1"><For each={list()}>{(item) => (<DropdownMenu.Itemdiff --git a/js/app/packages/app/component/settings/Settings.tsx b/js/app/packages/app/component/settings/Settings.tsxindex 82243a52ca..ea55e34ef2 100644--- a/js/app/packages/app/component/settings/Settings.tsx+++ b/js/app/packages/app/component/settings/Settings.tsx@@ -1,11 +1,9 @@-import { createEffect, onMount, Show, Suspense } from 'solid-js';+import { createEffect, createMemo, For, onMount, Show, Suspense } from 'solid-js';import { type SettingsTab, useSettingsState } from '@core/constant/SettingsState';import { isNativeMobilePlatform } from '@core/mobile/isNativeMobilePlatform';import { isMobile } from '@core/mobile/isMobile';-import { DEV_MODE_ENV, ENABLE_APP_STORE_QR_CODE, ENABLE_TEAMS_OVERRIDE } from '@core/constant/featureFlags';import { useFeatureFlag } from '@app/lib/analytics/posthog';-import { MobileApp } from './MobileApp';import { Mcp } from './Mcp';import { Appearance } from './Appearance';@@ -16,12 +14,13 @@ import { Team } from './Team';import { registerHotkey, useHotkeyDOMScope } from '@core/hotkey/hotkeys';import type { ValidHotkey } from '@core/hotkey/types';import { SplitHeaderLeft, SplitHeaderRight } from '../split-layout/components/SplitHeader';+import { CollapsibleHeaderItem } from '../split-layout/components/CollapsibleHeaderItem';import { SettingsButton } from './SettingsButton';import { isTouchDevice } from '@core/mobile/isTouchDevice';+import { DropdownMenu } from '@kobalte/core/dropdown-menu';+import { Layer } from '@ui';+import ChevronDownIcon from '@icon/regular/caret-down.svg';-/**- * Wrapper for Settings Panel used in the split layout. Includes the correct Header button.- */export function SettingsPanelComponentWrapper() {return (<>@@ -189,11 +188,25 @@ export function SettingsPanel(props: SettingsPanelProps) {Settings</h1><Show when={!isMobile()}>- <Tabs- list={settingsTabs()}- value={activeTabId()}- defaultValue="Appearance"- onChange={handleTabChange}+ <CollapsibleHeaderItem+ id="settings-tabs"+ priority={1}+ containerClass="h-full"+ expanded={() => (+ <Tabs+ list={settingsTabs()}+ value={activeTabId()}+ defaultValue="Appearance"+ onChange={handleTabChange}+ />+ )}+ collapsed={() => (+ <CollapsedSettingsTabs+ tabs={settingsTabs()}+ value={activeTabId()}+ onChange={handleTabChange}+ />+ )}/></Show></div>@@ -231,3 +244,46 @@ export function SettingsPanel(props: SettingsPanelProps) {</div>);}++type CollapsedSettingsTabsProps = {+ tabs: { value: string; label: string }[];+ value: string;+ onChange: (value: string) => void;+};++function CollapsedSettingsTabs(props: CollapsedSettingsTabsProps) {+ const activeLabel = createMemo(() => {+ return (+ props.tabs.find((item) => item.value === props.value)?.label ??+ props.tabs[0]?.label+ );+ });++ return (+ <DropdownMenu placement="bottom-start" gutter={4}>+ <DropdownMenu.Trigger class="flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-xs border border-edge-muted hover:bg-ink/6 transition-colors">+ <span class="truncate">{activeLabel()}</span>+ <ChevronDownIcon class="size-3 shrink-0" />+ </DropdownMenu.Trigger>+ <DropdownMenu.Portal>+ <Layer depth={2}>+ <DropdownMenu.Content class="z-action-menu bg-page border border-edge-muted rounded-sm shadow-sm p-1">+ <For each={props.tabs}>+ {(item) => (+ <DropdownMenu.Item+ class="w-full px-2 py-1.5 text-left text-xs transition-colors hover:bg-ink/5 focus:bg-ink/5 outline-none cursor-default rounded-md"+ classList={{+ 'font-semibold': props.value === item.value,+ }}+ onSelect={() => props.onChange(item.value)}+ >+ {item.label}+ </DropdownMenu.Item>+ )}+ </For>+ </DropdownMenu.Content>+ </Layer>+ </DropdownMenu.Portal>+ </DropdownMenu>+ );+}diff --git a/js/app/packages/channel/Call/CallOverlay.tsx b/js/app/packages/channel/Call/CallOverlay.tsxindex e527b2f873..18b84b779a 100644--- a/js/app/packages/channel/Call/CallOverlay.tsx+++ b/js/app/packages/channel/Call/CallOverlay.tsx@@ -14,7 +14,7 @@ function VideoTag(props: {return (<divclass={cn(- 'absolute bottom-1 left-1 px-1.5 py-0.5 rounded bg-surface-0/70 text-ink text-xs',+ 'absolute bottom-1 left-1 px-1.5 py-0.5 rounded bg-panel/70 text-ink text-xs',props.variant === 'truncated' ? 'truncate max-w-[80%]' : '',props.class)}@@ -179,7 +179,7 @@ export function CallOverlay(props: { onLeave: () => void }) {</Show><Show when={isConnecting()} fallback={<VideoTag>You</VideoTag>}>- <div class="absolute bottom-1 left-1 px-1.5 py-0.5 rounded bg-surface-0/70 text-ink-muted text-xs">+ <div class="absolute bottom-1 left-1 px-1.5 py-0.5 rounded bg-panel/70 text-ink-muted text-xs">Connecting...</div></Show>