Skip to content

ref(layout) align page paddings#111823

Open
JonasBa wants to merge 6 commits intojb/pageframe/layoutpagefrom
jb/pageframe/layout-alignment
Open

ref(layout) align page paddings#111823
JonasBa wants to merge 6 commits intojb/pageframe/layoutpagefrom
jb/pageframe/layout-alignment

Conversation

@JonasBa
Copy link
Copy Markdown
Member

@JonasBa JonasBa commented Mar 30, 2026

Audit pages for layout use so that menus, headers and page contents are aligned horizontally with each other. Since many layouts use bespoke styling, this is only the first pass of pages that are easily visible by going through the list of some top level routes

CleanShot 2026-03-30 at 13 45 27

@JonasBa JonasBa requested review from a team as code owners March 30, 2026 20:34
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 30, 2026
primaryNavigation.layout === 'sidebar' &&
secondaryNavigation?.view === 'expanded'
}
padding={props.withPadding ? '2xl 3xl' : undefined}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We never pass this for page frame components so it can be removed

borderTop={
hasPageFrame ? undefined : background === 'secondary' ? 'primary' : undefined
}
borderTop={background === 'secondary' ? 'primary' : undefined}
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.

Removed hasPageFrame guard causes unwanted border

Medium Severity

The hasPageFrame guard was removed from the borderTop condition. Previously, when hasPageFrame was true, borderTop was always undefined. Now it evaluates background === 'secondary' ? 'primary' : undefined regardless of hasPageFrame. Since every caller passes background="secondary", this introduces an unwanted borderTop in the page-frame layout that was previously explicitly suppressed.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, this is fine.

… layout

The non-pageFrame padding should use {xs: 'xl', md: '3xl'} to match the old CSS behavior:
- Screens < 992px: xl padding
- Screens >= 992px: 3xl padding

Previously used {md: 'xl', lg: '3xl'} which incorrectly applied xl padding to screens between 992-1200px.

Co-authored-by: Jonas <JonasBa@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

import {useExplorerPanel} from 'sentry/views/seerExplorer/useExplorerPanel';
import {isSeerExplorerEnabled} from 'sentry/views/seerExplorer/utils';

import {NAVIGATION_MOBILE_TOPBAR_HEIGHT_WITH_PAGE_FRAME} from './constants';
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.

Duplicate imports from same constants module

Low Severity

Two separate import statements pull from './constants'NAVIGATION_MOBILE_TOPBAR_HEIGHT_WITH_PAGE_FRAME and PRIMARY_HEADER_HEIGHT. These can be combined into a single import statement.

Fix in Cursor Fix in Web

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