Repository navigation
Conversation
👷 Deploy request for grand-selkie-225f87 pending review.Visit the deploys page to approve it
|
jchen0824
force-pushed
the
fix/markdown-preview-scroll
branch
from
November 23, 2026 06:13
3a3db10 to
f347cb3
Compare
The preview put overflow_y_scrollbar() on its absolutely positioned box. That wrapper keeps the box's position and insets on the scrolled content, so inset_0 pinned the content to the visible height and nothing scrolled: long markdown files were cut off in Preview and Split. Use the pattern Herdr documents for an absolute scroll area, as the Changes list does: overflow_y_scroll() on the box, the TextView in a flex_none() page at its full height, and a Scrollbar.vertical with the same id.
jchen0824
force-pushed
the
fix/markdown-preview-scroll
branch
from
November 23, 2026 11:09
f347cb3 to
fdfdab7
Compare
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.
Problem
In a file tab, a long markdown file couldn't be scrolled in Preview or Split: the rendered text was cut off at the bottom of the tab.
Cause
The preview called
overflow_y_scrollbar()on its absolutely positioned box (absolute().inset_0()).overflow_y_scrollbar()wraps its element: Herdr'sScrollablecopies the element's size and flex styles to the wrapper, but keepspositionand the insets on the element, which becomes the scrolled content. Soinset_0pinned the content to the visible height, and there was nothing to scroll.Fix
The fix uses the pattern Herdr documents for an absolutely positioned scroll area. The typings for
Scrollbardescribe it, and it's what 2code's Changes list and Herdr's own Changes panel use:overflow_y_scroll()on the absolute box (md-<id>);TextViewin aflex_none()page, so it keeps its full height;Scrollbar.vertical("md-<id>")over the box, matched by id.RECIPE.mdgets a Watch out note aboutoverflow_y_scrollbar()on absolute elements.Checked
herdr-app check mods/2codepasses.