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(search): add preview button to search view header (#2541)

gbirman045d12d10b9c
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx
index d000975e91..1c1d03c1d3 100644
--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx
+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/soup-filters-bar.tsx
@@ -73,7 +73,24 @@ export const SoupFiltersBar = () => {
<Match when={isComponentListView('search')}>
<div class="w-full flex flex-col gap-2 p-2 border-b border-edge-muted/50">
<SoupSearchbar autoFocus />
- <SearchIndexFilter />
+ <div class="flex items-center gap-2">
+ <SearchIndexFilter />
+ <div class="flex-1" />
+ <Tooltip
+ tooltip={<LabelAndHotKey label="Preview" shortcut="space" />}
+ >
+ <Button
+ variant={soup.previewEntity() ? 'primary' : 'ghost'}
+ size="sm"
+ class="rounded-xs [&_svg]:size-4 px-1 border border-transparent"
+ onClick={togglePreview}
+ onMouseEnter={() => setPreviewBtnHovering(true)}
+ onMouseLeave={() => setPreviewBtnHovering(false)}
+ >
+ <AnimatedPreviewIcon triggerAnimation={previewBtnHovering()} />
+ </Button>
+ </Tooltip>
+ </div>
</div>
</Match>
<Match when={true}>