fix(modal): center full-size modals against the viewport instead of the content area#4984
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Docs on the Reviewed by Cursor Bugbot for commit eb39a87. Configure here. |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit eb39a87. Configure here.
Greptile SummaryThis PR fixes visual centering of
Confidence Score: 5/5Safe to merge — the change is a four-line conditional that only affects The fix is minimal and well-scoped: removing the padding offset for No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ModalContent renders] --> B{size === 'full'?}
B -- Yes --> C[style = undefined\nno padding offset\ncenter against full viewport]
B -- No --> D{isWorkflowPage?}
D -- Yes --> E["paddingLeft = calc(--sidebar-width - --panel-width)"]
D -- No --> F[paddingLeft = --sidebar-width]
C --> G[Modal centered on 100vw]
E --> H[Modal centered on content area\nworkflow page offset]
F --> I[Modal centered on content area\nsidebar offset]
Reviews (1): Last reviewed commit: "fix(modal): center full-size modals agai..." | Re-trigger Greptile |
Greptile SummaryFixes viewport-centering for
Confidence Score: 5/5Safe to merge — the change is a four-line conditional that removes a CSS padding offset for one modal size variant and leaves all other paths untouched. The diff is a single, well-scoped conditional: full-size modals no longer receive the sidebar-width left padding, so they center against the viewport as intended. The logic is easy to reason about, has no side effects on other sizes or pages, and aligns with how the 95vw modal was designed to span the viewport. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ModalContent renders] --> B{size === 'full'?}
B -- Yes --> C[style = undefined\nNo paddingLeft offset]
B -- No --> D{isWorkflowPage?}
D -- Yes --> E["paddingLeft = calc(sidebar-width - panel-width)"]
D -- No --> F["paddingLeft = var(--sidebar-width)"]
C --> G[Flex container centers modal\nagainst full viewport]
E --> H[Flex container centers modal\nagainst content area]
F --> H
Reviews (2): Last reviewed commit: "fix(modal): center full-size modals agai..." | Re-trigger Greptile |
Summary
size='full') modals — like the execution snapshot opened from logs — were centered with a sidebar-width left padding, shifting the 95vw modal off true center whenever the sidebar was opensize='full'modals now skip the content-area padding and center against the full viewport; smaller sizes keep the existing content-area centeringsize='full'consumerType of Change
Testing
Tested manually
Checklist