feat(templates): add the Orange Ops two-column CV preset - #632
Merged
Merged
Conversation
A one-page operations CV in three bands over a split body: a two-tone name above a dark role bar whose right edge and three accent slashes lean by one ratio, a contact strip on hairlines, then a narrow column of dotted skills, achievement discs, a degree and certifications beside a wide column of profile, dated roles, a four-metric strip and the closing lines. Ships as cv.presets.OrangeOps on the existing CvDocument model, so the port needed no model change. It is the first preset whose display family the engine does not carry: Oswald is not in graph-compose-fonts, so the preset names it through OrangeOps.DISPLAY_FONT and the caller registers it, with the gate and the example each supplying the two faces from their own module's resources. Eight berths reach their sections by title, four to a column, and a berth nobody fills takes its heading, its accent rule and its join hairline with it. A main-column heading's parenthetical is split off at the title's first bracket and set smaller beside it. Guarded by a 19-case smoke test, an exact layout snapshot and a pixel-parity gate.
| } | ||
| double[] box = new double[4]; | ||
| for (int i = 0; i < 4; i++) { | ||
| box[i] = Double.parseDouble(parts[i]); |
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.
Why
orange-ops-cvis the last of the finished AI Flow bundles still living outside thelibrary. It is a two-column operations CV — a dark role bar with accent slashes, a
contact strip on hairlines, achievement discs, and a metric strip with full-height
rules between the numbers — and none of that is reachable from any built-in preset
today.
It also asks something none of the promoted presets have asked before: its display
face is Oswald, which
graph-compose-fontsdoes not carry. The preset thereforenames the family and leaves registering it to whoever composes the document.
What
cv.presets.OrangeOpson the existingCvDocumentmodel — the port needed no modelchange. Split as the family is:
OrangeOpsroutes,OrangeOpsStylesholds thetokens, and
Masthead/Aside/Main/Widgets/Iconsdraw.The font is the caller's.
OrangeOps.DISPLAY_FONTis the name to registeragainst, and the class documentation carries the call. In this repo the callers are
the gate and the example, and each supplies the two faces from its own module's
resources (
qa/src/test/resources/fonts/oswald/,examples/src/main/resources/fonts/oswald/, with the SIL OFL text beside them). Nopublished artifact gains a font.
Eight berths, four to a column, reached by title rather than by
Slot. A berthnobody fills takes its heading, its accent rule and its join hairline with it — the
rule belongs to the pair of blocks, so dropping one block must not leave a line over
the gap.
Two shapes are what the design shows rather than what a row could hold. The role
bar is a layer stack because the plate's box and the slash group's box overlap
horizontally. An achievement is a layer stack because a table cell anchors its disc to
the foot of the pair instead of the top. And a badge is one leaf, not two: the disc is
re-emitted around the glyph inside a widened viewBox, because a shape container placed
in a table cell reserves its box and composes none of its children.
A heading's parenthetical is split off at the title's first bracket and set smaller
beside it, which is how
KEY KPI SNAPSHOT (Recent 12 Months)reaches the page.As on the presets before it, a link is drawn as its own label with the address behind
it. That is the one deliberate departure from the ported sheet, measured at
7 241 of 2 173 720 pixels.
One note on the baseline
The bundle's published preview was rendered on
2.2.1-SNAPSHOT. Frozen on that engineit reproduces the preview to 0 pixels; on
2.2.3-SNAPSHOTit differs by 50 858,and diffing the text layers shows why — the preview reads
Warehouse Opera ons,marcus.benne @email.comandCounterbalance Forkli Truck Instructor, the Latin GSUBligatures the engine has since stopped emitting. The current engine draws the words
correctly, so the parity baseline is the bundle rendered on the engine this branch
targets, not the stale preview.
Tests
against the bundle's 116, rendering the bundle's own data on
2.2.3-SNAPSHOT.OrangeOpsSmokeTest— 19 cases: the packaged marks, the unknown-mark data error, anentry with no mark, the uppercased name and role bar, the parenthetical heading, a
trunk prefix left undialled (
+44 (0)20 7946 0832→tel:+442079460832), the globeon a link that is not a network, metrics whose captions differ in length, the link
targets on every kind of title, a dropped berth taking its join rule with it, a
document with nothing but an identity, and the run onto a second page.
OrangeOpsLayoutSnapshotTest— exact geometry, 116 nodes, one page.OrangeOpsVisualParityTest— pixel baseline; recorded without disturbing any otherbaseline in the suite.
./mvnw -B -ntp clean verify -pl :graph-compose-core,:graph-compose-render-pdf,:graph-compose-render-docx,:graph-compose-render-pptx,:graph-compose-templates,:graph-compose-testing,:graph-compose-qa,:graph-compose-coverage -amcv-orange-ops-v2;assets/readme/examples/cv-orange-ops-v2.pdfis regenerated from the committed code.