You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/27 11:03:12 UTC
[PR] chore(desktop): drop tokens nothing reads [maka]
Astro-Han opened a new pull request, #4017:
URL: https://github.com/apache/maka/pull/4017
## Summary
Twenty-four custom properties in `maka-tokens.css` have no `var()` consumer anywhere — not in renderer CSS, not in `@maka/ui`, not in stories, and not in Astryx, which reads a handful of Maka properties through its own theme bridge and was checked separately. A token nobody reads still has to be kept consistent with the palette, the light and dark blocks, and every audit that walks the file, so it costs maintenance and returns nothing.
Three of the groups are more than single tokens:
- **`--elevation-*`** was three aliases of `--shadow-*` with one consumer between them. The tier goes; `settings/form.css` names `--shadow-med` directly, which is the value it already resolved to.
- **The icon scale** mirrored `ICON_SIZE` in `@maka/ui`'s `icons.tsx` by its own admission. `ICON_SIZE` has 209 consumers, the CSS mirror had two. The two CSS-clamped rungs stay; the rest go, including `--icon-size` (an alias marked "deprecated, one release") and `--icon-chrome`, whose only reader was that alias.
- **The z-index ladder** kept four rungs no layer sits on. Reserving unused floors invites the next reader to pick by name rather than by stacking, so the ladder now lists what exists.
Four comments that named a deleted token as live are corrected with it.
`--foreground-8` is deliberately kept beside `--foreground-alpha-*`: the first mixes into the background and is opaque, the second is a real alpha channel, and the file already records why they cannot substitute for each other.
## Verification
- Consumer search covered `apps`, `packages`, `native`, `scripts` (css/ts/tsx/js/mjs/html) plus `@astryxdesign/core/dist` and `theme-neutral`, excluding build output and caches. Re-run after the deletions: no `var()` reference to any removed property, and no bare mention left in the token file.
- Dynamic access checked separately: the only properties written or read through `setProperty` / `getPropertyValue` are `--background` and `--maka-drawer-tooltip-x`.
- `npm --workspace @maka/desktop run build:with-deps` — passes, so no CSS parse or resolution error.
- `e2e/link-color-contract.spec.ts`, `e2e/settings-row-focus-ring.spec.ts` — 5 passed. These assert computed color and focus-ring geometry, the two surfaces closest to the removed color and shadow tiers.
- `npm run format:check` — clean.
- Not run: the repository-wide suite and Storybook visual smoke. CI covers both.
## Root cause
No behavior changes: every removed property resolved to nothing at every call site, because there were no call sites. The one substituted value (`--elevation-overlay` → `--shadow-med`) is the same computed shadow.
Capability given up: the WCAG measurements recorded on `--control` (L0.65 for 3:1 non-text contrast) leave with the token. Anyone re-adding checked-control styling would re-derive them; the reasoning stays in git history at this commit's parent.
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: Claude Code — the consumer audit, the deletions, and this description. Reviewed and verified by the contributor before opening.
## Checklist
- [x] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [ ] Yes — described under Summary above
- [x] No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] chore(desktop): drop tokens nothing reads [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #4017:
URL: https://github.com/apache/maka/pull/4017#issuecomment-5438100023
Folded into #3997 — same defect end to end, so it reverts as one. The token sweep is commit 2c1599260 there.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] chore(desktop): drop tokens nothing reads [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed pull request #4017: chore(desktop): drop tokens nothing reads
URL: https://github.com/apache/maka/pull/4017
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org