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.

feat(icon): update icons in message action menu (#2601)

Aidan Holloway-Bidwell3dc2ddad1930
diff --git a/js/app/packages/channel/Message/ActionMenu.tsx b/js/app/packages/channel/Message/ActionMenu.tsx
index a1be15651c..d02434b5c6 100644
--- a/js/app/packages/channel/Message/ActionMenu.tsx
+++ b/js/app/packages/channel/Message/ActionMenu.tsx
@@ -1,8 +1,8 @@
-import ReplyIcon from '@icon/regular/arrow-bend-up-left.svg';
-import LinkIcon from '@icon/regular/link.svg';
-import PencilIcon from '@icon/regular/pencil.svg';
-import SmileyIcon from '@icon/regular/smiley.svg';
-import TrashIcon from '@icon/regular/trash.svg';
+import ReplyIcon from '@macro-icons/square/reply.svg';
+import LinkIcon from '@macro-icons/square/link.svg';
+import EditIcon from '@macro-icons/square/edit.svg';
+import AddEmojiIcon from '@macro-icons/square/add-emoji.svg';
+import TrashIcon from '@macro-icons/square/trash.svg';
import TaskIcon from '@macro-icons/wide/task.svg';
import { cn } from '@ui/utils/classname';
import { createSignal, For, Show, type Component, type JSX } from 'solid-js';
@@ -40,15 +40,14 @@ function ActionButton(props: {
aria-label={props.action.label}
data-message-action={props.action.id}
class={cn(
- 'size-8 flex items-center justify-center text-ink-muted hover:bg-hover hover-transition-bg',
- {
- 'text-failure-ink': props.action.destructive,
- },
+ 'h-8 px-2 flex items-center justify-center text-ink hover:bg-hover hover-transition-bg',
props.action.class
)}
onClick={props.onClick}
>
- {renderIcon(props.action.icon)}
+ <span class="block size-5">
+ {renderIcon(props.action.icon, 'w-full h-full')}
+ </span>
</button>
);
}
@@ -75,25 +74,27 @@ export function ActionMenu(props: ActionMenuProps) {
label: 'Task',
icon: TaskIcon,
onClick: actions?.onCreateTask,
- class: 'text-task',
},
{
id: 'reply',
label: 'Reply',
icon: ReplyIcon,
onClick: actions?.onReply,
+ class: 'px-1.5',
},
{
id: 'copy-link',
label: 'Copy Link',
icon: LinkIcon,
onClick: actions?.onCopyLink,
+ class: 'px-1.5',
},
{
id: 'edit',
label: 'Edit',
- icon: PencilIcon,
+ icon: EditIcon,
onClick: actions?.onEdit,
+ class: 'px-1.5',
},
{
id: 'delete',
@@ -101,6 +102,7 @@ export function ActionMenu(props: ActionMenuProps) {
icon: TrashIcon,
onClick: actions?.onDelete,
destructive: true,
+ class: 'px-1.5 text-failure-ink',
},
];
@@ -142,7 +144,7 @@ export function ActionMenu(props: ActionMenuProps) {
onEmojiSelect={(emoji) => {
handleReaction(emoji);
}}
- trigger={renderIcon(SmileyIcon)}
+ trigger={renderIcon(AddEmojiIcon)}
triggerProps={{
title: 'More reactions',
'aria-label': 'More reactions',
@@ -151,6 +153,9 @@ export function ActionMenu(props: ActionMenuProps) {
'size-8 flex items-center justify-center text-ink-muted hover:bg-hover hover-transition-bg',
}}
/>
+ <Show when={visibleActions.length > 0}>
+ <div class="w-px self-stretch bg-edge-muted mx-1" />
+ </Show>
</Show>
<For each={visibleActions}>
diff --git a/js/app/packages/macro-icons/square/add-emoji.svg b/js/app/packages/macro-icons/square/add-emoji.svg
new file mode 100644
index 0000000000..d387ba27df
--- /dev/null
+++ b/js/app/packages/macro-icons/square/add-emoji.svg
@@ -0,0 +1,8 @@
+<svg width="100%" height="100%" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg">
+<path d="M9.42,6.98c0,2.43-1.97,4.4-4.4,4.4S.62,9.41.62,6.98,2.59,2.58,5.02,2.58"/>
+<circle cx="3.52" cy="5.69" r=".75" fill="currentColor" stroke="none"/>
+<circle cx="6.57" cy="5.69" r=".75" fill="currentColor" stroke="none"/>
+<path d="M6.56,7.76c-.28.56-.86.95-1.54.95s-1.26-.39-1.54-.95"/>
+<line x1="9.4" y1=".62" x2="9.4" y2="4.58"/>
+<line x1="11.38" y1="2.6" x2="7.42" y2="2.6"/>
+</svg>
diff --git a/js/app/packages/macro-icons/square/edit.svg b/js/app/packages/macro-icons/square/edit.svg
new file mode 100644
index 0000000000..25937f25be
--- /dev/null
+++ b/js/app/packages/macro-icons/square/edit.svg
@@ -0,0 +1,4 @@
+<svg width="100%" height="100%" viewBox="0 -3 12 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg">
+<path d="M7.99.78L.75,8.02v3.18h3.18l7.24-7.24s.04-.1,0-.14l-3.04-3.04s-.1-.04-.14,0Z"/>
+<line x1="5.98" y1="2.79" x2="9.16" y2="5.98"/>
+</svg>
diff --git a/js/app/packages/macro-icons/square/ellipsis.svg b/js/app/packages/macro-icons/square/ellipsis.svg
new file mode 100644
index 0000000000..8f4d58d559
--- /dev/null
+++ b/js/app/packages/macro-icons/square/ellipsis.svg
@@ -0,0 +1,6 @@
+<svg width="100%" height="100%" viewBox="0 0 18 18" fill="currentColor" stroke="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M9,1.5c4.14,0,7.5,3.36,7.5,7.5s-3.36,7.5-7.5,7.5S1.5,13.14,1.5,9,4.86,1.5,9,1.5M9,0C4.03,0,0,4.03,0,9s4.03,9,9,9,9-4.03,9-9S13.97,0,9,0h0Z"/>
+<path d="M9,8c-.55,0-1,.45-1,1s.45,1,1,1,1-.45,1-1-.45-1-1-1h0Z"/>
+<path d="M12.5,8c-.55,0-1,.45-1,1s.45,1,1,1,1-.45,1-1-.45-1-1-1h0Z"/>
+<path d="M5.5,8c-.55,0-1,.45-1,1s.45,1,1,1,1-.45,1-1-.45-1-1-1h0Z"/>
+</svg>
diff --git a/js/app/packages/macro-icons/square/link.svg b/js/app/packages/macro-icons/square/link.svg
new file mode 100644
index 0000000000..0b21cdc7b1
--- /dev/null
+++ b/js/app/packages/macro-icons/square/link.svg
@@ -0,0 +1,4 @@
+<svg width="100%" height="100%" viewBox="0 -3 12 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+<path d="M6.89,4.78s.1.09.14.13h0c1.07,1.07,1.07,2.82,0,3.89l-1.59,1.59c-1.07,1.07-2.82,1.07-3.89,0h0c-1.07-1.07-1.07-2.82,0-3.89l.17-.17"/>
+<path d="M5.06,7.17s-.1-.09-.14-.13h0c-1.07-1.07-1.07-2.82,0-3.89l1.59-1.59c1.07-1.07,2.82-1.07,3.89,0h0c1.07,1.07,1.07,2.82,0,3.89l-.17.17"/>
+</svg>
diff --git a/js/app/packages/macro-icons/square/reply.svg b/js/app/packages/macro-icons/square/reply.svg
new file mode 100644
index 0000000000..251f1ce657
--- /dev/null
+++ b/js/app/packages/macro-icons/square/reply.svg
@@ -0,0 +1,3 @@
+<svg width="100%" height="100%" viewBox="-2 -2 17.5 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
+<path d="M6.1,3.85h-3.23l1.72-1.72V0L0,4.6l4.6,4.6v-2.12l-1.72-1.72h3.23c3.25,0,5.9,2.65,5.9,5.9,0,.41.34.75.75.75s.75-.34.75-.75c0-4.08-3.32-7.4-7.4-7.4Z"/>
+</svg>
diff --git a/js/app/packages/macro-icons/square/trash.svg b/js/app/packages/macro-icons/square/trash.svg
new file mode 100644
index 0000000000..06a45b116c
--- /dev/null
+++ b/js/app/packages/macro-icons/square/trash.svg
@@ -0,0 +1,3 @@
+<svg width="100%" height="100%" viewBox="0 -3 12 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
+<path d="M11.25,1.5h-3v-.75c0-.41-.34-.75-.75-.75h-3c-.41,0-.75.34-.75.75v.75H.75c-.41,0-.75.34-.75.75s.34.75.75.75h.75v8.25c0,.41.34.75.75.75h7.5c.41,0,.75-.34.75-.75V3h.75c.41,0,.75-.34.75-.75s-.34-.75-.75-.75ZM9,10.5H3V3h2.25v-1.5h1.5v1.5h2.25v7.5Z"/>
+</svg>
diff --git a/js/app/packages/macro-icons/wide/bin.svg b/js/app/packages/macro-icons/wide/bin.svg
new file mode 100644
index 0000000000..e08c2996fb
--- /dev/null
+++ b/js/app/packages/macro-icons/wide/bin.svg
@@ -0,0 +1,3 @@
+<svg width="100%" height="100%" viewBox="0 -3 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
+<path d="M17.25,1.51h-5.38v-.76c0-.41-.34-.75-.75-.75h-4.25c-.41,0-.75.34-.75.75v.76H.75c-.41,0-.75.34-.75.75s.34.75.75.75h.87l1.5,8.99h11.77l1.5-8.99h.87c.41,0,.75-.34.75-.75s-.34-.75-.75-.75ZM13.61,10.5H4.39l-1.25-7.49h4.61v-1.51h2.5v1.5h0s4.61,0,4.61,0l-1.25,7.49Z"/>
+</svg>
diff --git a/js/app/packages/macro-icons/wide/link.svg b/js/app/packages/macro-icons/wide/link.svg
new file mode 100644
index 0000000000..5323cc0887
--- /dev/null
+++ b/js/app/packages/macro-icons/wide/link.svg
@@ -0,0 +1,4 @@
+<svg width="100%" height="100%" viewBox="0 -3 18 18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
+<path d="M11.08,1.46l1.37-.5c1.82-.66,3.82.28,4.49,2.09h0c.66,1.82-.28,3.82-2.09,4.49l-3.15,1.15c-1.82.66-3.82-.28-4.49-2.09h0c-.08-.21-.13-.43-.17-.64"/>
+<path d="M6.82,10.46l-1.37.5c-1.82.66-3.82-.28-4.49-2.09h0c-.66-1.82.28-3.82,2.09-4.49l3.15-1.15c1.82-.66,3.82.28,4.49,2.09h0c.08.21.13.43.17.64"/>
+</svg>
diff --git a/js/app/packages/macro-icons/wide/reply.svg b/js/app/packages/macro-icons/wide/reply.svg
new file mode 100644
index 0000000000..7b26276f58
--- /dev/null
+++ b/js/app/packages/macro-icons/wide/reply.svg
@@ -0,0 +1,3 @@
+<svg width="100%" height="100%" viewBox="0 -3 18 18" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
+<path d="M4.55,0h0v1.98h0s-1.82,1.82-1.82,1.82h6.25c3.31,0,6,2.69,6,6,0,.41-.34.75-.75.75s-.75-.34-.75-.75c0-2.48-2.02-4.5-4.5-4.5H2.73l1.82,1.82h0s0,1.98,0,1.98h0S0,4.55,0,4.55L4.55,0Z"/>
+</svg>