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(editor): refine floating toolbar and AI edit send button (#7925)
Jacob Beckerman8f3c8b23866a
diff --git a/apps/web/src/components/ui/components/Toolbar.tsx b/apps/web/src/components/ui/components/Toolbar.tsxindex 6869914be6..388d9b58ca 100644--- a/apps/web/src/components/ui/components/Toolbar.tsx+++ b/apps/web/src/components/ui/components/Toolbar.tsx@@ -33,8 +33,8 @@ export type ToolbarProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'style'> & {/*** An opinionated floating bar of controls. Owns its surface chrome* (`rounded-xl`, padding, border, background) and sets the default- * size/variant for its `Toolbar.Button` children and a compact corner radius- * for contained buttons, so callers compose controls+ * size/variant for its `Toolbar.Button` children and concentric corner radii+ * for contained buttons (outer radius minus padding), so callers compose controls* without restyling them. Pair with a positioning wrapper (e.g.* `PopupPositioner`) when it needs to float against an anchor.*@@ -75,8 +75,9 @@ export function Toolbar(props: ToolbarProps) {role="toolbar"aria-orientation={ctx.orientation}class={cn(- 'inline-flex items-center gap-1 rounded-xl border border-edge-frame bg-control p-1.5',- '**:data-button:rounded-md',+ 'menu-surface inline-flex items-center gap-1 p-1 light-mode:bg-panel [--color-hover:color-mix(in_oklch,var(--color-ink)_5%,transparent)]',+ 'light-mode:[--glass-shadow:0_0_0_0.5px_rgb(0_0_0/0.1),0_8px_16px_-4px_rgb(0_0_0/0.19)] light-mode:after:hidden',+ '**:data-button:min-h-7 **:data-button:min-w-7 **:data-button:rounded-[calc(var(--radius-xl)-var(--spacing))]','data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',local.class)}diff --git a/apps/web/src/features/block-md/component/MarkdownPopup.tsx b/apps/web/src/features/block-md/component/MarkdownPopup.tsxindex 36dcdb8487..7f49286ca4 100644--- a/apps/web/src/features/block-md/component/MarkdownPopup.tsx+++ b/apps/web/src/features/block-md/component/MarkdownPopup.tsx@@ -53,7 +53,6 @@ import { debouncedDependent } from '@core/util/debounce';import { getScrollParentElement } from '@core/util/scrollParent';import type { NodeIdMappings } from '@macro-inc/lexical-core';import { $getId } from '@macro-inc/lexical-core/plugins/nodeIdPlugin';-import ArrowUp from '@phosphor/arrow-up.svg';import ChatTeardrop from '@phosphor/chat-teardrop.svg';import GridIcon from '@phosphor/grid-four.svg';import CheckIcon from '@phosphor-icons/core/bold/check-bold.svg?component-solid';@@ -62,7 +61,7 @@ import LoadingIcon from '@phosphor-icons/core/bold/spinner-gap-bold.svg?componenimport CheckSquareIcon from '@phosphor-icons/core/regular/check-square.svg?component-solid';import LinkIcon from '@phosphor-icons/core/regular/link.svg?component-solid';import { makeResizeObserver } from '@solid-primitives/resize-observer';-import { Button, Toolbar } from '@ui';+import { Button, SendButton, Toolbar } from '@ui';import {$getSelection,$isRangeSelection,@@ -313,15 +312,10 @@ export function MarkdownPopup(props: {<Showwhen={hasActiveAiEdit(blockId)}fallback={- <Button- size="icon-sm"- variant="strong"- tooltip="Send"+ <SendButtondisabled={!aiEditInput().trim()}onClick={handleAiEditSubmit}- >- <ArrowUp class="size-4" />- </Button>+ />}><Buttondiff --git a/docs/AGENT_GUIDE/channels.md b/docs/AGENT_GUIDE/channels.mdindex d1c7e4fa7f..16d8796286 100644--- a/docs/AGENT_GUIDE/channels.md+++ b/docs/AGENT_GUIDE/channels.md@@ -158,6 +158,10 @@ attachment, delete-reply, and send controls have their own space.Attachment controls use a paperclip in both expanded and collapsed composers,including the iOS media picker. Input action and formatting buttons show theapp tooltip without a second native browser tooltip.+On desktop, select draft text to open the floating formatting toolbar. Its+compact frame uses 4px outer padding with concentric button corners, a white+light-mode background, a thin border, and a soft downward shadow. Check+Bold and the text-style dropdown in both light and dark mode.When checking this transition, type a long draft without pressing Enter, thenshorten it and resize the pane. It should expand when the text no longer fitsbeside the buttons and collapse when it fits again, without flickering betweendiff --git a/docs/AGENT_GUIDE/documents.md b/docs/AGENT_GUIDE/documents.mdindex 2a966432d7..9127858017 100644--- a/docs/AGENT_GUIDE/documents.md+++ b/docs/AGENT_GUIDE/documents.md@@ -2181,6 +2181,9 @@ access to the title and property controls.1. Click `Edit with AI` (button directly under the editor body).2. A focused prompt box appears (placeholder `Describe the edit…`). Type the instruction,press Enter (or click `Send`).+ Selected-text AI edit uses the shared Send button: muted and disabled for an+ empty or whitespace-only prompt, black with a white arrow in light mode once+ an instruction is entered (inverted for dark mode), on desktop and mobile.3. While running, the button row shows a `Stop` button (a11y text `Stop AI edit`), and thelive cursor walking the text is labelled with the editor's name: `Macro (AI)` for aninline edit, or the name of the agent or persona whose session asked for the edit