Skip to content

fix: keep code and document widget boxes stable during upgrade - #5015

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-4948
Nov 1, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-4948

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The default widget-quality check reproduces both first-presentation regressions on main. lf-code adds scrollbar clearance in its pre-upgrade padding even though the native pre::after already supplies it; removing that duplicate inset keeps the authored and numbered boxes equal. lf-text-document gives its caption and pre-upgrade caption pseudo-element the same --font-small, so changing the host from source typography to page typography no longer changes the caption's leading.

This preserves the scrollbar room intended by #3752 and the authored Markdown preview introduced in #4861. On screen, code loses 8 px of excess room before upgrade; completed code stays the same. Document captions use the interface's small-font leading before and after upgrade; the preview and source viewports keep their existing bounds.

The existing default-package quality test failed before and passes after in column and workspace layouts, without changing its findings allowance. Focused wrapping, Markdown/source switching, viewport/scroll retention, and interface-font checks pass. All 737 runtime tests and pre-commit pass. A feature-gallery startup comparison reaches presentation with the same 75 code requests and 71 JavaScript requests; JavaScript bytes are unchanged and CSS is 142 bytes smaller.

Visual comparison

The Markdown preview caption changes from inherited 18.4 px leading to the shared 16.675 px small-font leading. Source-capture captions take the same rule; completed code has no pixel difference in the native-code state.

Before:

Document caption before

After:

Document caption after

Closes #4948 — automated triage

Remove the duplicate code scrollbar inset: the native pre already owns its clearance float before and after upgrade. Give the text-document caption and its pre-upgrade pseudo-element the same named small font, instead of inheriting different code and page line heights.

Closes #4948
@max-sixty
max-sixty merged commit 4d5853e into main Nov 1, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/issue-4948 branch November 1, 2026 22:57
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.

Default code and text-document widgets shrink during first presentation

2 participants