docs: render drill screenshots at a uniform width (BCTL-0) - #102
Open
vineethkrishnan wants to merge 1 commit into
Open
docs: render drill screenshots at a uniform width (BCTL-0)#102vineethkrishnan wants to merge 1 commit into
vineethkrishnan wants to merge 1 commit into
Conversation
The drill screenshots ranged from 1173px to 4206px wide because freeze sizes each image to its longest line. VitePress fits every image to the content column, so on-page text size is inversely proportional to pixel width: the narrow captures rendered with oversized text and the wide ones with tiny text. Adds render.sh, which pins every image to the same width by padding the first line to a fixed column budget, and re-renders all ten at 4273px. The budget is 120 characters, the smallest that fits the widest capture without wrapping; wrapping tighter than the content splits table rows mid-value. freeze's --width flag does not work for this. It widens the canvas without scaling the font, shrinking the text instead of keeping it consistent.
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.
Summary
Fixes inconsistent screenshot text size in the storage backend drill doc. The images ranged from 1173px to 4206px wide, a 3.6x spread, because freeze sizes each image to its longest line. VitePress fits every image to the content column, so on-page text size is inversely proportional to pixel width:
01-config-validate(1173px, 27 characters) rendered with oversized text while04-run-backup(4206px, 118 characters) rendered tiny.All ten are now 4273px wide, so they scale to the same apparent font size.
Changes
render.sh*.pngREADME.mdNotes for review
Column budget is 120, not 80. My first attempt wrapped at 80, which split the
statusandsnapshotstable rows mid-timestamp. The real content maxes at 118 characters, so 120 is the smallest budget that keeps every capture unwrapped. Raising it later means re-rendering the whole set, which is why the script takes it as one variable.freeze's
--widthflag does not solve this. It widens the canvas without scaling the font, so the text shrinks rather than staying consistent. Width has to come from the content, hence the padding approach.An earlier measurement was misleading.
awk lengthcounts bytes, so the box-drawing separator in06-statusread as 240 "characters" when it is 80 box-drawing glyphs at 3 bytes each. True widths are 27 to 118.Testing
npm run docs:buildpasses01) and a table-heavy one (06) render at matching glyph size