Skip to content

feat(pageframe): adopt TopBar.Slot in Layout.Title#112515

Merged
natemoo-re merged 2 commits intomasterfrom
nm/pageframe/title
Apr 9, 2026
Merged

feat(pageframe): adopt TopBar.Slot in Layout.Title#112515
natemoo-re merged 2 commits intomasterfrom
nm/pageframe/title

Conversation

@natemoo-re
Copy link
Copy Markdown
Member

@natemoo-re natemoo-re commented Apr 8, 2026

Closes DE-1067

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 8, 2026
@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 8, 2026

@natemoo-re natemoo-re marked this pull request as ready for review April 9, 2026 14:20
@natemoo-re natemoo-re enabled auto-merge (squash) April 9, 2026 14:21
Comment on lines +144 to +146
if (hasPageFrame) {
return <TopBar.Slot name="title">{props.children}</TopBar.Slot>;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The Layout.Title component in page frame mode discards props like className, which breaks styling applied via styled(Layout.Title).
Severity: MEDIUM

Suggested Fix

Update the Layout.Title component to accept and spread additional props to the underlying element. This will ensure that className and other attributes are passed through correctly.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: static/app/components/layouts/thirds.tsx#L144-L146

Potential issue: In page frame mode, the `Layout.Title` component only forwards its
`children` prop, discarding all other props, including `className`. This prevents styles
applied via `styled(Layout.Title)` from being rendered, causing UI breakages in multiple
locations such as the alerts rule details header and the issue list header.

Did we get this right? 👍 / 👎 to inform future reviews.

const hasPageFrame = useHasPageFrameFeature();

if (hasPageFrame) {
return <TopBar.Slot name="title">{props.children}</TopBar.Slot>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: A second TopBar.Slot with the name 'title' is registered on Settings pages, causing a conflict that hides either the breadcrumbs or the page title.
Severity: MEDIUM

Suggested Fix

Conditionally render the TopBar.Slot within Layout.Title to avoid registering it on pages where the 'title' slot is already in use, such as the Settings pages. Alternatively, use a different, non-conflicting slot name.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: static/app/components/layouts/thirds.tsx#L145

Potential issue: On Settings pages, which already register a `TopBar.Slot` named 'title'
for breadcrumbs, the `Layout.Title` component unconditionally registers a second
`TopBar.Slot` with the same name. This name collision causes one of the two
elements—either the breadcrumbs or the page title—to be unpredictably hidden from the
top bar, degrading the user experience on settings pages.

Did we get this right? 👍 / 👎 to inform future reviews.

@natemoo-re natemoo-re merged commit a8c4530 into master Apr 9, 2026
65 checks passed
@natemoo-re natemoo-re deleted the nm/pageframe/title branch April 9, 2026 14:28
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants