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(document): Add beveled gradient edge to document preview popup (#1084)
Aidan Holloway-Bidwell19accca9872e
diff --git a/js/app/packages/core/component/DocumentPreview.tsx b/js/app/packages/core/component/DocumentPreview.tsxindex 06155f56f3..e6d635874a 100644--- a/js/app/packages/core/component/DocumentPreview.tsx+++ b/js/app/packages/core/component/DocumentPreview.tsx@@ -39,6 +39,8 @@ import TrashSimple from '@icon/regular/trash-simple.svg';import UserIcon from '@icon/regular/user.svg';// Components+import { ClippedPanel } from '@core/component/ClippedPanel';+import { beveledCorners } from '../../block-theme/signals/themeSignals';import { createCallback } from '@solid-primitives/rootless';import { useNavigate } from '@solidjs/router';import { globalSplitManager } from 'app/signal/splitLayout';@@ -555,89 +557,92 @@ export function PopupPreview(props: {return (<Portal><div- class="absolute select-none overflow-hidden z-toast-region w-80 bg-dialog ring-1 ring-edge text-ink rounded-lg"+ class="absolute select-none overflow-hidden z-toast-region w-80 bg-dialog text-ink"use:floatWithElement={{ element: () => props.floatRef }}onMouseEnter={props.mouseEnter}onMouseLeave={props.mouseLeave}>- <div class="p-3">- <Switch>- {/* Loading state */}- <Match when={props.item().loading}>- <Loading />- </Match>-- {/* Accessible preview */}- <Match when={matches(props.item(), isAccessiblePreviewItem)}>- {(accessibleItem) => {- const { type, fileType, subType } = accessibleItem();- return (- <div class="w-full h-full flex-col">- {/* Header with icon and actions */}- <div class="flex w-full mb-2">- <div class="w-full size-10">- <Show- when={type === 'channel'}- fallback={+ <ClippedPanel tl={!beveledCorners()} active>+ <div class="p-3">+ <Switch>+ {/* Loading state */}+ <Match when={props.item().loading}>+ <Loading />+ </Match>++ {/* Accessible preview */}+ <Match when={matches(props.item(), isAccessiblePreviewItem)}>+ {(accessibleItem) => {+ const { type, fileType, subType } = accessibleItem();+ return (+ <div class="w-full h-full flex-col">+ {/* Header with icon and actions */}+ <div class="flex w-full mb-2">+ <div class="w-full size-10">+ <Show+ when={type === 'channel'}+ fallback={+ <EntityIcon+ targetType={+ type === 'document'+ ? (subType?.type ?? fileType)+ : type+ }+ size="md"+ />+ }+ ><EntityIcon+ size="md"targetType={- type === 'document'- ? (subType?.type ?? fileType)- : type+ accessibleItem().channelType ===+ 'direct_message'+ ? 'directMessage'+ : accessibleItem().channelType ===+ 'organization'+ ? 'company'+ : 'channel'}- size="md"/>- }- >- <EntityIcon- size="md"- targetType={- accessibleItem().channelType === 'direct_message'- ? 'directMessage'- : accessibleItem().channelType ===- 'organization'- ? 'company'- : 'channel'- }- />- </Show>- </div>- <div class="flex w-fit h-full justify-right">- {renderActionButtons()}+ </Show>+ </div>+ <div class="flex w-fit h-full justify-right">+ {renderActionButtons()}+ </div></div>- </div>- {/* Document metadata */}- {renderDocumentMetadata(accessibleItem())}- </div>- );- }}- </Match>-- {/* No access error */}- <Match- when={- (props.item() as PreviewItemNoAccess).access === 'no_access'- }- >- <div class="text-sm p-4">- <Unauthorized />- </div>- </Match>-- {/* Does not exist error */}- <Match- when={- (props.item() as PreviewItemNoAccess).access ===- 'does_not_exist'- }- >- <div class="text-sm p-4">- <NotFound />- </div>- </Match>- </Switch>- </div>+ {/* Document metadata */}+ {renderDocumentMetadata(accessibleItem())}+ </div>+ );+ }}+ </Match>++ {/* No access error */}+ <Match+ when={+ (props.item() as PreviewItemNoAccess).access === 'no_access'+ }+ >+ <div class="text-sm p-4">+ <Unauthorized />+ </div>+ </Match>++ {/* Does not exist error */}+ <Match+ when={+ (props.item() as PreviewItemNoAccess).access ===+ 'does_not_exist'+ }+ >+ <div class="text-sm p-4">+ <NotFound />+ </div>+ </Match>+ </Switch>+ </div>+ </ClippedPanel></div></Portal>);