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(email): Always open attachments in split (#1630)
Evan Hutnikd4147981bf4e
diff --git a/js/app/packages/block-email/component/AttachmentPill.tsx b/js/app/packages/block-email/component/AttachmentPill.tsxindex 8d6b3faedf..e46bf8fe6e 100644--- a/js/app/packages/block-email/component/AttachmentPill.tsx+++ b/js/app/packages/block-email/component/AttachmentPill.tsx@@ -12,7 +12,7 @@ type EmailAttachmentPillProps = {attachment: { fileName: string; mimeType?: string };removable?: boolean;onRemove?: () => void;- onClick?: (event: MouseEvent, fileType?: FileType) => void;+ onClick?: (fileType?: FileType) => void;};export function EmailAttachmentPill(props: EmailAttachmentPillProps) {@@ -30,7 +30,7 @@ export function EmailAttachmentPill(props: EmailAttachmentPillProps) {classList={{'pl-2': props.removable,}}- onClick={(e) => props.onClick?.(e, fileType())}+ onClick={() => props.onClick?.(fileType())}><Show when={fileType() !== undefined || props.attachment.mimeType}><EntityIcondiff --git a/js/app/packages/block-email/component/MessageContainer.tsx b/js/app/packages/block-email/component/MessageContainer.tsxindex 17e436ccf9..bb22ec6207 100644--- a/js/app/packages/block-email/component/MessageContainer.tsx+++ b/js/app/packages/block-email/component/MessageContainer.tsx@@ -144,7 +144,6 @@ export function MessageContainer(props: MessageContainerProps) {});const onClickAttachment = async (- event: MouseEvent,attachment: Attachment,fileType: FileType | undefined) => {@@ -185,7 +184,7 @@ export function MessageContainer(props: MessageContainerProps) {const blockName = fileType ? fileTypeToBlockName(fileType) : 'unknown';openWithSplit({ type: blockName, id: document_id },- { preferNewSplit: event.shiftKey }+ { preferNewSplit: true });};@@ -284,8 +283,8 @@ export function MessageContainer(props: MessageContainerProps) {fileName: attachment.filename ?? '',mimeType: attachment.mime_type ?? undefined,}}- onClick={(event, fileType) =>- onClickAttachment(event, attachment, fileType)+ onClick={(fileType) =>+ onClickAttachment(attachment, fileType)}/>)}