Skip to content

refactor(InfoBox): allow a body-only box - #2665

Closed
camielvs wants to merge 1 commit into
banners-01-markdownfrom
banners-02-primitives
Closed

refactor(InfoBox): allow a body-only box#2665
camielvs wants to merge 1 commit into
banners-01-markdownfrom
banners-02-primitives

Conversation

@camielvs

@camielvs camielvs commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Why

A notice can carry a body with no title. InfoBox always rendered its title Text, so a body-only card opened with an empty semibold line and its mb-1 above the content.

What

title becomes optional and the Text renders only when there is one. Every existing caller passes a title and is unaffected.

Reviewer notes

Previously this PR also introduced contentHeight() and a CSS variable for the notice strip to publish its height into. The banners now render inline on the dashboard home rather than as a strip above every route, so nothing publishes that variable — it has been removed. What was left of that change, the plain de-duplication of calc(100vh - ${TOP_NAV_HEIGHT}px) across six layouts, is now a standalone PR with no dependency on this stack.

The safe-center alignment and tabIndex prop this PR added to BlockStack / InlineStack existed only for the strip's horizontal scroller. That scroller is gone, so they have been dropped rather than left as unused surface.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: banners-02-primitives/e204342

camielvs commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Comment thread src/components/shared/InfoBox.tsx Outdated
Comment thread src/utils/constants.ts Outdated
Comment thread src/components/ui/layout.tsx Outdated
Comment thread src/utils/constants.ts Outdated
Comment thread src/utils/constants.ts Outdated
@camielvs
camielvs force-pushed the banners-02-primitives branch from dc471e3 to ac56d12 Compare August 26, 2026 23:45
@camielvs
camielvs force-pushed the banners-01-markdown branch from 47a18de to b525bf9 Compare August 27, 2026 01:18
@camielvs
camielvs force-pushed the banners-02-primitives branch from ac56d12 to 3a5d8f1 Compare August 27, 2026 01:18
@camielvs
camielvs marked this pull request as ready for review August 28, 2026 00:02
@camielvs
camielvs requested a review from a team as a code owner August 28, 2026 00:02
A notice may carry only a body, with no title. Rendering an empty Text
still reserved its margin, so the box opened with a blank line above the
content.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@camielvs camielvs changed the title refactor(layout): centralise content-area height in contentHeight() refactor(InfoBox): allow a body-only box Aug 28, 2026
@camielvs
camielvs force-pushed the banners-02-primitives branch from 3a5d8f1 to e204342 Compare August 28, 2026 23:30

Copy link
Copy Markdown
Collaborator Author

This has been spun out into #2680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant