Repository navigation
experimental theme contrast: text is measured on the fill it is drawn on, a state Core paints once mounted included - #12775
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
c8570a3 to
788fe69
Compare
d368c17 to
c2469d5
Compare
788fe69 to
8fca148
Compare
c2469d5 to
5bd6257
Compare
8fca148 to
b00463b
Compare
5bd6257 to
0a555b4
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision and one fix. No current spec record says what the experimental theme editor's contrast check measures, so its new rules (drawing the open scenes Core finishes on mount, counting a part's own inline color or background as its ground, and skipping screen-reader-only text) need an owner decision: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking finding:
- The open Table scene's Name column renders one fixed tree (
packages/cli/api/theme-edit/_catalog.mjs:295-306), so in the editor's overlays picture every row, Alice's and Charlie's included, reads "Bob / Design team"; let the render prop read each row.
The new census pairs are well covered: the new test and the changed assertions fail on the base and pass on this head. A failed mounted render is swallowed (_parts.mjs:1039), so consider letting it surface the way a failed main census does.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Changeset: the contrast check measures text on the fill it is drawn on, including states Core paints once a part mounts, such as a selected table row: verified (new test; base and head problem lists).
- Changeset: text only screen readers get is no longer measured: verified (a checkbox list row's hidden label leaves the census; the new test checks the selection checkbox label).
- Description: the check missed text on a fill Core paints after mount and measured screen-reader-only labels: verified (the base census has no selected-row pair and has the hidden label pair).
- Description: themes passed the check while secondary text on a selected row read under 4.5:1: verified (a gothic-based theme with a blue accent reads 3.5:1 on the head and reports nothing on the base).
- Description: found on official themes in dark mode at 3.5:1: consistent; 3.5:1 measured on a gothic-based theme with a changed accent, since the editor lists only problems a theme adds over its base.
- Description: the check measures every visible text pair: verified for the pairs the census draws (catalog, sample page and the two mounted scenes).
- Description: mounted scenes add only new pairs, a part's own inline background counts, reader-only elements add none: verified (
_parts.mjs:1014-1055,:1694-1709,:1548-1561). - Description: before, no problem for secondary text on a selected row; after, the pair is named with its ratio: verified.
- Description: row dividers and table states read as before: verified (the table states test passes on base and head; the census is otherwise unchanged).
- Description: one regression test with updates to three existing tests: verified for test bodies; three test bodies change, and a fourth file changes a shared helper.
- Description: the node test run shows no failure the base lacks: partly verified; the five changed files pass on this head, and the full suites were not run here.
- Description: the CLI typechecks: false at this head; the strict typecheck reports an undefined name in a file this pull request does not change, and the base fails the same way.
- Description: the changeset check and lint pass: verified (changeset check; lint of the changed files shows no errors).
- Description: stays a draft until the layer below lands: verified.
- Description: no new public API, default or interaction model under the fix label: verified (no command, option or field changes).
- Description: public text has no internal context: verified.
Files:
.changeset/experimental-theme-contrast-selected-row.md: clear.packages/cli/api/theme-edit/_catalog.mjs: blocking (every row named Bob).packages/cli/api/theme-edit/_parts.mjs: waits on the owner decision; one non-blocking note (silent mounted-render failure).packages/cli/api/theme-edit/theme-contrast-selected-row.test.mjs: clear.packages/cli/api/theme-edit/theme-problems-change-lead-result.test.mjs: clear.packages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clear.packages/cli/api/theme-edit/theme-table-states.test.mjs: clear.packages/cli/clients/cli/commands/experimental-theme-show-text.test.mjs: clear.
| key: 'name', | ||
| header: 'Name', | ||
| sortable: true, | ||
| renderCell: { |
There was a problem hiding this comment.
This renderCell is one fixed tree, and rendered() turns it into () => el(v.__render), so Core draws the same cell for every row: Alice and Charlie also read "Bob / Design team" in the overlays picture. Let the render prop read the row (for example row => el(v.__render, row) with a leaf that reads row.name).
| [], | ||
| {openLayers: true}, | ||
| )); | ||
| } catch { |
There was a problem hiding this comment.
Non-blocking: a failed mounted render returns silently, so the census loses its selected-row pairs and reports nothing. A failed main census marks the theme unchecked with a reason; consider the same path here.
b00463b to
e108c3c
Compare
0a555b4 to
aa59406
Compare
e108c3c to
5e53665
Compare
aa59406 to
335a24e
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision and one fix. No current spec record says what the experimental theme editor's contrast check measures, so its new rules (drawing the open scenes Core finishes on mount, counting a part's own inline color or background as its ground, and skipping screen-reader-only text) need an owner decision: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking finding:
- The open Table scene's Name column renders one fixed tree (
packages/cli/api/theme-edit/_catalog.mjs:295-306), so in the editor's overlays picture every row, Alice's and Charlie's included, reads "Bob / Design team"; let the render prop read each row.
The new census pairs are well covered: the new test and the changed assertions fail on the base and pass on this head. A failed mounted render is swallowed (_parts.mjs:1039), so consider letting it surface the way a failed main census does.
Claims and files checked
Review mode: carry-forward; reason: none
Claims:
- Changeset: the contrast check measures text on the fill it is drawn on, including states Core paints once a part mounts, such as a selected table row: verified (new test; base and head problem lists).
- Changeset: text only screen readers get is no longer measured: verified (a checkbox list row's hidden label leaves the census; the new test checks the selection checkbox label).
- Description: the check missed text on a fill Core paints after mount and measured screen-reader-only labels: verified (the base census has no selected-row pair and has the hidden label pair).
- Description: themes passed the check while secondary text on a selected row read under 4.5:1: verified (a gothic-based theme with a blue accent reads 3.5:1 on the head and reports nothing on the base).
- Description: found on official themes in dark mode at 3.5:1: consistent; 3.5:1 measured on a gothic-based theme with a changed accent, since the editor lists only problems a theme adds over its base.
- Description: the check measures every visible text pair: verified for the pairs the census draws (catalog, sample page and the two mounted scenes).
- Description: mounted scenes add only new pairs, a part's own inline background counts, reader-only elements add none: verified (
_parts.mjs:1014-1055,:1694-1709,:1548-1561). - Description: before, no problem for secondary text on a selected row; after, the pair is named with its ratio: verified.
- Description: row dividers and table states read as before: verified (the table states test passes on base and head; the census is otherwise unchanged).
- Description: one regression test with updates to three existing tests: verified for test bodies; three test bodies change, and a fourth file changes a shared helper.
- Description: the node test run shows no failure the base lacks: partly verified; the five changed files pass on this head (21 of 21), and the full suites were not run here.
- Description: the CLI typechecks: verified at this head (template-docs and strict typechecks pass).
- Description: the changeset check and lint pass: verified (changeset check; lint of the changed files shows no errors).
- Description: stays a draft until the layer below lands: verified.
- Description: no new public API, default or interaction model under the fix label: verified (no command, option or field changes).
- Description: public text has no internal context: verified.
Files:
.changeset/experimental-theme-contrast-selected-row.md: clear.packages/cli/api/theme-edit/_catalog.mjs: blocking (every row named Bob).packages/cli/api/theme-edit/_parts.mjs: waits on the owner decision; one non-blocking note (silent mounted-render failure).packages/cli/api/theme-edit/theme-contrast-selected-row.test.mjs: clear.packages/cli/api/theme-edit/theme-problems-change-lead-result.test.mjs: clear.packages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clear.packages/cli/api/theme-edit/theme-table-states.test.mjs: clear.packages/cli/clients/cli/commands/experimental-theme-show-text.test.mjs: clear.
335a24e to
cba7b36
Compare
5e53665 to
13d1a98
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision and one fix. No current spec record says what the experimental theme editor's contrast check measures, so its new rules (drawing the open scenes Core finishes on mount, counting a part's own inline color or background as its ground, and skipping screen-reader-only text) need an owner decision: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking finding:
- The open Table scene's Name column renders one fixed tree (
packages/cli/api/theme-edit/_catalog.mjs:295-306), so in the editor's overlays picture every row, Alice's and Charlie's included, reads "Bob / Design team"; let the render prop read each row.
The new census pairs are well covered: the new test and the changed assertions fail on the base and pass on this head. A failed mounted render is swallowed (_parts.mjs:1039), so consider letting it surface the way a failed main census does.
Claims and files checked
Review mode: carry-forward; reason: none
Claims:
- Changeset: the contrast check measures text on the fill it is drawn on, including states Core paints once a part mounts, such as a selected table row: verified (new test; base and head problem lists).
- Changeset: text only screen readers get is no longer measured: verified (a checkbox list row's hidden label leaves the census; the new test checks the selection checkbox label).
- Description: the check missed text on a fill Core paints after mount and measured screen-reader-only labels: verified (the base census has no selected-row pair and has the hidden label pair).
- Description: themes passed the check while secondary text on a selected row read under 4.5:1: verified (a gothic-based theme with a blue accent reads 3.5:1 on the head and reports nothing on the base).
- Description: found on official themes in dark mode at 3.5:1: consistent; 3.5:1 measured on a gothic-based theme with a changed accent, since the editor lists only problems a theme adds over its base.
- Description: the check measures every visible text pair: verified for the pairs the census draws (catalog, sample page and the two mounted scenes).
- Description: mounted scenes add only new pairs, a part's own inline background counts, reader-only elements add none: verified (
_parts.mjs:1014-1055,:1694-1709,:1548-1561). - Description: before, no problem for secondary text on a selected row; after, the pair is named with its ratio: verified.
- Description: row dividers and table states read as before: verified (the table states test passes on base and head; the census is otherwise unchanged).
- Description: one regression test with updates to three existing tests: verified for test bodies; three test bodies change, and a fourth file changes a shared helper.
- Description: the node test run shows no failure the base lacks: partly verified; the five changed files pass on this head (21 of 21), and the full suites were not run here.
- Description: the CLI typechecks: verified at this head (template-docs and strict typechecks pass).
- Description: the changeset check and lint pass: verified at this head (changeset check passes; lint of the changed files reports nothing).
- Description: stays a draft until the layer below lands: verified.
- Description: no new public API, default or interaction model under the fix label: verified (no command, option or field changes).
- Description: public text has no internal context: verified.
Files:
.changeset/experimental-theme-contrast-selected-row.md: clear.packages/cli/api/theme-edit/_catalog.mjs: blocking (every row named Bob).packages/cli/api/theme-edit/_parts.mjs: waits on the owner decision; one non-blocking note (silent mounted-render failure).packages/cli/api/theme-edit/theme-contrast-selected-row.test.mjs: clear.packages/cli/api/theme-edit/theme-problems-change-lead-result.test.mjs: clear.packages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clear.packages/cli/api/theme-edit/theme-table-states.test.mjs: clear.packages/cli/clients/cli/commands/experimental-theme-show-text.test.mjs: clear.
13d1a98 to
e9915d4
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision and one fix. No current spec record says what the experimental theme editor's contrast check measures, so its new rules (drawing the open scenes Core finishes on mount, counting a part's own inline color or background as its ground, and skipping screen-reader-only text) need an owner decision: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking finding:
- The open Table scene's Name column renders one fixed tree (
packages/cli/api/theme-edit/_catalog.mjs:295-306), so in the editor's overlays picture every row, Alice's and Charlie's included, reads "Bob / Design team"; let the render prop read each row.
The new census pairs are well covered: the new test and the changed assertions fail on the base and pass on this head. A failed mounted render is swallowed (_parts.mjs:1039), so consider letting it surface the way a failed main census does.
Claims and files checked
Review mode: carry-forward; reason: none
Claims:
- Changeset: the contrast check measures text on the fill it is drawn on, including states Core paints once a part mounts, such as a selected table row: verified (new test; base and head problem lists).
- Changeset: text only screen readers get is no longer measured: verified (a checkbox list row's hidden label leaves the census; the new test checks the selection checkbox label).
- Description: the check missed text on a fill Core paints after mount and measured screen-reader-only labels: verified (the base census has no selected-row pair and has the hidden label pair).
- Description: themes passed the check while secondary text on a selected row read under 4.5:1: verified (a gothic-based theme with a blue accent reads 3.5:1 on the head and reports nothing on the base).
- Description: found on official themes in dark mode at 3.5:1: consistent; 3.5:1 measured on a gothic-based theme with a changed accent, since the editor lists only problems a theme adds over its base.
- Description: the check measures every visible text pair: verified for the pairs the census draws (catalog, sample page and the two mounted scenes).
- Description: mounted scenes add only new pairs, a part's own inline background counts, reader-only elements add none: verified (
_parts.mjs:1014-1055,:1694-1709,:1548-1561). - Description: before, no problem for secondary text on a selected row; after, the pair is named with its ratio: verified.
- Description: row dividers and table states read as before: verified (the table states test passes on base and head; the census is otherwise unchanged).
- Description: one regression test with updates to three existing tests: verified for test bodies; three test bodies change, and a fourth file changes a shared helper.
- Description: the node test run shows no failure the base lacks: partly verified; the five changed files pass on this head (21 of 21), and the full suites were not run here.
- Description: the CLI typechecks: verified at this head (template-docs and strict typechecks pass).
- Description: the changeset check and lint pass: verified at this head (changeset check passes; lint of the changed files reports nothing).
- Description: stays a draft until the layer below lands: verified.
- Description: no new public API, default or interaction model under the fix label: verified (no command, option or field changes).
- Description: public text has no internal context: verified.
Files:
.changeset/experimental-theme-contrast-selected-row.md: clear.packages/cli/api/theme-edit/_catalog.mjs: blocking (every row named Bob).packages/cli/api/theme-edit/_parts.mjs: waits on the owner decision; one non-blocking note (silent mounted-render failure).packages/cli/api/theme-edit/theme-contrast-selected-row.test.mjs: clear.packages/cli/api/theme-edit/theme-problems-change-lead-result.test.mjs: clear.packages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clear.packages/cli/api/theme-edit/theme-table-states.test.mjs: clear.packages/cli/clients/cli/commands/experimental-theme-show-text.test.mjs: clear.
… on, a state Core paints once mounted included; text for screen readers alone is never measured
5bbcb90 to
b2001be
Compare
e9915d4 to
6b36a85
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision and one fix. No current spec record says what the experimental theme editor's contrast check measures, so its new rules (drawing the open scenes Core finishes on mount, counting a part's own inline color or background as its ground, and skipping screen-reader-only text) need an owner decision: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking finding:
- The open Table scene's Name column renders one fixed tree (
packages/cli/api/theme-edit/_catalog.mjs:295-306), so in the editor's overlays picture every row, Alice's and Charlie's included, reads "Bob / Design team"; let the render prop read each row.
The new census pairs are well covered: the new test and the changed assertions fail on the base and pass with this change. A failed mounted render is swallowed (_parts.mjs:1039), so consider letting it surface the way a failed main census does.
Claims and files checked
Review mode: carry-forward; reason: none
Claims:
- Changeset: the contrast check measures text on the fill it is drawn on, including states Core paints once a part mounts, such as a selected table row: verified (new test; base and head problem lists).
- Changeset: text only screen readers get is no longer measured: verified (a checkbox list row's hidden label leaves the census; the new test checks the selection checkbox label).
- Description: the check missed text on a fill Core paints after mount and measured screen-reader-only labels: verified (the base census has no selected-row pair and has the hidden label pair).
- Description: themes passed the check while secondary text on a selected row read under 4.5:1: verified (a gothic-based theme with a blue accent reads 3.5:1 on the head and reports nothing on the base).
- Description: found on official themes in dark mode at 3.5:1: consistent; 3.5:1 measured on a gothic-based theme with a changed accent, since the editor lists only problems a theme adds over its base.
- Description: the check measures every visible text pair: verified for the pairs the census draws (catalog, sample page and the two mounted scenes).
- Description: mounted scenes add only new pairs, a part's own inline background counts, reader-only elements add none: verified (
_parts.mjs:1014-1055,:1694-1709,:1548-1561). - Description: before, no problem for secondary text on a selected row; after, the pair is named with its ratio: verified.
- Description: row dividers and table states read as before: verified (the table states test passes on base and head; the census is otherwise unchanged).
- Description: one regression test with updates to three existing tests: verified for test bodies; three test bodies change, and a fourth file changes a shared helper.
- Description: the node test run shows no failure the base lacks: partly verified on the identical change at the previous revision; the five changed files pass (21 of 21), and the full suites were not run.
- Description: the CLI typechecks: verified on the identical change at the previous revision (template-docs and strict typechecks pass).
- Description: the changeset check and lint pass: verified on the identical change at the previous revision (changeset check passes; lint of the changed files reports nothing).
- Description: stays a draft until the layer below lands: verified.
- Description: no new public API, default or interaction model under the fix label: verified (no command, option or field changes).
- Description: public text has no internal context: verified.
Files:
.changeset/experimental-theme-contrast-selected-row.md: clear.packages/cli/api/theme-edit/_catalog.mjs: blocking (every row named Bob).packages/cli/api/theme-edit/_parts.mjs: waits on the owner decision; one non-blocking note (silent mounted-render failure).packages/cli/api/theme-edit/theme-contrast-selected-row.test.mjs: clear.packages/cli/api/theme-edit/theme-problems-change-lead-result.test.mjs: clear.packages/cli/api/theme-edit/theme-regrown-look-keeps-card-text.test.mjs: clear.packages/cli/api/theme-edit/theme-table-states.test.mjs: clear.packages/cli/clients/cli/commands/experimental-theme-show-text.test.mjs: clear.
|
/approve-spec 6b36a85 |
User impact
The editor's contrast check missed text drawn on a fill Core paints only once a component mounts (a selected table row) and measured screen-reader-only labels as if they were visible. Themes passed the check yet showed secondary text under 4.5:1 on a selected row.
Problem and solution fit
Found while checking official themes in dark mode: secondary text on a selected row read at 3.5:1. The general rule: text is measured on the fill it is drawn on, including a state Core paints once mounted; text for screen readers alone is never measured.
Expected behavior and authority
The theme contrast check measures every visible text pair; covered by
theme-contrast-selected-row.test.mjs.Smallest restoration
The census renders the open scenes mounted and adds only their new text pairs; inline backgrounds on a part's own element count as its ground; reader-only frames add no pair.
Evidence
theme-contrast-selected-row.test.mjs, with updates to three existing tests.Scope
Components: cli (experimental theme editor how)
Testing
CI=1 vitest run --project node packages/cli/api/theme-edit packages/cli/api/theme packages/cli/clients/cli/commands/experimentalon the stack top: no failure the base does not have. The CLI typechecks, changeset check and lint pass. This is a layer of a stack on the round-15 theme editor stack; it stays a draft until the layer below lands.