feat(templates): add the Workspace SaaS invoice preset - #641
Merged
DemchaAV merged 1 commit intoSep 1, 2026
Merged
Conversation
A violet-accented sheet: a brand masthead over a short accent bar, a half-split issuer and metadata header, two addressed parties on filled discs, a service-line table whose marks sit on coloured tiles, a settlement row pairing the bank details against the totals, and a closing band carrying the wordmark. Ships as invoice.presets.WorkspaceInvoice on the existing StructuredInvoiceData model. Like PaymentsInvoice it flows: the table's header repeats, a continuation page reserves a deeper bottom margin, and every page carries its number. The design's own closing band cannot be page chrome — a header footer zone takes only strings and the band holds a wordmark and a link — so it is body content and the number is the only chrome. This design states its currency once per money column and writes the figures under it bare, carrying the code only on the total, which is the opposite of what PaymentsInvoice does; a quantity is written with what it counts. Both parties print a registration under their address, and one with no number prints no label. Two of the design's type corrections are carried as measured constants: half a pixel of screenshot antialiasing in every cap, and the 6% the body face adds to an all-caps run at the same cap height. Guarded by a 16-case smoke test, an exact layout snapshot and a pixel-parity gate.
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
slack-invoiceis the second bundle whose source carries a real company's identity, andthe second invoice built to paginate. It follows the pattern #638 set: the layout is
ported in full, the identity is not.
What
invoice.presets.WorkspaceInvoiceon the existingStructuredInvoiceDatamodel, on topof the recipient registration added in #640.
De-branded
Two assets, both dropped:
brand-lockup.svgwas the real Slack wordmark (logos:slack) anditem-brand-mark.svgits glyph, which the design draws bare on one service line whileevery other mark sits on a coloured tile. Neither is ported.
tile colour is drawn bare, so the behaviour is general rather than tied to one mark.
product-flavoured (
item-key-management,item-workflow,item-support), so they arerenamed to what they draw:
search,grid,shield.shipped sample is neutral.
Money, the other way round
PaymentsInvoicecarries a currency symbol on every figure. This design does theopposite: it names the currency once per money column and writes the figures under it
bare, putting the code only on the total (
USD 587.50). The preset follows its owndesign rather than its sibling, and a quantity is written with what it counts
(
50 Users) from the model'squantityandunit.Two measured type corrections
A cap read off a screenshot includes about half a pixel of antialiasing on each edge and
the whole of it lands in the size, so
sizeForCaptakes it back off. And the body facesets uppercase about 6% wider than the design's at the same cap height — measured across
three all-caps runs, while mixed-case runs at the same sizes matched within 2% — so
sizeForCapscarries that as a size correction. There is no letter-spacing API to takeit out with instead.
Tests
map has exactly two bands —
x 45..256, y 46..99(the lockup box, 7 285 px) andx 60..91, y 724..755(a 31 × 31 square at the first line's mark, 830 px). Both arethe marks deliberately not shipped. The accent bar, the issuer block, the metadata
grid and its divider, both parties and their discs, all four table rows including the
three tiled marks, the payment card, the totals, the accent rule, the due panel, the
thank-you block and the closing band are pixel-identical; 207 layout nodes, and the
text layer differs only by the wordmark.
engine (2.2.2) and
2.2.3-SNAPSHOT, so there is no engine drift to account for.WorkspaceInvoiceSmokeTest— 16 cases: the packaged marks, the unknown-mark dataerror, a line with no mark, the wordmark fallback, the currency named once and not on
every figure, the quantity with its unit, both parties' registrations and the absent
one, the closing address as an annotation, a missing ship-to, a payment card with no
note, an empty document, and a thirty-line invoice that runs on, repeats its column
names on page two and numbers its pages.
WorkspaceInvoiceLayoutSnapshotTest— exact geometry, one page.WorkspaceInvoiceVisualParityTest— pixel baseline; recorded without disturbing anyother baseline in the suite.
reactor gate does not cover it — the committed preview is rendered from a full
install of this branch, so the catalogue's drift test passes.
invoice-workspace-v2.