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(icon): Update create icon, email icon, and search icon (#1896)
Aidan Holloway-Bidwell7c404c5b2ea6
diff --git a/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx b/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsxindex ae3fda00e1..39e69b5c60 100644--- a/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx+++ b/js/app/packages/app/component/app-sidebar/channels-unread-widget.tsx@@ -9,10 +9,7 @@ import {on,onMount,} from 'solid-js';-import {- EntityIcon,- type EntityWithValidIcon,-} from '@core/component/EntityIcon';+import ChannelIcon from '@macro-icons/wide/channel.svg?component-solid';import { UserIcon } from '@core/component/UserIcon';import {isChannelNotification,@@ -149,12 +146,9 @@ function ChannelGroupItem(props: { group: ChannelGroup; animate?: boolean }) {<Showwhen={props.group.isDM && props.group.latestSenderId}fallback={- <EntityIcon- targetType={- (props.group.channelType ?? 'channel') as EntityWithValidIcon- }- size="xs"- />+ <div class="size-4 text-ink-muted">+ <ChannelIcon />+ </div>}><UserIcondiff --git a/js/app/packages/app/component/app-sidebar/sidebar.tsx b/js/app/packages/app/component/app-sidebar/sidebar.tsxindex ef1764f0e6..15badcf98e 100644--- a/js/app/packages/app/component/app-sidebar/sidebar.tsx+++ b/js/app/packages/app/component/app-sidebar/sidebar.tsx@@ -10,9 +10,9 @@ import { AnimatedFolderIcon } from '@macro-icons/wide/animating/folder';import { AnimatedInboxIcon } from '@macro-icons/wide/animating/inbox';import { AnimatedSearchIcon } from '@macro-icons/wide/animating/search';import { AnimatedSidebarIcon } from '@macro-icons/wide/animating/sidebar';+import { AnimatedPlusIcon } from '@macro-icons/wide/animating/plus';import { useLocation } from '@solidjs/router';import LogoIcon from '@macro-icons/macro-logo.svg';-import PlusIcon from '@phosphor-icons/core/bold/plus-bold.svg?component-solid';import CommandIcon from '@phosphor-icons/core/assets/regular/command.svg';import { LIST_VIEW_PATHS, type ListView } from '@app/constants/list-views';import { LabelAndHotKey } from '@core/component/Tooltip';@@ -192,6 +192,7 @@ export const AppSidebar = (props: AppSidebarProps) => {const isSlim = () => props.sidebarState === 'slim';registerHotkeys();const [sidebarBtnHovering, setSidebarBtnHovering] = createSignal(false);+ const [createBtnHovering, setCreateBtnHovering] = createSignal(false);return (<div@@ -280,8 +281,14 @@ export const AppSidebar = (props: AppSidebarProps) => {/>}onClick={handleCreateClick}+ onMouseEnter={() => setCreateBtnHovering(true)}+ onMouseLeave={() => setCreateBtnHovering(false)}>- <PlusIcon class="size-4 shrink-0" />+ <div+ class={`size-4 shrink-0 transition-colors duration-300 ${createBtnHovering() ? 'text-accent' : ''}`}+ >+ <AnimatedPlusIcon triggerAnimation={createBtnHovering()} />+ </div><span class="whitespace-nowrap group-data-[slim=true]/sidebar:invisible">Create</span>diff --git a/js/app/packages/core/internal/IconGallery.tsx b/js/app/packages/core/internal/IconGallery.tsxindex 3b5465aeca..6ca9c10802 100644--- a/js/app/packages/core/internal/IconGallery.tsx+++ b/js/app/packages/core/internal/IconGallery.tsx@@ -322,7 +322,7 @@ export default function IconGallery() {><pair.static /></div>- <span class="text-[8px] text-muted">static</span>+ <span class="mt-2 text-[8px] text-muted">static</span></div>{/* Animated version */}<div class="flex flex-col items-center">@@ -333,18 +333,29 @@ export default function IconGallery() {width: `${iconSize()}px`,height: `${iconSize()}px`,}}- onClick={() => triggerAnimation(pair.name)}- title="Click to animate"+ onMouseEnter={() =>+ setAnimationTriggers((prev) => ({+ ...prev,+ [pair.name]: true,+ }))+ }+ onMouseLeave={() =>+ setAnimationTriggers((prev) => ({+ ...prev,+ [pair.name]: false,+ }))+ }+ title="Hover to animate"><pair.animatedtriggerAnimation={animationTriggers()[pair.name]}/></div>- <div class="flex items-center gap-1">+ <div class="mt-2 flex items-center gap-1"><span class="text-[8px] text-muted">animated</span><buttononClick={() => triggerAnimation(pair.name)}- class="flex h-2.5 w-2.5 cursor-pointer items-center justify-center rounded-full border border-current text-muted hover:text-ink"+ class="flex h-2.5 w-2.5 cursor-pointer items-center justify-center rounded-full border border-current text-muted transition-colors hover:bg-ink/10 hover:text-ink"title="Play animation"><svg@@ -383,7 +394,7 @@ export default function IconGallery() {><icon.component /></div>- <span class="mt-1.5 text-[8px] text-muted">{icon.name}</span>+ <span class="mt-2 text-[8px] text-muted">{icon.name}</span></div>)}</For>diff --git a/js/app/packages/macro-icons/wide/animating/email.tsx b/js/app/packages/macro-icons/wide/animating/email.tsxindex a19d58f065..9bd149f3fa 100644--- a/js/app/packages/macro-icons/wide/animating/email.tsx+++ b/js/app/packages/macro-icons/wide/animating/email.tsx@@ -6,32 +6,34 @@ import { createEffect, createUniqueId } from 'solid-js';// ── Email (source) ───────────────────────────────────────────────────────────const BODY_A_D = 'M 1.5,0.75 L 17.25,0.75 L 17.25,10.5';-// Top edge + right edge. Upper-right join rounded by stroke-linejoin.const BODY_B_D = 'M 16.5,11.25 L 0.75,11.25 L 0.75,1.5';-// Bottom edge + left edge. Lower-left join rounded by stroke-linejoin.const FLAP_D = 'M 1.5,1.5 L 9,7.5 L 17.25,0.75';-// 3-point V spanning the top of the envelope.// ── Paper plane (target) ─────────────────────────────────────────────────────-// Right-pointing plane; nose at (17.25,6), fold crease at (0.75,7.5).const PLANE_A_D = 'M 1.5,0.75 L 17.25,0.75 L 4.5,11.25';-// Top wing: back-top → nose → left fold crease.const PLANE_B_D = 'M 17.25,0.75 L 4.5,11.25 L 0.75,1';-// Bottom wing: nose → back-bottom → left fold crease.const PLANE_C_D = 'M 0.75,1 L 4.5,11.25 L 17.25,0.75';-// Spine crease: back-top → center → back-bottom.// ── Cutout triangle (fades in over paper plane) ───────────────────────────────// Derived from the inner notch in paper-plane-cutout.svg, scaled 24→18 (×0.75).-// Original vertices (24-space): (4.73,8.91), (9.78,5.65), (3.80,6.39)const CUTOUT_D = 'M 3.5,6.7 L 7.3,4.2 L 2.85,4.8 Z';-// WAAPI keyframe values — CSS `d` property requires path() wrapper for cross-browser support+// CSS `d` property requires path() wrapper for cross-browser WAAPI supportconst p = (d: string) => `path('${d}')`;const DURATION = 400;const EASING = 'ease-in-out';+// Bake the current animated value into inline style then remove the animation.+// Swallows the finished-promise rejection that cancel() triggers.+function cancelAnim(a: Animation) {+ a.finished.catch(() => {});+ try {+ a.commitStyles();+ a.cancel();+ } catch (_) {}+}+export const AnimatedEmailIcon = (props: { triggerAnimation?: boolean }) => {const clipId = createUniqueId();let bodyAEl!: SVGPathElement;@@ -39,53 +41,122 @@ export const AnimatedEmailIcon = (props: { triggerAnimation?: boolean }) => {let flapEl!: SVGPathElement;let cutoutEl!: SVGPathElement;let prevTrigger = false;+ let morphAnims: Animation[] = [];+ // Kept alive between trigger cycles so we always have a reference to reverse it.+ let cutoutAnim: Animation | null = null;createEffect(() => {const trigger = !!props.triggerAnimation;if (trigger === prevTrigger) return;prevTrigger = trigger;- const direction = (trigger ? 'normal' : 'reverse') as PlaybackDirection;- const opts = {- duration: DURATION,- easing: EASING,- fill: 'forwards' as FillMode,- direction,- delay: trigger ? 0 : DURATION,- };-- // stroke-linejoin isn't interpolatable — switch it at the boundary where it looks best:- // going forward (→ plane): round immediately so the join softens as the shape morphs.- // going back (→ email): revert to miter only after the reverse animation completes.- if (trigger) flapEl.setAttribute('stroke-linejoin', 'round');-- const cutoutAnim = cutoutEl.animate(- trigger- ? [{ opacity: 0 }, { opacity: 1 }]- : [{ opacity: 1 }, { opacity: 0 }],- {+ if (trigger) {+ // Cancel any in-progress morphs+ for (const a of morphAnims) cancelAnim(a);+ morphAnims = [];++ // Cancel cutout WITHOUT commitStyles — let it snap back to its base style.+ // The new animation's fill:'both' immediately applies opacity:0, overriding+ // any residual inline opacity before the next paint.+ if (cutoutAnim) {+ cutoutAnim.finished.catch(() => {});+ try {+ cutoutAnim.cancel();+ } catch (_) {}+ cutoutAnim = null;+ }++ flapEl.setAttribute('stroke-linejoin', 'round');++ const opts = {duration: DURATION,easing: EASING,fill: 'forwards' as FillMode,- delay: trigger ? DURATION : 0,+ };+ morphAnims = [+ bodyAEl.animate([{ d: p(BODY_A_D) }, { d: p(PLANE_A_D) }], opts),+ bodyBEl.animate([{ d: p(BODY_B_D) }, { d: p(PLANE_B_D) }], opts),+ flapEl.animate([{ d: p(FLAP_D) }, { d: p(PLANE_C_D) }], opts),+ ];+ // fill:'both' applies the first keyframe (opacity:0) during the delay phase,+ // guarding against residual inline opacity from a previous cycle.+ cutoutAnim = cutoutEl.animate([{ opacity: 0 }, { opacity: 1 }], {+ duration: DURATION,+ easing: EASING,+ fill: 'both' as FillMode,+ delay: DURATION,+ });++ // Bake morph shapes when they finish; leave cutoutAnim alive to reverse later.+ Promise.all(morphAnims.map((a) => a.finished))+ .then(() => {+ for (const a of morphAnims) cancelAnim(a);+ morphAnims = [];+ })+ .catch(() => {});+ } else {+ // ── Reverse morphs ────────────────────────────────────────────────────+ const isActive = (a: Animation) => a.playState === 'running';++ for (const a of morphAnims.filter((a) => !isActive(a))) cancelAnim(a);+ const running = morphAnims.filter(isActive);++ if (running.length > 0) {+ for (const a of running) a.reverse();+ morphAnims = running;+ } else {+ const revOpts = {+ duration: DURATION,+ easing: EASING,+ fill: 'forwards' as FillMode,+ direction: 'reverse' as PlaybackDirection,+ };+ morphAnims = [+ bodyAEl.animate([{ d: p(BODY_A_D) }, { d: p(PLANE_A_D) }], revOpts),+ bodyBEl.animate([{ d: p(BODY_B_D) }, { d: p(PLANE_B_D) }], revOpts),+ flapEl.animate([{ d: p(FLAP_D) }, { d: p(PLANE_C_D) }], revOpts),+ ];}- );- const anims = [- bodyAEl.animate([{ d: p(BODY_A_D) }, { d: p(PLANE_A_D) }], opts),- bodyBEl.animate([{ d: p(BODY_B_D) }, { d: p(PLANE_B_D) }], opts),- flapEl.animate([{ d: p(FLAP_D) }, { d: p(PLANE_C_D) }], opts),- ];+ // ── Reverse cutout ────────────────────────────────────────────────────+ // reverse() uses the animation's own keyframes — no commitStyles needed,+ // so no inline opacity can be stranded under rapid trigger cycles.+ if (cutoutAnim) {+ const inDelayPhase = Number(cutoutAnim.currentTime ?? 0) < DURATION; // delay === DURATION+ if (inDelayPhase) {+ // fill:'both' is holding opacity:0; just cancel.+ cutoutAnim.finished.catch(() => {});+ try {+ cutoutAnim.cancel();+ } catch (_) {}+ cutoutAnim = null;+ } else {+ // Active phase or finished — reverse() fades back to opacity:0.+ try {+ cutoutAnim.reverse();+ } catch (_) {}+ }+ }- Promise.all([...anims, cutoutAnim].map((a) => a.finished)).then(() => {- [...anims, cutoutAnim].forEach((a) => {- try {- a.commitStyles();- a.cancel();- } catch (_) {}- });- if (!trigger) flapEl.setAttribute('stroke-linejoin', 'miter');- });+ // ── Cleanup when everything settles ──────────────────────────────────+ const morphsToWatch = [...morphAnims];+ const cutoutToWatch = cutoutAnim;+ const allToWatch = [+ ...morphsToWatch,+ ...(cutoutToWatch ? [cutoutToWatch] : []),+ ];++ Promise.all(allToWatch.map((a) => a.finished))+ .then(() => {+ for (const a of morphsToWatch) cancelAnim(a);+ if (cutoutToWatch) cancelAnim(cutoutToWatch);+ morphAnims = [];+ // Only null cutoutAnim if it hasn't been replaced by a newer animation+ if (cutoutAnim === cutoutToWatch) cutoutAnim = null;+ flapEl.setAttribute('stroke-linejoin', 'miter');+ })+ .catch(() => {});+ }});return (diff --git a/js/app/packages/macro-icons/wide/animating/plus.tsx b/js/app/packages/macro-icons/wide/animating/plus.tsxindex c18b80040e..86d9cfd46d 100644--- a/js/app/packages/macro-icons/wide/animating/plus.tsx+++ b/js/app/packages/macro-icons/wide/animating/plus.tsx@@ -1,140 +1,69 @@-export const AnimatedPlusIcon = (props: { triggerAnimation?: boolean }) => {- // Solid plus (Asset 170) switches to pixelated plus (Asset 171) during animation- // After 0.4s, switches back to solid. Tinker with the pixelated version's animation!+const FRAME_A_D = 'M 1.5,0.75 L 17.25,0.75 L 17.25,16.5';+const FRAME_B_D = 'M 16.5,17.25 L 0.75,17.25 L 0.75,1.5';+export const AnimatedPlusIcon = (props: { triggerAnimation?: boolean }) => {return (<svgwidth="100%"height="100%"- viewBox="0 -3 18 18"- fill="currentColor"- stroke="none"+ viewBox="0 0 18 18"+ fill="none"+ stroke="currentColor"+ stroke-width="1.5"xmlns="http://www.w3.org/2000/svg"overflow="visible"class={`animated-plus-icon ${props.triggerAnimation ? 'animating' : ''}`}>{/*<title>Animated plus icon</title>*/}<style>{`- @keyframes solid-fade {- 0% { opacity: 1; }- 5% { opacity: 0; }- 95% { opacity: 0; }- 100% { opacity: 1; }- }-- @keyframes pixelated-fade {- 0% { opacity: 0; }- 5% { opacity: 1; }- 95% { opacity: 1; }- 100% { opacity: 0; }- }-- @keyframes pixel-left-move {- 0% { transform: translate(0, 0); }- 40% { transform: translate(-.5px, -1px); }- 70%, 100% { transform: translate(0, 0); }- }-- @keyframes pixel-top-move {- 0%, 10% { transform: translate(0, 0); }- 50% { transform: translate(1px, -.5px); }- 80%, 100% { transform: translate(0, 0); }- }-- @keyframes pixel-right-move {- 0%, 20% { transform: translate(0, 0); }- 60% { transform: translate(.5px, 1px); }- 90%, 100% { transform: translate(0, 0); }- }-- @keyframes pixel-bottom-move {- 0%, 30% { transform: translate(0, 0); }- 70% { transform: translate(-1px, .5px); }- 100% { transform: translate(0, 0); }- }-- @keyframes left-arm-extension-move {- 0% { transform: translate(0, 0); }- 40% { transform: translate(-1px, 0); }- 100% { transform: translate(0, 0); }- }-- @keyframes right-arm-extension-move {- 0%, 20% { transform: translate(0, 0); }- 60% { transform: translate(1px, 0); }- 80%, 100% { transform: translate(0, 0); }- }-- @keyframes bottom-arm-extension-move {- 0%, 30% { transform: translate(0, 0); }- 70% { transform: translate(0, 1px); }- 90%, 100% { transform: translate(0, 0); }- }-.animated-plus-icon {- .solid-plus { opacity: 1; }- .pixelated-plus { opacity: 0; }-- &.animating {- .solid-plus { animation: solid-fade 0.6s ease-in-out forwards; }- .pixelated-plus { animation: pixelated-fade 0.6s ease-in-out forwards; }- .pixel-left { animation: pixel-left-move 0.6s ease-in-out forwards; }- .pixel-top { animation: pixel-top-move 0.6s ease-in-out forwards; }- .pixel-right { animation: pixel-right-move 0.6s ease-in-out forwards; }- .pixel-bottom { animation: pixel-bottom-move 0.6s ease-in-out forwards; }- .left-arm-extension { animation: left-arm-extension-move 0.6s ease-in-out forwards; }- .right-arm-extension { animation: right-arm-extension-move 0.6s ease-in-out forwards; }- .bottom-arm-extension { animation: bottom-arm-extension-move 0.6s ease-in-out forwards; }+ .bg-fill { opacity: 0; transition: opacity 0.3s ease; }+ .frame-a, .frame-b, .plus-v, .plus-h {+ transition: transform 0.3s ease;+ }+ .plus-v { transform-origin: 9px 9px; }+ .plus-h { transform-origin: 9px 9px; }+ }+ .animated-plus-icon.animating {+ .bg-fill { opacity: 0.1; transition: opacity 0.4s ease; }+ .frame-a, .frame-b, .plus-v, .plus-h {+ transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);}+ .frame-a { transform: translate(1px, -1px); }+ .frame-b { transform: translate(-1px, 1px); }+ .plus-v { transform: scaleY(1.3); }+ .plus-h { transform: scaleX(1.3); }}`}</style>-- {/* Solid plus sign (from Asset 170.svg) */}- <g class="solid-plus">- <polygon points="18 5.25 9.75 5.25 9.75 0 8.25 0 8.25 5.25 0 5.25 0 6.75 8.25 6.75 8.25 12 9.75 12 9.75 6.75 18 6.75 18 5.25" />- </g>-- {/* Pixelated plus sign (from Asset 171.svg - transforms resolved to x/y/w/h) */}- <g class="pixelated-plus">- {/* Main vertical bar */}- <rect x="8.25" y="1.5" width="1.5" height="7.5" />- {/* Main horizontal bar */}- <rect x="6.75" y="5.25" width="7.5" height="1.5" />- {/* Right arm extension */}- <rect- class="right-arm-extension"- x="15.75"- y="5.25"- width="2.25"- height="1.5"- />- {/* Bottom arm extension */}- <rect- class="bottom-arm-extension"- x="8.25"- y="10.5"- width="1.5"- height="1.5"- />- {/* Left arm extension */}- <rect- class="left-arm-extension"- x="0"- y="5.25"- width="5.25"- height="1.5"- />-- {/* Movable pixels */}- {/* Bottom pixel */}- <rect class="pixel-bottom" x="8.25" y="9" width="1.5" height="1.5" />- {/* Right pixel */}- <rect class="pixel-right" x="14.25" y="5.25" width="1.5" height="1.5" />- {/* Top pixel */}- <rect class="pixel-top" x="8.25" y="0" width="1.5" height="1.5" />- {/* Left pixel */}- <rect class="pixel-left" x="5.25" y="5.25" width="1.5" height="1.5" />- </g>+ <rect+ class="bg-fill"+ x="0"+ y="0"+ width="18"+ height="18"+ fill="currentColor"+ stroke="none"+ />+ <path class="frame-a" d={FRAME_A_D} stroke-linejoin="round" />+ <path class="frame-b" d={FRAME_B_D} stroke-linejoin="round" />+ <line+ class="plus-v"+ x1="9"+ y1="6.75"+ x2="9"+ y2="11.25"+ stroke-linecap="square"+ shape-rendering="crispEdges"+ />+ <line+ class="plus-h"+ x1="6.75"+ y1="9"+ x2="11.25"+ y2="9"+ stroke-linecap="square"+ shape-rendering="crispEdges"+ /></svg>);};diff --git a/js/app/packages/macro-icons/wide/animating/search.tsx b/js/app/packages/macro-icons/wide/animating/search.tsxindex 497e81cd26..59fb66d00b 100644--- a/js/app/packages/macro-icons/wide/animating/search.tsx+++ b/js/app/packages/macro-icons/wide/animating/search.tsx@@ -25,7 +25,7 @@ export const AnimatedSearchIcon = (props: { triggerAnimation?: boolean }) => {.magnifying-glass {transform-origin: 5.25px 5.25px;transition: transform 0.4s ease;- transform: rotate(-45deg);+ transform: translate(3px, 0.75px) rotate(-45deg);.line-west {transform-origin: -0.25px 5px;@@ -49,6 +49,7 @@ export const AnimatedSearchIcon = (props: { triggerAnimation?: boolean }) => {transition: transform 0.4s ease;transform: translate(0, 0);}+}}.animated-search-icon.animating {@@ -67,6 +68,7 @@ export const AnimatedSearchIcon = (props: { triggerAnimation?: boolean }) => {.line-south {transform: translate(0, -2px);}+}}`}</style>@@ -123,12 +125,6 @@ export const AnimatedSearchIcon = (props: { triggerAnimation?: boolean }) => {/></g>- {/* Handle */}- {/* <path- class="handle"- d="M11.25,12c-.19,0-.38-.07-.53-.22l-2.5-2.5c-.29-.29-.29-.77,0-1.06s.77-.29,1.06,0l2.5,2.5c.29.29.29.77,0,1.06-.15.15-.34.22-.53.22Z"- /> */}-{/* Reflection shine effect - clipped to the glass circle */}<g clip-path={`url(#${clipId})`}><rectdiff --git a/js/app/packages/macro-icons/wide/plus.svg b/js/app/packages/macro-icons/wide/plus.svgindex 4e804efce7..234e306a09 100644--- a/js/app/packages/macro-icons/wide/plus.svg+++ b/js/app/packages/macro-icons/wide/plus.svg@@ -1 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24" fill="currentColor"><path d="M10.5 4v6.5H0v3h10.5V20h3v-6.5H24v-3H13.5V4z"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.5">+<path d="M 1.5,0.75 L 17.25,0.75 L 17.25,16.5" stroke-linejoin="round"/>+<path d="M 16.5,17.25 L 0.75,17.25 L 0.75,1.5" stroke-linejoin="round"/>+<line x1="9" y1="6.75" x2="9" y2="11.25" stroke-linecap="square" shape-rendering="crispEdges"/>+<line x1="6.75" y1="9" x2="11.25" y2="9" stroke-linecap="square" shape-rendering="crispEdges"/>+</svg>