Repository navigation
fix: build the auto-filename title bar at render time - #95
Merged
Merged
Conversation
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.
A code block without a
filenameused to get its title bar from the injected script, after the first paint.Every section below the block then moved down by the height of the bar, about 38px, on every page load.
Quarto turns
filenameinto its window while it reads the document, before anypre-quartofilter runs, so the name the filter derived arrived too late.The filter now returns the same
DecoratedCodeBlocknode itself, and Quarto renders the bar exactly as it does for a named block, annotations included.A small new filter at
post-rendermoves thecw-automarker onto the wrapper ascode-window-auto, so themes that style that class keep working.The script no longer builds wrappers.
It still adds the style decorations, the fold and the lines chip.
A block with an empty
filenamenow keeps the single window Quarto gives it, rather than gaining a second one.On a test page in Brave at 1440px, the cumulative layout shift drops from 0.163 to 0, and the final layout is the same.
tests/run.shpasses (58 checks), with new checks for HTML and Reveal.js output.