Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(mobile): show selection in ink instead of accent (#8957)

Peter Chinman55e4ae351925
diff --git a/.agents/rules/web/mobile.md b/.agents/rules/web/mobile.md
index 2890b33718..43775596cd 100644
--- a/.agents/rules/web/mobile.md
+++ b/.agents/rules/web/mobile.md
@@ -106,6 +106,10 @@ read their code, and follow that pattern rather than inventing a new one.
`FloatRegionOrInline` with `px-(--mobile-chrome-gutter)` and
`pointer-events-auto`. Style it with `island` / `glass`, size it with the
px `--mobile-chrome-*` tokens (not rem), and pass Button a `depth`.
+- Mark selection with `ink`, never `accent`: a selected pill is `bg-ink
+ text-surface`, a selected dock button or drawer row stays at full ink while
+ its siblings dim (`text-ink-extra-muted`, `aria-current="page"`). Keep the
+ accent for attention — unread dots and filter counts.
- Phones show one pane: open in place or as a front pane, never a new
split. Desktop-only layouts fall back (board to list) and update the URL.
- Suspense wraps content, never the router or chrome, with `ContentLoading`
diff --git a/apps/web/src/components/app/mobile/MobileDockButton.tsx b/apps/web/src/components/app/mobile/MobileDockButton.tsx
index 751bd8021e..6ac3716732 100644
--- a/apps/web/src/components/app/mobile/MobileDockButton.tsx
+++ b/apps/web/src/components/app/mobile/MobileDockButton.tsx
@@ -14,6 +14,12 @@ type MobileDockButtonProps = Omit<ComponentProps<'button'>, 'children'> & {
icon: MobileDockIcon;
/** Accessible name for the icon-only button. */
ariaLabel: string;
+ /**
+ * Pass this only on buttons that can be selected: selection reads as full
+ * ink against muted siblings, so an explicitly unselected button dims.
+ * Buttons that are always actions (Search) leave it unset and stay at full
+ * ink.
+ */
active?: boolean;
unread?: boolean;
iconClass?: string;
@@ -41,7 +47,7 @@ export function MobileDockButton(props: MobileDockButtonProps) {
data-unread={local.unread ? '' : undefined}
class={cn(
'relative flex size-(--mobile-chrome-button-size) shrink-0 items-center justify-center rounded-full',
- local.active && 'text-accent',
+ local.active === false && 'text-ink-extra-muted',
local.class
)}
{...rest}
diff --git a/apps/web/src/components/app/mobile/MobileDockRow.tsx b/apps/web/src/components/app/mobile/MobileDockRow.tsx
index 3615f06692..9998b3f67b 100644
--- a/apps/web/src/components/app/mobile/MobileDockRow.tsx
+++ b/apps/web/src/components/app/mobile/MobileDockRow.tsx
@@ -67,6 +67,11 @@ function MoreViewsDrawer(props: {
as={MobileDockButton}
ariaLabel={t('mobile.moreViews')}
icon={CaretUpIcon}
+ // More stands in for the destinations it hides, so it carries the
+ // selected state while the foreground view is one of them.
+ active={props.views
+ .slice(props.visibleCount)
+ .some((view) => props.isActive(view.id))}
unread={props.views
.slice(props.visibleCount)
.some((view) => props.hasUnread(view.id))}
@@ -88,7 +93,7 @@ function MoreViewsDrawer(props: {
<MobileDrawer.Close
as={MobileDrawer.Item}
aria-label={t('nav.settings')}
- class={settingsOpen() ? 'text-accent' : undefined}
+ aria-current={settingsOpen() ? 'page' : undefined}
onClick={() => {
toggleSettings();
}}
@@ -118,9 +123,6 @@ function MoreViewsDrawer(props: {
: undefined
}
data-unread={props.hasUnread(view.id) ? '' : undefined}
- class={
- props.isActive(view.id) ? 'text-accent' : undefined
- }
aria-current={
props.isActive(view.id) ? 'page' : undefined
}
@@ -174,7 +176,8 @@ function MoreViewsDrawer(props: {
* The navigation dock groups as many fixed-size view buttons as fit with More,
* with Search on its own island.
* Pressing Search flips the row to the search
- * layout (see MobileDockRow); the current view's button shows in accent.
+ * layout (see MobileDockRow); the current view's button stays at full ink
+ * while the rest dim.
*/
function MobileNavigationDockRow() {
const navigate = useMobileNavNavigate();
diff --git a/apps/web/src/components/app/mobile/MobileDrawer.tsx b/apps/web/src/components/app/mobile/MobileDrawer.tsx
index 18098bd4e0..68bf9fdf7d 100644
--- a/apps/web/src/components/app/mobile/MobileDrawer.tsx
+++ b/apps/web/src/components/app/mobile/MobileDrawer.tsx
@@ -120,7 +120,7 @@ function MobileDrawerItem(props: ComponentProps<'button'>) {
<button
type="button"
class={cn(
- 'flex min-h-11 w-full items-center gap-3 rounded-[20px] px-3 py-2.5 text-left text-sm text-ink transition-colors hover:bg-ink/6 active:bg-ink/10 aria-checked:bg-ink/8 aria-pressed:bg-ink/8 aria-[checked=mixed]:bg-ink/8 focus-visible:outline-2 focus-visible:outline-accent disabled:opacity-40',
+ 'flex min-h-11 w-full items-center gap-3 rounded-[20px] px-3 py-2.5 text-left text-sm text-ink transition-colors hover:bg-ink/6 active:bg-ink/10 aria-checked:bg-ink/8 aria-pressed:bg-ink/8 aria-[checked=mixed]:bg-ink/8 aria-[current=page]:bg-ink/8 aria-[current=page]:font-medium focus-visible:outline-2 focus-visible:outline-accent disabled:opacity-40',
local.class
)}
{...rest}
diff --git a/apps/web/src/components/app/mobile/PillTabs.tsx b/apps/web/src/components/app/mobile/PillTabs.tsx
index 2cb80a080b..887e3d178d 100644
--- a/apps/web/src/components/app/mobile/PillTabs.tsx
+++ b/apps/web/src/components/app/mobile/PillTabs.tsx
@@ -121,9 +121,7 @@ export function PillButton(
class={cn(
PILL_CLASS,
local.iconOnly && ICON_PILL_CLASS,
- local.active
- ? 'bg-accent text-surface'
- : 'bg-chrome text-ink-extra-muted',
+ local.active ? 'bg-ink text-surface' : 'bg-chrome text-ink-extra-muted',
local.class
)}
{...rest}
@@ -489,11 +487,6 @@ function MenuOverflowPillTabs<T extends string>(props: PillTabsProps<T>) {
// Let text tabs name themselves instead of Close's default label.
aria-label={item.ariaLabel ?? ''}
aria-pressed={props.value === item.value}
- class={
- props.value === item.value
- ? 'text-accent'
- : undefined
- }
onClick={() => {
props.onChange(item.value);
}}
diff --git a/apps/web/src/components/view-shell/MobileFilterDrawer.tsx b/apps/web/src/components/view-shell/MobileFilterDrawer.tsx
index 3dc817bc7c..61077bf0ac 100644
--- a/apps/web/src/components/view-shell/MobileFilterDrawer.tsx
+++ b/apps/web/src/components/view-shell/MobileFilterDrawer.tsx
@@ -251,7 +251,7 @@ function Option(props: {
<span class="min-w-0 flex-1 truncate">{props.children}</span>
<span class="flex size-5 shrink-0 items-center justify-center">
<Show when={props.checked}>
- <CheckIcon class="size-4 text-accent" />
+ <CheckIcon class="size-4 text-ink" />
</Show>
</span>
</MobileDrawer.Item>
diff --git a/docs/agent-guide/navigation.md b/docs/agent-guide/navigation.md
index b0280a2fa5..daa41db743 100644
--- a/docs/agent-guide/navigation.md
+++ b/docs/agent-guide/navigation.md
@@ -867,6 +867,11 @@ in its own island at the right edge and opens the persistent Search… input and
entity category pills (see [Search](search.md)). Once every view fits, the
navigation island stops growing.
+The current view's button is full ink while the rest of the island dims; views
+with a filled glyph also swap to it. More carries that selected state while the
+open view is one of the destinations it hides, so the island always shows where
+you are. Search, on its own island, stays an action at full ink.
+
Notifications, Email, and Channels use the same reactive unread-presence checks
as the desktop sidebar, via `useNavigationUnread`. Their accent dots clear when
the represented items are read or completed, not merely when opening a view.
diff --git a/docs/agent-guide/ui-conventions.md b/docs/agent-guide/ui-conventions.md
index 288e6fbe31..03f302b854 100644
--- a/docs/agent-guide/ui-conventions.md
+++ b/docs/agent-guide/ui-conventions.md
@@ -73,6 +73,11 @@ gradients, or shadows. Buttons use variant-specific pressed fills. Wrapping
preset choices can remain separate pills. Keep each surface's existing touch
treatment and the agent composer's sliding track (`variant="track"`).
+Mobile chrome marks selection in ink, never the accent: the selected pill tab
+fills with ink, the current dock icon and drawer row stay at full ink while
+their siblings dim, and a checked filter option gets an ink check. The accent
+stays for attention — unread dots and filter counts.
+
Reuse `Button`, `Input`, `InputGroup`, `Tabs`, `ComposerSurface`, `menu-surface`, and
`elevated-surface` instead of introducing one-off surface styling. Every menu,
popover, floating toolbar, and editor panel (including the Figma, PowerPoint,