chore(admin): draw the catalogue and the vat rates with components only - #92
Merged
Conversation
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
The last 24 raw
table,thead,tr,th,td,ulandlielements leavesrc/surfaces/. Two surface components —ProductTableandVatRateTable— translate a product and a rate into typed cells;Tablerenders them and knows neither.The lint ban is closed on those elements, with a message naming ADR 0004, and ADR 0003's table of forbidden markup gains the row. Verified that it refuses: a
<table>planted in a surface produced four errors naming the ADR.The rendering does not change — proven, not asserted
This epic moves markup; it does not restyle. Captured the same catalogue screen on
developand on this branch and compared them pixel by pixel:One region, and it is a fix.
The comparison found a bug I shipped in #88
font:is a shorthand that resetsfont-family. The typography migration replacedfont-sizewithfont:where the size stood — sometimes below afont-family, which the shorthand then undid. Three rules were affected, and all three lost their monospace face silently:developCatalogueView .referenceGalleryMenu aGallerySection .nameNeither the type check, nor lint, nor reading the screenshots caught it. The pixel comparison did.
The first commit fixes the two gallery rules and teaches the guard the rule:
npm run lint:typenow refuses anyfont:declared after afont-family, verified against a planted failure. The catalogue's rule needed no fix — it is deleted, since the cell owns the reference now.Dead CSS removed
Seven rules in
CatalogueViewand one inVatRatesdescribed cards and columns these files no longer render. Left behind they would read as current, which is worse than absent.Tests
Four existing tests interrogated markup selectors —
td.reference,.state,td.percent,.default— that the generic table does not produce. Modified with the user's explicit approval, after checking the behaviour was intact, and each is stricter than before:td.reference === '—'; now asserts a dash appears and that noundefinedornullreaches the screen — two faults it used to allow;.state === 'Draft'; now also asserts no rawdraftkey is shown;None depends on markup any more, so none will break on the next migration.
Test plan
just frontend-check— typecheck, lint, theme tokens, type scalejust frontend-test— 190 tests in 24 filesjust frontend-buildjust e2e— desktop-light 4, desktop-dark 4, mobile-light 5develop, aboveBackend untouched, so
backend-check,backend-testandapi-checkdo not apply.One i18n key added,
settings.rates.title, in both languages: the rates table needs an accessible name and had none. Not visible on screen.Part of #81. Closes #85