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.

style(hotkeys): unify hotkey styling in tooltips and dock (#237)

Seamus7fd91d3f2152
diff --git a/js/app/packages/app/component/dock/Dock.tsx b/js/app/packages/app/component/dock/Dock.tsx
index c9b7e2328e..64a7ee8940 100644
--- a/js/app/packages/app/component/dock/Dock.tsx
+++ b/js/app/packages/app/component/dock/Dock.tsx
@@ -3,7 +3,7 @@ import { GlobalNotificationBell } from '@core/component/GlobalNotificationBell';
import { createMemo, createSignal, onCleanup, onMount, Show } from 'solid-js';
import { isRightPanelOpen, useToggleRightPanel } from '@core/signal/layout';
import { ENABLE_DOCK_NOTITIFCATIONS } from '@core/constant/featureFlags';
-import { /* Hotkey, */ BasicHotkey } from '@core/component/Hotkey';
+import { Hotkey } from '@core/component/Hotkey';
import { activeScope, hotkeyScopeTree } from '@core/hotkey/state';
import SplitIcon from '@icon/regular/square-split-horizontal.svg';
import { useGlobalNotificationSource } from '../GlobalAppState';
@@ -206,8 +206,8 @@ export function Dock(){
}}>
<Hotkey token={TOKENS.global.createCommand}/>
</div>*/}
- <div class="**:border-none! flex size-full">
- <BasicHotkey shortcut="cmd+k" />
+ <div class="**:border-none! flex border border-edge-muted text-[0.625rem] rounded-xs items-center px-1.5 py-0.25">
+ <Hotkey shortcut="cmd+k" class="flex gap-1" />
</div>
</div>
@@ -244,8 +244,8 @@ export function Dock(){
}}>
<Hotkey token={TOKENS.global.commandMenu}/>
</div>*/}
- <div class="**:border-none! flex size-full">
- <BasicHotkey shortcut="c" />
+ <div class="**:border-none! flex border border-edge-muted text-[0.625rem] rounded-xs items-center px-1.5 py-0.25">
+ <Hotkey shortcut="c" />
</div>
</div>
</div>
diff --git a/js/app/packages/core/component/Tooltip.tsx b/js/app/packages/core/component/Tooltip.tsx
index a5e72bb050..267d7e12a2 100644
--- a/js/app/packages/core/component/Tooltip.tsx
+++ b/js/app/packages/core/component/Tooltip.tsx
@@ -2,7 +2,7 @@ import type { HotkeyToken } from '@core/hotkey/tokens';
import CorvuTooltip, { type FloatingOptions } from '@corvu/tooltip';
import type { Placement } from '@floating-ui/dom';
import { type JSX, mergeProps, type ParentProps, Show } from 'solid-js';
-import { BasicHotkey } from './Hotkey';
+import { Hotkey } from './Hotkey';
const TOOLTIP_DELAY = 250;
@@ -112,10 +112,10 @@ export function LabelAndHotKey(props: LabelAndHotKeyProps) {
>
<div class="text-xs capitalize">{props.label}</div>
<Show when={props.hotkeyToken || props.shortcut}>
- <div class="text-[0.625rem] text-page ml-auto">
+ <div class="text-[0.625rem] text-page ml-auto border border-edge-muted/30 px-1.5 py-0.25 rounded-xs">
{props.hotkeyToken
- ? BasicHotkey({ token: props.hotkeyToken })
- : BasicHotkey({ shortcut: props.shortcut })}
+ ? Hotkey({ token: props.hotkeyToken, class: 'flex gap-1' })
+ : Hotkey({ shortcut: props.shortcut, class: 'flex gap-1' })}
</div>
</Show>
</div>