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.

fix: split header right styling (#2084)

Peter Chinmanfc3b5578803f
diff --git a/js/app/packages/app/component/split-layout/components/SplitHeader.tsx b/js/app/packages/app/component/split-layout/components/SplitHeader.tsx
index 846eb2d3e1..8c1e182755 100644
--- a/js/app/packages/app/component/split-layout/components/SplitHeader.tsx
+++ b/js/app/packages/app/component/split-layout/components/SplitHeader.tsx
@@ -184,6 +184,11 @@ export function SplitHeader(props: { ref: Setter<HTMLDivElement | null> }) {
throw new Error('<SplitHeader> must be used within a <SplitLayout>');
const layout = useContext(SplitLayoutContext);
+ const shouldShowRightmost = () =>
+ !isTouchDevice() &&
+ (shouldShowEntityNavigation(soup, panel) ||
+ (layout && canSpotlight(layout.manager)));
+
return (
<div
class="isolate relative w-full h-10 touch:h-11 overflow-clip text-ink shrink-0 border-b border-edge-muted/50"
@@ -206,24 +211,25 @@ export function SplitHeader(props: { ref: Setter<HTMLDivElement | null> }) {
/>
<div
- class="min-w-4 h-full shrink-0 flex items-center gap-0.5 px-2"
+ class={cn(
+ 'min-w-4 h-full shrink-0 flex items-center gap-0.5 pl-2',
+ !shouldShowRightmost() && 'pr-2'
+ )}
ref={(ref) => {
panel.layoutRefs.headerRight = ref;
}}
- >
- <div class="z-2 relative flex items-center gap-0.5 h-full order-last">
- <Show
- when={
- !isTouchDevice() &&
- (shouldShowEntityNavigation(soup, panel) ||
- (layout && canSpotlight(layout.manager)))
- }
- >
- <EntityNavigationIndicator />
- <SplitSpotlightButton />
- </Show>
+ />
+
+ <Show when={shouldShowRightmost()}>
+ <div
+ class={
+ 'pl-0.5 pr-2 z-2 relative flex items-center gap-0.5 h-full order-last'
+ }
+ >
+ <EntityNavigationIndicator />
+ <SplitSpotlightButton />
</div>
- </div>
+ </Show>
</div>
</div>
);