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
style(layers): add layer/panel to inputs (#2999)
Seamusbb1e49ad66a1
diff --git a/js/app/packages/block-channel/component/Compose.tsx b/js/app/packages/block-channel/component/Compose.tsxindex 81d0308c40..117a514026 100644--- a/js/app/packages/block-channel/component/Compose.tsx+++ b/js/app/packages/block-channel/component/Compose.tsx@@ -38,6 +38,7 @@ import { commsServiceClient } from '@service-comms/client';import InfoIcon from '@icon/regular/info.svg';import { createEffect, createMemo, createSignal, on, Show } from 'solid-js';import { ChannelInputContainer } from '@channel/Input/ChannelInputContainer';+import { Panel } from '@ui';export function ChannelCompose() {const [channelName, setChannelName] = createSignal<string>('');@@ -260,60 +261,67 @@ export function ChannelCompose() {</div></div></Show>- <ChannelInputContainer>- <Input.Root input={inputState.view()} commands={inputState.commands}>- <Input.DropZone- onDragStart={(valid) => inputState.setIsDraggedOver(valid)}- onDragEnd={() => inputState.setIsDraggedOver(false)}+ <div class="p-2">+ <ChannelInputContainer>+ <Input.Root+ input={inputState.view()}+ commands={inputState.commands}>- <Input.Layout>- <Input.DropOverlay />- <Input.FormatRibbon>- <FormatButtons- selectionState={() => markdownEditor.selection}- onInlineFormat={(format) =>- applyInlineFormat(markdownEditor.lexical, format)- }- onNodeFormat={(format) =>- applyNodeFormat(markdownEditor.lexical, format)- }- />- </Input.FormatRibbon>- <Input.EditorShell- ref={setScrollContainer}- onClick={(event) => {- if (!isMobile()) {- event.stopPropagation();- markdownEditor.controls.focus();- }- }}+ <Panel depth={2}>+ <Input.DropZone+ onDragStart={(valid) => inputState.setIsDraggedOver(valid)}+ onDragEnd={() => inputState.setIsDraggedOver(false)}>- <Input.Editor>- <MarkdownShell- config={markdownEditor}- placeholder={placeholder()}- autofocus={false}- class="text-sm"- />- </Input.Editor>- </Input.EditorShell>- <Input.Attachments kind="media" />- <Input.Attachments kind="document" />- <Input.Footer>- <Input.Actions>- <Input.Actions.Left>- <Input.AttachFilesAction />- <Input.ToggleFormatAction />- </Input.Actions.Left>- <Input.Actions.Right>- <Input.SendAction />- </Input.Actions.Right>- </Input.Actions>- </Input.Footer>- </Input.Layout>- </Input.DropZone>- </Input.Root>- </ChannelInputContainer>+ <Input.Layout>+ <Input.DropOverlay />+ <Input.FormatRibbon>+ <FormatButtons+ selectionState={() => markdownEditor.selection}+ onInlineFormat={(format) =>+ applyInlineFormat(markdownEditor.lexical, format)+ }+ onNodeFormat={(format) =>+ applyNodeFormat(markdownEditor.lexical, format)+ }+ />+ </Input.FormatRibbon>+ <Input.EditorShell+ ref={setScrollContainer}+ onClick={(event) => {+ if (!isMobile()) {+ event.stopPropagation();+ markdownEditor.controls.focus();+ }+ }}+ >+ <Input.Editor>+ <MarkdownShell+ config={markdownEditor}+ placeholder={placeholder()}+ autofocus={false}+ class="text-sm"+ />+ </Input.Editor>+ </Input.EditorShell>+ <Input.Attachments kind="media" />+ <Input.Attachments kind="document" />+ <Input.Footer>+ <Input.Actions>+ <Input.Actions.Left>+ <Input.AttachFilesAction />+ <Input.ToggleFormatAction />+ </Input.Actions.Left>+ <Input.Actions.Right>+ <Input.SendAction />+ </Input.Actions.Right>+ </Input.Actions>+ </Input.Footer>+ </Input.Layout>+ </Input.DropZone>+ </Panel>+ </Input.Root>+ </ChannelInputContainer>+ </div></div></>);diff --git a/js/app/packages/block-md/component/DiscussionInput.tsx b/js/app/packages/block-md/component/DiscussionInput.tsxindex a345f79cb7..86e82b607b 100644--- a/js/app/packages/block-md/component/DiscussionInput.tsx+++ b/js/app/packages/block-md/component/DiscussionInput.tsx@@ -29,6 +29,7 @@ import type { IUser } from '@core/user/types';import { InputActionButton } from '@channel/Input/ActionButton';import { useInputCommands } from '@channel/Input/context';import PaperclipIcon from '@phosphor-icons/core/regular/paperclip.svg?component-solid';+import { Panel } from '@ui';export type DiscussionInputProps = InputCallbacks & {input: InputData;@@ -198,46 +199,48 @@ export function DiscussionInput(props: DiscussionInputProps) {return (<Input.Root input={inputView()} commands={commands}>- <Input.Layout>- <Input.FormatRibbon>- <FormatButtons- selectionState={() => markdownEditor.selection}- onInlineFormat={(format) =>- applyInlineFormat(markdownEditor.lexical, format)- }- onNodeFormat={(format) =>- applyNodeFormat(markdownEditor.lexical, format)- }- />- </Input.FormatRibbon>- <Input.EditorShell- ref={setScrollContainer}- onClick={(event) => {- if (!isMobile()) {- event.stopPropagation();- markdownEditor.controls.focus();- }- }}- >- <Input.Editor>- <MarkdownShell- config={markdownEditor}- placeholder={inputView().placeholder}- initialValue={inputView().value}- autofocus={!isMobile() && (props.autofocus ?? true)}- class="text-sm"+ <Panel depth={2}>+ <Input.Layout>+ <Input.FormatRibbon>+ <FormatButtons+ selectionState={() => markdownEditor.selection}+ onInlineFormat={(format) =>+ applyInlineFormat(markdownEditor.lexical, format)+ }+ onNodeFormat={(format) =>+ applyNodeFormat(markdownEditor.lexical, format)+ }/>- </Input.Editor>- </Input.EditorShell>- <Input.Footer>- <Switch>- <Match when={props.children}>{props.children}</Match>- <Match when>- <DefaultActions input={inputView()} />- </Match>- </Switch>- </Input.Footer>- </Input.Layout>+ </Input.FormatRibbon>+ <Input.EditorShell+ ref={setScrollContainer}+ onClick={(event) => {+ if (!isMobile()) {+ event.stopPropagation();+ markdownEditor.controls.focus();+ }+ }}+ >+ <Input.Editor>+ <MarkdownShell+ config={markdownEditor}+ placeholder={inputView().placeholder}+ initialValue={inputView().value}+ autofocus={!isMobile() && (props.autofocus ?? true)}+ class="text-sm"+ />+ </Input.Editor>+ </Input.EditorShell>+ <Input.Footer>+ <Switch>+ <Match when={props.children}>{props.children}</Match>+ <Match when>+ <DefaultActions input={inputView()} />+ </Match>+ </Switch>+ </Input.Footer>+ </Input.Layout>+ </Panel></Input.Root>);}