Skip to content

fix(tes): align TES styling with WES and fix shadow-DOM borders - #573

Merged
anuragxxd merged 1 commit into
chore/tes-migrationfrom
fix/tes-design-consistency
Nov 13, 2026
Merged

anuragxxd merged 1 commit into
chore/tes-migrationfrom
fix/tes-design-consistency

Conversation

@anuragxxd

@anuragxxd anuragxxd commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #516. This targets chore/tes-migration, so merging it folds these changes into that PR.

What's wrong now

  • Tailwind border utilities 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.
  • TES doesn't use the WES theme tokens, so --ecc-font-sans, surface padding and dark mode behave differently from WES.
  • In the task list, the Cancel button overflows its column.
  • The destructive message text is low-contrast, and the remove button is a bare × glyph with no accessible name.

Changes

  • Theme: TES uses the WES global.ts tokens and Tailwind setup.
  • Borders: ported the design package's @layer properties fallback and * { border-border } base into the TES and WES tailwind.css. This fixes borders in every component.
  • Create task: executor cards now have a bordered box with a shaded header. The remove button is an SVG icon with screen-reader text. Submit stays disabled until a provider is set and every executor has an image and a command. The rows layout is responsive, and the success message is theme-aware with role="status".
  • Task list: rebalanced the column widths, and the action buttons wrap instead of overflowing.
  • Task detail: the Executors and Logs collapsibles use the same card style, with a chevron in place of the inconsistent "Click to expand" text.
  • WES: the same border fix, plus a theme-aware success colour.
  • Tests: added design.test.ts covering the font and surface tokens and the initial disabled state of Submit.

Testing

  • TES: 50/50 tests pass. WES: 7/7 pass (Chromium).
  • ESLint on the changed files: 0 errors.
  • Compared WES and TES side by side in light and dark mode for the runs list, run detail and create form.

Not in this PR

  • WES run detail still uses the old "Click to expand" pattern.
  • The chevron doesn't rotate when a collapsible opens, because the design collapsible doesn't expose its open state for styling.
  • global.ts is 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:

  • Improve TES run creation with responsive executor cards, accessible removal controls, clearer expandable sections, and validation that prevents incomplete submissions.
  • Add design consistency coverage for TES font, surface, and submit-state behavior.

Bug Fixes:

  • Restore visible Tailwind borders within TES and WES shadow roots.
  • Prevent TES task-list actions from overflowing their columns.
  • Improve destructive-message contrast and make success messages theme-aware and announced to assistive technologies.

Enhancements:

  • Align TES theming with WES, including shared font, surface, token, and dark-mode behavior.
  • Standardize TES executor and run-detail panels with the shared card styling.

Tests:

  • Add TES tests for design tokens and initial submit-button validation.

- 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
@anuragxxd
anuragxxd requested a review from uniqueg as a code owner November 13, 2026 04:36
@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

UI

Update TES theme tokens and Tailwind setup, and add the shadow-root border fallback in both TES and WES so shared styling works consistently.

  • packages/ecc-client-ga4gh-tes/src/global.ts L3-200
  • packages/ecc-client-ga4gh-tes/src/tailwind.css L32-78
  • packages/ecc-client-ga4gh-wes/src/tailwind.css L35-80

Restyle the TES task-create form, improve its responsive executor rows and accessible remove control, and prevent submission until required fields are available.

  • packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts L134-141, L412-428, L499-635 (+4 small edits)

Align TES run-detail executor and log collapsibles with the new card style, and improve destructive-message contrast.

  • packages/ecc-client-ga4gh-tes/src/components/run/run.ts L335-358, L429-434, L444-459 (+1 small edits)

Rebalance TES task-list columns, allow action buttons to wrap, and improve destructive-message contrast.

  • packages/ecc-client-ga4gh-tes/src/components/runs/runs.ts L358-463 (6 small edits)

Make TES and WES create-task success messages theme-aware and announce them through a status region, while improving TES destructive-message contrast.

  • packages/ecc-client-ga4gh-tes/src/components/run-create/run-create.ts L760, L809-811
  • packages/ecc-client-ga4gh-wes/src/components/run-create/run-create.ts L50-55, L755-759

Configuration

Record the WES patch release changeset for the styling, border, and accessibility fixes.

  • .changeset/wes-shadow-borders.md L1-5

Tests

Add checks that TES components honor font and surface tokens and that task submission starts disabled without required inputs.

  • packages/ecc-client-ga4gh-tes/src/design.test.ts L1-26

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@anuragxxd anuragxxd mentioned this pull request Nov 13, 2026
3 tasks done

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

color: var(--ecc-success, #15803d);
font-size: 0.875rem;
}
:host([dark]) .success-message {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

@anuragxxd
anuragxxd merged commit 2507b7c into chore/tes-migration Nov 13, 2026
2 checks passed
@anuragxxd
anuragxxd deleted the fix/tes-design-consistency branch November 13, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant