Repository navigation
fix(tes): align TES styling with WES and fix shadow-DOM borders - #573
Conversation
- Share WES global theme tokens and Tailwind setup with TES - Port the design package's @layer properties fallback so Tailwind border utilities render inside shadow roots (TES and WES) - Restyle executor cards and run-detail collapsibles - Replace the remove glyph with an accessible SVG icon - Disable task submission until required executor fields are set - Stop the task list action buttons overflowing - Fix destructive and success message colours; add role=status - Add design consistency tests
Reviewer's GuideUIUpdate TES theme tokens and Tailwind setup, and add the shadow-root border fallback in both TES and WES so shared styling works consistently.
Restyle the TES task-create form, improve its responsive executor rows and accessible remove control, and prevent submission until required fields are available.
Align TES run-detail executor and log collapsibles with the new card style, and improve destructive-message contrast.
Rebalance TES task-list columns, allow action buttons to wrap, and improve destructive-message contrast.
Make TES and WES create-task success messages theme-aware and announce them through a status region, while improving TES destructive-message contrast.
ConfigurationRecord the WES patch release changeset for the styling, border, and accessibility fixes.
TestsAdd checks that TES components honor font and surface tokens and that task submission starts disabled without required inputs.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Documentation build overview
49 files changed ·
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts" line_range="139" />
<code_context>
+ color: var(--ecc-success, #15803d);
+ font-size: 0.875rem;
+ }
+ :host([dark]) .success-message {
+ color: var(--ecc-success, #86efac);
+ }
</code_context>
<issue_to_address>
**Success text loses contrast**
When dark mode comes from an ancestor `.dark` class or `[dark]` attribute rather than the component itself, `:host([dark]) .success-message` only matches a `dark` attribute on the component, so ancestor-provided dark mode leaves the success message light green against the dark surface and makes it hard to read.
Update the dark-mode selector to also match when an ancestor provides dark mode.
Also at `packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:50-52`, `packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts:140`.
</issue_to_address>
### Comment 2
<location path="packages/ecc-client-ga4gh-tes/src/design.test.ts" line_range="24" />
<code_context>
+ const button = el.shadowRoot!.querySelector(
+ "ecc-utils-design-button[type=submit]"
+ )!;
+ expect(button.hasAttribute("disabled")).to.equal(true);
+ });
+});
</code_context>
<issue_to_address>
**Valid submissions remain disabled**
When the button stays disabled after all required executor fields are filled, the test’s assertion at line 24 passes for a button that is permanently disabled. The test never fills the executor fields or checks that the button becomes enabled, so a regression in the enabled-after-valid-input behavior goes undetected.
Also assert that the button becomes enabled after populating the required executor fields.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts:139, packages/ecc-client-ga4gh-tes/src/design.test.ts:24
| color: var(--ecc-success, #15803d); | ||
| font-size: 0.875rem; | ||
| } | ||
| :host([dark]) .success-message { |
There was a problem hiding this comment.
🟡 Medium · Success text loses contrast
When dark mode comes from an ancestor .dark class or [dark] attribute rather than the component itself, :host([dark]) .success-message only matches a dark attribute on the component, so ancestor-provided dark mode leaves the success message light green against the dark surface and makes it hard to read.
Update the dark-mode selector to also match when an ancestor provides dark mode.
Also at packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:50-52, packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts:140.
Prompt for AI agents
In `packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts` at line 139:
**Success text loses contrast**
When dark mode comes from an ancestor `.dark` class or `[dark]` attribute rather than the component itself, `:host([dark]) .success-message` only matches a `dark` attribute on the component, so ancestor-provided dark mode leaves the success message light green against the dark surface and makes it hard to read.
Update the dark-mode selector to also match when an ancestor provides dark mode.
Also at `packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts:50-52`, `packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts:140`.| const button = el.shadowRoot!.querySelector( | ||
| "ecc-utils-design-button[type=submit]" | ||
| )!; | ||
| expect(button.hasAttribute("disabled")).to.equal(true); |
There was a problem hiding this comment.
🟡 Medium · Valid submissions remain disabled
When the button stays disabled after all required executor fields are filled, the test’s assertion at line 24 passes for a button that is permanently disabled. The test never fills the executor fields or checks that the button becomes enabled, so a regression in the enabled-after-valid-input behavior goes undetected.
Also assert that the button becomes enabled after populating the required executor fields.
Prompt for AI agents
In `packages/ecc-client-ga4gh-tes/src/design.test.ts` at line 24:
**Valid submissions remain disabled**
When the button stays disabled after all required executor fields are filled, the test’s assertion at line 24 passes for a button that is permanently disabled. The test never fills the executor fields or checks that the button becomes enabled, so a regression in the enabled-after-valid-input behavior goes undetected.
Also assert that the button becomes enabled after populating the required executor fields.
Follow-up to #516. This targets
chore/tes-migration, so merging it folds these changes into that PR.What's wrong now
borderutilities don't render inside the component shadow roots. Tailwind v4 relies on@property, which shadow roots ignore. As a result the executor cards, run-detail panels and error boxes have no visible borders.--ecc-font-sans,surfacepadding and dark mode behave differently from WES.×glyph with no accessible name.Changes
global.tstokens and Tailwind setup.@layer propertiesfallback and* { border-border }base into the TES and WEStailwind.css. This fixes borders in every component.role="status".design.test.tscovering the font and surface tokens and the initial disabled state of Submit.Testing
Not in this PR
global.tsis now duplicated between TES and WES. It should eventually move into a shared package.Summary by Sourcery
Align TES and WES styling and accessibility while restoring shadow-DOM borders and strengthening TES run-creation validation.
New Features:
Bug Fixes:
Enhancements:
Tests: