fix(segmented-control): forward data-testid to the DOM#3852
Merged
cixzhang merged 1 commit intoJul 12, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
let-sunny
marked this pull request as draft
July 12, 2026 01:03
SegmentedControl and SegmentedControlItem declared BaseProps but never captured ...rest or spread it onto their rendered elements, so data-testid and other pass-through attributes were silently dropped. Capture ...rest and spread it onto the radiogroup div / radio button before their own role/aria-* (the same rest-spread fix applied to CheckboxInput in facebook#3738).
let-sunny
force-pushed
the
fix/segmentedcontrol-data-testid
branch
from
July 12, 2026 01:05
dc8ff8b to
aaf3171
Compare
Contributor
PR Analysis ReportNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
let-sunny
marked this pull request as ready for review
July 12, 2026 01:23
cixzhang
approved these changes
Jul 12, 2026
Contributor
|
Thanks we should update our component auditor to catch these. |
cixzhang
added a commit
that referenced
this pull request
Jul 12, 2026
…3853) * ci(review): auto-clear the gate after approvals on fork PRs The review-signal clear job runs on pull_request_review, but for fork PRs that event's token is read-only — it 403s removing labels / setting the check, so a fork approval never cleared the gate (e.g. #3852 stayed blocked after a code-owner approved). New review-clear workflow runs on workflow_run after Review signal completes for a review submission. From the base repo (write token, works for forks) it resolves the PR from the run head SHA and re-dispatches the review-signal flag logic, which reads the approval and clears the gate fork-safely. No loop: the dispatch run has event=workflow_dispatch, which this job's if-condition excludes. * ci(review): remove the fork-broken clear job, unify clearing via review-clear The old clear job ran on pull_request_review and could not write on fork PRs (read-only token → 403), so it never cleared fork approvals. review-clear.yml now handles clearing for all PRs via workflow_run + fork-safe flag re-dispatch. Remove the redundant clear job. Add a tiny review-anchor job that runs on approval so the Review signal workflow reliably completes (not skipped), guaranteeing review-clear's workflow_run fires.
let-sunny
added a commit
to let-sunny/cuesheet-pipeline
that referenced
this pull request
Jul 12, 2026
The two are views of the same cut's settings, not separate destinations, so a segmented toggle reads truer than a tab bar. Tests select the items by role=radio + name since @astryxdesign/core 0.1.3 doesn't forward data-testid (upstream fix facebook/astryx#3852).
This was referenced Jul 12, 2026
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
SegmentedControlandSegmentedControlItemacceptBaseProps(sodata-testidtype-checks) but neither captures...rest, sodata-testidand other pass-through attributes are silently dropped and never reach the DOM — the same defect fixed forCheckboxInputin #3738.Change
SegmentedControl.tsx: spread...restonto the radiogroup<div>, before its ownrole/aria-*.SegmentedControlItem.tsx: spread...restonto the radio<button>, before its ownrole/aria-*.Test plan
data-testidreaches the radiogroup and each item button, and a consumer-suppliedrolecannot override the computed one. Reverting the source fails all three.pnpm --filter @astryxdesign/core typecheckand the SegmentedControl suite (34 tests) pass;@astryxdesign/corepatch changeset added.