Repository navigation
Expect a page code block's code-line padding in the Copy journey - #5233
Merged
Merged
Conversation
#4738 gave every page code block a code line (20px) above its code, so revealing a fence's source in the composer moves nothing. The Copy journey still pinned the old 12px for every block, including the plain block on a phone. Page blocks now expect 20px; the numbered lf-code widget keeps its own 12px inset, which #4738 didn't change. The assertion still protects #1541's behavior that Copy reserves no room in the block. Closes #5175
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.
#4738 deliberately gave every page code block a code line above and below its code (
padding: var(--code-line) …inbrowser/styles/components/reading.css, 20px at the top), so a fence's source revealed under the composer's caret moves nothing. Its description says this "gives every code block 8px more room above its code". The nightly journeytest_code_copy_keeps_source_and_stays_beside_scrolling_and_revised_blocksstill pinned the old 12px for every block, so it has failed since that merge.The test now expects 20px for the page blocks, both on desktop and for the plain block on a phone. The numbered
lf-codewidget keeps its own 12px inset (--lf-code-inset-blockinpackages/default/styles/code.css), which #4738 didn't touch. The assertion still protects what #1541 added it for: Copy overlays the block and takes no room from it. No product code changes.The journey failed on current main with the same
'20px' == '12px'assertion as the nightly run, and passes with this change (uv run pytest tests/journeys/test_render_anchors.py::test_code_copy_keeps_source_and_stays_beside_scrolling_and_revised_blocks --run-nightly).Closes #5175 — automated triage