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(pr): add mobile top bar with close button and actions (#8271)

Jacob Beckerman883e1b54b4bc
diff --git a/apps/web/src/features/block-pr/component/Block.tsx b/apps/web/src/features/block-pr/component/Block.tsx
index fc034a695a..ad20d118c6 100644
--- a/apps/web/src/features/block-pr/component/Block.tsx
+++ b/apps/web/src/features/block-pr/component/Block.tsx
@@ -1,15 +1,26 @@
+import { ViewShell } from '@app/components/view-shell';
import { SidePanel } from '@components/app/side-panel';
+import { SplitPanel } from '@components/app/split-panel';
import { useBlockId } from '@core/block';
import { fireAndForget } from '@core/util/fireAndForget';
import { Show } from 'solid-js';
-import { PrDetailBody, usePrDetail } from '../views/PrDetail';
+import { prDisplayName } from '../util/prKey';
+import { PrDetailActions, PrDetailBody, usePrDetail } from '../views/PrDetail';
import { PrSplitHeader } from './PrSplitHeader';
+import { PrStatusIcon } from './PrStatus';
import { PrSidePanelSections } from './sidepanel/PrSidePanelSections';
/** Legacy block boundary for previews until the block runtime is retired. */
export default function PrBlock() {
const foreignEntityId = useBlockId();
const detail = usePrDetail(() => foreignEntityId);
+ const name = () => {
+ const data = detail.data();
+ return (
+ data?.pullRequest.name ??
+ (data ? prDisplayName(data.prRef) : 'Pull request')
+ );
+ };
return (
<div class="size-full overflow-hidden flex flex-col relative">
<SidePanel.Layout floating>
@@ -18,6 +29,14 @@ export default function PrBlock() {
status={detail.query.status}
/>
<div class="flex flex-col size-full min-w-0">
+ <ViewShell.TopBar class="hidden touch:flex">
+ <SplitPanel.CloseButton class="hidden shrink-0 touch:flex" />
+ <Show when={detail.data()?.pullRequest.status}>
+ {(status) => <PrStatusIcon status={status()} />}
+ </Show>
+ <span class="min-w-0 truncate text-sm font-semibold">{name()}</span>
+ <PrDetailActions detail={detail.data()} />
+ </ViewShell.TopBar>
<Show when={detail.data()}>
{(data) => (
<PrSplitHeader