fix(config-builder): keep YAML preview sticky on scroll#499
Merged
vitorvasc merged 2 commits intoMay 18, 2026
Merged
Conversation
The preview <section> was being stretched to the grid row height by the default `align-items: stretch`, saturating its containing block. Sticky needs the element to be shorter than its containing block, otherwise it falls back to static positioning, so scrolling carried the preview off screen. Add `lg:self-start` so the section keeps its natural height inside the much taller grid row. Unblocks open-telemetry#478, which highlights the YAML section the user is currently editing and only makes sense if the preview stays in view.
✅ Deploy Preview for otel-ecosystem-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the sticky behavior of the Configuration Builder's Output Preview, which was being stretched to the full grid row height by the default align-items: stretch and consequently losing its sticky positioning. Adds lg:self-start so the section keeps its natural height inside the taller row, and aligns the sticky offset (lg:top-20) with the sibling TOC sidebar.
Changes:
- Add
lg:self-startto the preview section to prevent it from stretching to row height. - Change sticky offset from
lg:top-24tolg:top-20, matchingconfiguration-toc-sidebar.tsx.
vitorvasc
approved these changes
May 18, 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.
The Output Preview on the Configuration Builder was supposed to stay pinned in view while scrolling the form, but in practice it scrolled off with the page.
Cause: the section was being stretched to the full grid row height by the default
align-items: stretch. Sticky only works when the element is shorter than its containing block, otherwise it falls back to static. The form column makes the row ~2700px tall, the preview saturated the same height, sticky stopped working.lg:self-startkeeps the section at its natural height (~880px) inside the much taller row.Prerequisite for #478 (highlight the YAML section being edited): that feature is only useful if the preview stays in view