docs(of-the-day): document every setting, with real renders - #368
Merged
Conversation
Documentation only; no behaviour change. All 13 settings covered, plus the per-category block and the data-file format. Leads with why a fresh install shows "No Data": enabled is false, and the categories block is empty. The bundled word lists ship with the plugin but nothing points at them until a category is added, so the plugin looks broken rather than unconfigured. Corrects the data-file format. The old README said entries are keyed by YYYY-MM-DD; the bundled files and the loader both use the day-of-year number, "1" through "365". A file written with date keys loads without error and then shows nothing, because no key ever matches -- worth stating plainly since the failure is silent. Documents that the customization keys are font_size and text_color. The schema declares these elements through an x-style-elements block using the short names size and color, but that is the declaration format: the core expands it into font / font_size / text_color. I wrote size and color first, saw no change across four renders, and was about to record customization as broken -- it is not, the short names are just silently ignored. That is an easy mistake to make from reading the schema, so it is called out. auto_fit_text is demonstrated where it actually shows: 128x64 with body font_size 12, where shrinking gains a line. Verified by hashing renders that it is a genuine no-op at 128x32 and at 64x32, where one body line is all that fits either way, so the README says where it matters rather than implying it always does. Audits before opening: no config token dropped, all 13 schema leaves documented, no broken TOC anchors, and the section check surfaced the content-authoring tips, restored as a "writing your own list" section. Note: check_plugin reports golden drift on all eight sizes for this plugin. That is pre-existing on main -- identical figures with these changes stashed -- and confined to the body text line, which renders wider than the golden. Left alone deliberately: regenerating goldens here would bake this machine's font metrics in, and the 7-segment tRNS episode is a reminder that rasterisation can differ by dependency version. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
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.
Eighth plugin in the README pass. Documentation only; no behaviour change.
Why a fresh install shows "No Data"
enabledisfalse, and — less obviously — thecategoriesblock is empty by default. The bundled word lists ship with the plugin, but nothing points at them until a category is added. The plugin looks broken rather than unconfigured, so that's the first thing the README addresses.The data-file format was documented wrong
The old README said entries are keyed by
YYYY-MM-DD. The bundled files and the loader both use the day-of-year number,"1"through"365". A file written with date keys loads without error and then shows nothing, because no key ever matches — a silent failure worth stating plainly.A trap I walked into myself
Customization keys are
font_sizeandtext_color. The schema declares these elements through anx-style-elementsblock that uses the short namessizeandcolor— but that's the declaration format; the core expands it intofont/font_size/text_color.I wrote
sizeandcolorfirst, rendered four variants, saw them come back byte-identical, and was on the point of recording customization as broken. It isn't — the short names are just silently ignored. Instrumenting_element_styles()showed the resolver working fine with the right keys:Anyone reading the schema could make the same mistake, so it's called out in its own note.
auto_fit_textis demonstrated where it actually showsHash-comparing renders, it's a genuine no-op at 128×32 and 64×32 — one body line is all that fits either way. It earns its keep at 128×64 with a large body font, where shrinking gains a line, and that's the comparison in the README. Better than implying it always does something.
Audits before opening
One thing for you
check_plugin.pyreports golden drift on all eight sizes for this plugin. It is pre-existing onmain— identical figures (315px, max Δ=200) with my changes stashed — and confined to the body text line, which renders wider than the golden:I deliberately left the goldens alone. Regenerating them would bake this machine's font metrics in, and after the 7-segment tRNS episode I'd rather not assume my environment's rasterisation is the reference. Worth a look when you have a moment — either the goldens are stale, or something changed the body font metrics.
Verification
render_docs_assets.py --plugin of-the-day --check— images matchplugins.jsonregenerated🤖 Generated with Claude Code