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
style(nits): launcher, sidebar, topbar button lightness, modal overlay (#3291)
Seamusf0f6f5846e72
diff --git a/js/app/packages/app/component/ChatWithAgentButton.tsx b/js/app/packages/app/component/ChatWithAgentButton.tsxindex 85343f8522..ed7c1d3f20 100644--- a/js/app/packages/app/component/ChatWithAgentButton.tsx+++ b/js/app/packages/app/component/ChatWithAgentButton.tsx@@ -96,7 +96,7 @@ export function ChatWithAgentButton(props: { entity: ChatWithAgentEntity }) {onMouseLeave={() => setHovering(false)}onClick={() => openChatWithAgent(props.entity)}depth={2}- class="bg-surface text-ink-muted"+ class="bg-surface"><AnimatedStarIcon triggerAnimation={hovering()} /><span class="text-xs">Chat</span>diff --git a/js/app/packages/app/component/Launcher.tsx b/js/app/packages/app/component/Launcher.tsxindex b80ae3fb51..2027c3a93e 100644--- a/js/app/packages/app/component/Launcher.tsx+++ b/js/app/packages/app/component/Launcher.tsx@@ -23,6 +23,7 @@ import {} from '@core/util/create';import { createControlledOpenSignal } from '@core/util/createControlledOpenSignal';import { isErr, ok } from '@core/util/maybeResult';+import ArrowRight from '@icon/bold/arrow-right-bold.svg';import { Dialog } from '@kobalte/core/dialog';import { AnimatedChatIcon } from '@macro-icons/wide/animating/chat';import { AnimatedDiagramIcon } from '@macro-icons/wide/animating/diagram';@@ -40,9 +41,9 @@ import WideFileMd from '@macro-icons/wide/file-md.svg';import WideFolder from '@macro-icons/wide/folder.svg';import WideStar from '@macro-icons/wide/star.svg';import WideTask from '@macro-icons/wide/task.svg';-import PixelArrowRight from '@phosphor-icons/core/regular/dice-five.svg?component-solid';import { createProject } from '@queries/storage/projects';import { cn, Hotkey, Layer } from '@ui';+import { getNormalizedKeyString } from '@ui/components/Hotkey';import {type Component,createEffect,@@ -389,10 +390,10 @@ const LauncherMenuItem = (props: LauncherMenuItemProps) => {<Layer depth={4}><buttonclass={cn(- 'size-28 shadow-md shadow-drop-shadow relative flex flex-col sm:gap-4 gap-2 items-center isolate justify-center bg-surface ring ring-edge transition-transform ease-click duration-200 rounded-sm',+ 'size-28 shadow-sm shadow-drop-shadow relative flex flex-col sm:gap-4 gap-2 items-center isolate justify-center bg-surface ring ring-edge transition-transform ease-click duration-200 rounded-sm',`create-menu-${props.creatableBlock.label.toLowerCase()}`,{- '-translate-y-2 text-ink ring-2': props.focused,+ '-translate-y-2 text-ink': props.focused,'text-ink-extra-muted': !props.focused,})}@@ -419,8 +420,16 @@ const LauncherMenuItem = (props: LauncherMenuItemProps) => {<div class="w-full py-1 px-2 absolute bottom-0 flex flex-row justify-between items-center z-user-highlight"><div class="text-sm font-bold">{props.creatableBlock.label}</div>- <div class="size-3">- <PixelArrowRight />+ <div+ class={cn(+ 'size-3 transition-[transform,opacity] ease duration-200',+ {+ 'opacity-100': props.focused,+ 'opacity-0': !props.focused,+ }+ )}+ >+ <ArrowRight /></div></div>@@ -681,13 +690,13 @@ export const LauncherInner = (props: LauncherInnerProps) => {/><spanclass={cn(- 'ring text-xs transition-colors duration-150',+ 'ring text-xs px-1.5 py-0.5 rounded-sm transition-colors duration-150',shiftHeld()? 'ring-accent text-accent bg-accent/10': 'ring-edge-muted')}>- <Hotkey shortcut="shift" />+ {getNormalizedKeyString({ shortcut: 'shift' })}</span></span>to launch in new splitdiff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsxindex 6700c6dc4f..20dee3b54c 100644--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx@@ -399,7 +399,9 @@ const SidebarActionButton = (props: SidebarActionButtonProps) => {return (<Button- class="flex items-center justify-start group-data-[slim=true]/sidebar:justify-center text-sm gap-2 cursor-default w-full rounded-xs py-1"+ class={cn(+ 'flex items-center justify-start group-data-[slim=true]/sidebar:justify-center text-sm gap-2 cursor-default w-full rounded-sm py-1 text-ink-extra-muted not-disabled:hover:bg-ink/3'+ )}variant="ghost"tooltipPlacement="right"label={props.isSlim() ? props.label : undefined}diff --git a/js/app/packages/app/index.css b/js/app/packages/app/index.cssindex 370f1da6a2..227e373481 100644--- a/js/app/packages/app/index.css+++ b/js/app/packages/app/index.css@@ -109,7 +109,7 @@--color-message: color-mix(in oklch, var(--b1) 50%, var(--b2));--color-hover: var(--b2);--color-active: var(--b1);- --color-overlay: oklch(var(--b2) / 0.5);+ --color-overlay: oklch(var(--b1l) var(--b1c) var(--b1h) / 0.8);--color-edge-muted: var(--b3);--color-edge: var(--b4);--color-rail: color-mix(in oklch, var(--b4) 90%, var(--b0));diff --git a/js/app/packages/block-md/component/DispatchAgentMenu.tsx b/js/app/packages/block-md/component/DispatchAgentMenu.tsxindex 595e275b80..c0a7a709ca 100644--- a/js/app/packages/block-md/component/DispatchAgentMenu.tsx+++ b/js/app/packages/block-md/component/DispatchAgentMenu.tsx@@ -193,24 +193,15 @@ export function DispatchAgentButton() {return (<DropdownMenu open={open()} onOpenChange={setOpen}>- <ButtonGroup- variant="base"- size="icon-sm"- depth={2}- class="bg-surface text-ink-muted"- >- <Button- onClick={handlePrimaryClick}- tooltip={lastUsed().name}- class="text-ink-muted"- >+ <ButtonGroup variant="base" size="icon-sm" depth={2} class="bg-surface">+ <Button onClick={handlePrimaryClick} tooltip={lastUsed().name}><Dynamiccomponent={lastUsed().buttonIcon ?? lastUsed().icon}class="size-3!"/></Button><ButtonGroup.Divider />- <DropdownMenu.Trigger as={Button} class="p-1 text-ink-muted">+ <DropdownMenu.Trigger as={Button} class="p-1"><CaretDown class="size-3.5!" /></DropdownMenu.Trigger></ButtonGroup>diff --git a/js/app/packages/core/component/Toast/ToastRegion.tsx b/js/app/packages/core/component/Toast/ToastRegion.tsxindex a39af7e4e4..ba2e4f57a1 100644--- a/js/app/packages/core/component/Toast/ToastRegion.tsx+++ b/js/app/packages/core/component/Toast/ToastRegion.tsx@@ -4,7 +4,7 @@ import { Portal } from 'solid-js/web';export function ToastRegion() {return (<Portal>- <div class="fixed bottom-23.5 sm:bottom-12 right-0 m-0 list-none outline-none pointer-events-none z-toast-region">+ <div class="fixed bottom-2 right-2 m-0 list-none outline-none pointer-events-none z-toast-region"><Toast.RegionregionId="toast-region"duration={Infinity}diff --git a/js/app/packages/core/component/TopBar/ShareButton.tsx b/js/app/packages/core/component/TopBar/ShareButton.tsxindex 75bdd9a66b..56382020c1 100644--- a/js/app/packages/core/component/TopBar/ShareButton.tsx+++ b/js/app/packages/core/component/TopBar/ShareButton.tsx@@ -1277,7 +1277,6 @@ export function ShareTrigger(props: { copyLink?: () => void }) {shareCtx.open();}}}- class="text-ink-muted"><IconShared />Share@@ -1290,7 +1289,6 @@ export function ShareTrigger(props: { copyLink?: () => void }) {tooltip="Copy Share Link"size="icon-sm"onClick={ShareLinkAction().action}- class="text-ink-muted"><Dynamic component={ShareLinkAction().icon} class="size-3.5!" /></Button>diff --git a/js/app/packages/ui/components/Button.tsx b/js/app/packages/ui/components/Button.tsxindex 745436c501..2a3c761c89 100644--- a/js/app/packages/ui/components/Button.tsx+++ b/js/app/packages/ui/components/Button.tsx@@ -76,19 +76,27 @@ export const Button = (props: ButtonProps) => {const tooltipLabel = () => local.label ?? local.tooltip;+ // Skip Layer when inside a ButtonGroup (the group already provides one)+ // unless the button has its own explicit depth+ const skipLayer = () => group !== undefined && local.depth === undefined;++ const content = () => (+ <Show when={tooltipLabel() !== undefined ? tooltipLabel() : false} fallback={button()}>+ {(label) => (+ <Tooltip+ hotkey={local.hotkey}+ placement={placement()}+ label={label()}+ >+ {button()}+ </Tooltip>+ )}+ </Show>+ );+return (- <Layer depth={local.depth ?? 0}>- <Show when={tooltipLabel() !== undefined ? tooltipLabel() : false} fallback={button()}>- {(label) => (- <Tooltip- hotkey={local.hotkey}- placement={placement()}- label={label()}- >- {button()}- </Tooltip>- )}- </Show>- </Layer>+ <Show when={skipLayer()} fallback={<Layer depth={local.depth ?? 0}>{content()}</Layer>}>+ {content()}+ </Show>);};diff --git a/js/app/packages/ui/components/Hotkey.tsx b/js/app/packages/ui/components/Hotkey.tsxindex c8a899edee..cae2073d3b 100644--- a/js/app/packages/ui/components/Hotkey.tsx+++ b/js/app/packages/ui/components/Hotkey.tsx@@ -119,6 +119,44 @@ interface HotkeyProps extends JSX.HTMLAttributes<HTMLDivElement> {* @example* <Hotkey token={TOKENS.canvas.cut} />*/+/**+ * Returns the hotkey as a plain string, handling the same props as Hotkey.+ * @param props.token - The hotkey registry token to get the string for.+ * @param props.shortcut - Or a direct shortcut string.+ * @param props.lowercase - Whether to lowercase the key.+ * @param props.showPlus - Whether to include '+' between parts.+ * @example+ * getNormalizedKeyString({ token: TOKENS.canvas.cut }) // "⌘X"+ * getNormalizedKeyString({ shortcut: 'meta+shift+k', showPlus: true }) // "⌘ + ⇧ + K"+ */+export function getNormalizedKeyString(props: Pick<HotkeyProps, 'token' | 'shortcut' | 'lowercase' | 'showPlus'>): string {+ const resolvedShortcut = props.token ? getPrettyHotkeyStringByToken(props.token) : props.shortcut;++ if (!resolvedShortcut) return '';++ const hotkey = breakApartHotkeyString(resolvedShortcut);++ const normalizedKey = props.lowercase+ ? typeof hotkey.key === 'string'+ ? hotkey.key.toLowerCase()+ : hotkey.key.map((k) => k.toLowerCase())+ : typeof hotkey.key === 'string'+ ? hotkey.key.toUpperCase()+ : hotkey.key.map((k) => k.toUpperCase());++ const modifierStrings = hotkey.modifiers.map(+ (mod) => modifierMap[mod as keyof typeof modifierMap] || mod+ );++ const keyStrings = typeof normalizedKey === 'string'+ ? (normalizedKey ? [normalizedKey] : [])+ : normalizedKey;++ const separator = props.showPlus ? ' + ' : '';++ return [...modifierStrings, ...keyStrings].join(separator);+}+export function Hotkey(props: HotkeyProps){const [local, rest] = splitProps(props, ['lowercase',