ref(issue-details): use shared Sticky for event nav#113514
Merged
priscilawebdev merged 3 commits intomasterfrom Apr 22, 2026
Merged
Conversation
Always set the --top-bar-height CSS variable from useTopOffset's contentTop, regardless of the page frame feature. This lets the shared Sticky component's var-based top work as a single source of truth across desktop/mobile and page-frame-on/off, including the legacy mobile top bar fallback. Drop the now-redundant inline top style from the issue details sticky event nav; useTopOffset is still consumed for the scroll-margin math.
b394f6a to
8129fbd
Compare
The stuck-state selector was targeting a child div that has no border-radius, making the corner-flattening a no-op. The border-radius lives on the styled(Sticky) wrapper itself, so target that.
Member
Author
|
bugbot run |
Contributor
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 b8946a3. Configure here.
priscilawebdev
commented
Apr 21, 2026
Comment on lines
-37
to
-40
| if (!hasPageFrame) { | ||
| document.documentElement.style.removeProperty(TOP_BAR_HEIGHT_CSS_VAR); | ||
| return; | ||
| } |
Member
Author
There was a problem hiding this comment.
useTopOffset already returns the correct contentTop in all four modes (page-frame on/off × mobile/desktop), so --top-bar-height should mirror it unconditionally, making Sticky a single source of truth for consumers instead of leaking the mobile-legacy fallback onto each caller
TkDodo
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to this review comment on #113401: wrap the sticky event nav in the shared
Stickycomponent fromsentry/components/stickyinstead of hand-rolling the pinning logic withposition: sticky+useIsStuck.To make
Stickya true self-contained primitive, this also makes--top-bar-heightunconditional inTopBar: the CSS variable is now set fromuseTopOffset'scontentTopregardless of the page frame feature, soSticky'stop: var(--top-bar-height, 0px)works as a single source of truth across desktop/mobile and page-frame-on/off (including the legacy mobile top bar fallback). Consumers no longer need to pass an inlinetopstyle, and the inline style here is dropped.useTopOffsetis still consumed inStickyEventNavfor the scroll-margin math.Refs DE-1160