Skip to content

fix(config-builder): keep YAML preview sticky on scroll#499

Merged
vitorvasc merged 2 commits into
open-telemetry:mainfrom
lucacavenaghi97:fix/preview-card-sticky-position
May 18, 2026
Merged

fix(config-builder): keep YAML preview sticky on scroll#499
vitorvasc merged 2 commits into
open-telemetry:mainfrom
lucacavenaghi97:fix/preview-card-sticky-position

Conversation

@lucacavenaghi97
Copy link
Copy Markdown
Member

@lucacavenaghi97 lucacavenaghi97 commented May 16, 2026

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-start keeps 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

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.
@lucacavenaghi97 lucacavenaghi97 requested review from a team as code owners May 16, 2026 22:02
@netlify
Copy link
Copy Markdown

netlify Bot commented May 16, 2026

Deploy Preview for otel-ecosystem-explorer ready!

Name Link
🔨 Latest commit fd141a9
🔍 Latest deploy log https://app.netlify.com/projects/otel-ecosystem-explorer/deploys/6a08ea4f55e376000821c51e
😎 Deploy Preview https://deploy-preview-499--otel-ecosystem-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-start to the preview section to prevent it from stretching to row height.
  • Change sticky offset from lg:top-24 to lg:top-20, matching configuration-toc-sidebar.tsx.

@vitorvasc vitorvasc added this pull request to the merge queue May 18, 2026
Merged via the queue into open-telemetry:main with commit a5c5643 May 18, 2026
18 checks passed
@lucacavenaghi97 lucacavenaghi97 deleted the fix/preview-card-sticky-position branch May 18, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants