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(style): update top level sidebar command icons (#3420)

Aidan Holloway-Bidwellb8e5bcd13f65
diff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsx
index 11c556aa2d..05936d6c7b 100644
--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx
+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx
@@ -29,9 +29,11 @@ import { type HotkeyToken, TOKENS } from '@core/hotkey/tokens';
import type { ValidHotkey } from '@core/hotkey/types';
import { activateClosestDOMScope } from '@core/hotkey/utils';
import LogoIcon from '@icon/macro-logo.svg';
+import SquareSidebarIcon from '@icon/square-sidebar.svg';
import { AnimatedCallIcon } from '@icon/wide-call';
import { AnimatedChannelIcon } from '@icon/wide-channel';
import { AnimatedCommandIcon } from '@icon/wide-command';
+import CommandKIcon from '@icon/wide-command-k.svg';
import { AnimatedEmailIcon } from '@icon/wide-email';
import { AnimatedFileMdIcon } from '@icon/wide-fileMd';
import { AnimatedFolderIcon } from '@icon/wide-folder';
@@ -39,7 +41,6 @@ import { AnimatedInboxIcon } from '@icon/wide-inbox';
import { AnimatedNewSplitIcon } from '@icon/wide-newSplit';
import { AnimatedPlusIcon } from '@icon/wide-plus';
import { AnimatedSearchIcon } from '@icon/wide-search';
-import { AnimatedSidebarIcon } from '@icon/wide-sidebar';
import { AnimatedStarIcon } from '@icon/wide-star';
import { AnimatedTaskIcon } from '@icon/wide-task';
import { ContextMenu } from '@kobalte/core/context-menu';
@@ -561,8 +562,6 @@ export const AppSidebar = (props: AppSidebarProps) => {
getShell: () => sidebarShell,
});
- const [sidebarBtnHovering, setSidebarBtnHovering] = createSignal(false);
-
registerSidebarHotkeys({
links: visibleLinks(),
hotkeyVisible,
@@ -591,12 +590,12 @@ export const AppSidebar = (props: AppSidebarProps) => {
data-slim={isSlim()}
style={{ transition: SIDEBAR_MAX_WIDTH_TRANSITION_STYLE }}
>
- <div class="flex items-center justify-between p-2 relative">
- <div class="flex items-center group/logo-area w-full">
+ <div class="flex items-center justify-between p-2 relative group-data-[slim=true]/sidebar:pr-2.25">
+ <div class="flex items-center group/logo-area w-full group-data-[slim=true]/sidebar:justify-end">
<div class="text-accent group-data-[slim=true]/sidebar:opacity-0 group-data-[slim=true]/sidebar:max-w-0 min-w-0 pl-1 group-data-[slim=true]/sidebar:pl-0">
<LogoIcon class="size-6" />
</div>
- <div class="grow shrink-10 min-w-0" />
+ <div class="grow shrink-10 min-w-0 group-data-[slim=true]/sidebar:hidden" />
<Show when={isExpanded()}>
<div class="flex items-center gap-1 mr-1">
<Show when={showEnableNotifications()}>
@@ -623,12 +622,12 @@ export const AppSidebar = (props: AppSidebarProps) => {
hotkey={TOKENS.global.commandMenu}
onClick={handleCommandPaletteClick}
>
- <AnimatedCommandIcon />
+ <CommandKIcon />
</Button>
</div>
</Show>
<Button
- class="flex items-center justify-center rounded-xs p-0.5 px-2 bg-surface [&_svg]:size-4"
+ class="size-7 rounded-xs p-1 [&_svg]:size-4"
onMouseDown={(e) => {
if (e.button !== 0) return;
e.preventDefault();
@@ -637,12 +636,10 @@ export const AppSidebar = (props: AppSidebarProps) => {
handleSidebarOpenChange(!isExpanded());
globalSplitManager()?.returnFocus();
}}
- onMouseEnter={() => setSidebarBtnHovering(true)}
- onMouseLeave={() => setSidebarBtnHovering(false)}
label={isExpanded() ? 'Shrink Sidebar' : 'Expand Sidebar'}
hotkey={TOKENS.global.toggleSidebar}
>
- <AnimatedSidebarIcon triggerAnimation={sidebarBtnHovering()} />
+ <SquareSidebarIcon />
</Button>
</div>
</div>
diff --git a/js/app/packages/icon/square-sidebar.svg b/js/app/packages/icon/square-sidebar.svg
new file mode 100644
index 0000000000..8f009a6e20
--- /dev/null
+++ b/js/app/packages/icon/square-sidebar.svg
@@ -0,0 +1,11 @@
+<svg width="100%" height="100%" viewBox="-1.5 -1.5 18 18" fill="currentColor" stroke="none" xmlns="http://www.w3.org/2000/svg" overflow="visible">
+<defs>
+<mask id="square-sidebar-notch" maskUnits="userSpaceOnUse">
+<rect x="-10" y="-10" width="100" height="100" fill="white"/>
+<rect fill="black" x="-0.5" y="-0.5" width="2" height="2"/>
+<rect fill="black" x="13.5" y="13.5" width="2" height="2"/>
+</mask>
+</defs>
+<rect x="0.75" y="0.75" width="13.5" height="13.5" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" mask="url(#square-sidebar-notch)"/>
+<rect x="4.5" y="0.75" width="1.5" height="13.5"/>
+</svg>
diff --git a/js/app/packages/icon/wide-command-k.svg b/js/app/packages/icon/wide-command-k.svg
new file mode 100644
index 0000000000..5f3c744ffe
--- /dev/null
+++ b/js/app/packages/icon/wide-command-k.svg
@@ -0,0 +1,4 @@
+<svg width="100%" height="100%" viewBox="-1.5 -1.88 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+<polyline points="0.75 0.75 6.75 6.75 0.75 12.75" stroke-linecap="round"/>
+<line x1="6" y1="13.49" x2="15" y2="13.49"/>
+</svg>