feat: render JSON Resume references section#121
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (8)
📝 WalkthroughWalkthroughA new ChangesReferences Section Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Closes #46. Adds `_references` renderer for JSON Resume's `references[]`: each entry's `name` as a level-3 heading with the `reference` quote in italic beneath, joined by the standard divider rule. Entries missing the `reference` quote are silently skipped (no orphan heading); entries with no `name` render the quote anonymously. Adds `preferences.referencesAvailableOnRequest` (default `false`). When `true` and the section has no valid entries (empty / missing data, or every entry skipped), emits the conventional `References available upon request.` line under the heading instead of suppressing the section. The line text is `labels.referencesAvailableOnRequest` so it localises alongside the other display strings. Wired into `_sections` at `column: "right"`; appended to the default `rightColumnSections` order so existing users get the section automatically once they populate `references[]`. Supersedes #83 — that branch predates the `internal/`/`sections/` module split and the move of label defaults into `internal/labels-en.toml`.
- Collapse `valid.len() == 0` duplication into a single `empty` flag. - Normalise `emph(...)` invocation to function-call form for both the fallback line and the per-entry quote. - Trim verbose comments in `sections/references.typ`, `internal/labels-en.toml`, and `internal/layout.typ` so the references additions match the brevity of peer sections. - Mirror the new `references` + `referencesAvailableOnRequest` keys into `examples/labels-ga.toml` so the Irish translator example stays exhaustive against `internal/labels-en.toml`.
0e53365 to
835bf22
Compare
Summary
Closes #46. Renders JSON Resume's
references[]— each entry'snameas a level-3 heading with thereferencequote in italic beneath, joined by the standard divider rule. Entries missing thereferencequote are silently skipped (no orphan heading); entries with nonamerender the quote anonymously so the data still surfaces.Adds
preferences.referencesAvailableOnRequest(defaultfalse). Whentrueand the section has no valid entries, emits the conventionalReferences available upon request.line under the heading instead of suppressing the section. Localised vialabels.referencesAvailableOnRequest.Wired into
_sectionsatcolumn: "right"; appended to the defaultrightColumnSectionsorder so existing users get the section automatically once they populatereferences[].Supersedes #83 — that branch predates the
internal//sections/module split and the move of label defaults intointernal/labels-en.toml.Design
namerendered as===(level-3 heading), matchingawards/projects.referencerendered asemph(...)underneath the name._join_with_dividersrule, wrapped in abreakable: falseblock so a single entry doesn't split across pages.referencesandreferencesAvailableOnRequestkeys added tointernal/labels-en.tomlso translators have a single resource file to update._check_bool("referencesAvailableOnRequest", ...)added alongside the other bool validations inalta().example_full.typgains a populatedreferencesblock (one named + one anonymous quote) so the gallery exercises both paths.Test plan
make test— every example + fixture compilesmake test-template—template/cv.typstill compiles via the sed-swap pathmake example-full— regeneratedexamples/example_full.pdfand the page-2 PNG; gallery alt text updatedmake examples/tests/references.pdf— 3-page fixture covering populated entries, the available-upon-request fallback, and the default-suppressed pathReferencessubsection, label table entries (references,referencesAvailableOnRequest),referencesAvailableOnRequestpreferences row, removal from the "not yet rendered" list, addition to the top-level keys list, addition to both column-keys lists (right-column default + single-column streaming order)JSON Resume alignment
ALIGNS — JSON Resume defines
references[]withnameandreferencefields (https://jsonresume.org/schema/); this PR renders both. Thepreferences.referencesAvailableOnRequestopt-in is a template extension for the no-references-supplied case.Summary by CodeRabbit
New Features
references[], with an option to show “References available upon request” when no usable reference data is present.Documentation
Examples & Tests