Skip to content

Add XDSFieldStatus + status prop to XDSCheckboxInput/XDSSwitch - #76

Merged
cixzhang merged 1 commit into
mainfrom
checkbox_switch_status
Feb 11, 2026
Merged

cixzhang merged 1 commit into
mainfrom
checkbox_switch_status

Conversation

@czarandy

@czarandy czarandy commented Feb 5, 2026

Copy link
Copy Markdown
Collaborator
  1. Extract the status rendering into XDSFieldStatus
  2. Use it for XDSCheckboxInput + XDSSwitch
image image

@czarandy
czarandy requested a review from cixzhang February 5, 2026 19:15
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 5, 2026
@czarandy
czarandy force-pushed the checkbox_switch_status branch from 618e38c to e855e71 Compare February 5, 2026 19:22
@github-actions

github-actions Bot commented Feb 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

Modified Components

CheckboxInput
Metric Before After Delta
Bundle Size (ESM) N/A 283B N/A
Lines of Code N/A 306 -
Complexity N/A High (19) -
Field
Metric Before After Delta
Bundle Size (ESM) N/A 372B N/A
Lines of Code N/A 336 -
Complexity N/A Medium (15) -
Switch
Metric Before After Delta
Bundle Size (ESM) N/A 269B N/A
Lines of Code N/A 272 -
Complexity N/A High (20) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 4.4KB 7.4KB 1.2KB

Accessibility Audit

Status: 3 accessibility violation(s) found.

XDSCheckboxInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSField - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSSwitch - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name

Component Previews

Includes interactive hover previews as animated GIFs.

XDSCheckboxInput

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--default

Checked

Screenshot:

Checked

Interaction Preview: (view video)

Checked interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--checked

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--with-description

With Hidden Label

Screenshot:

With Hidden Label

Interaction Preview: (view video)

With Hidden Label interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--with-hidden-label

Indeterminate

Screenshot:

Indeterminate

Interaction Preview: (view video)

Indeterminate interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--indeterminate

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--disabled

Disabled Checked

Screenshot:

Disabled Checked

Interaction Preview: (view video)

Disabled Checked interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--disabled-checked

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--all-variations

Small Size

Screenshot:

Small Size

Interaction Preview: (view video)

Small Size interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--small-size

Size Comparison

Screenshot:

Size Comparison

Interaction Preview: (view video)

Size Comparison interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--size-comparison

With Start Icon

Screenshot:

With Start Icon

Interaction Preview: (view video)

With Start Icon interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--with-start-icon

Start Icon Variations

Screenshot:

Start Icon Variations

Interaction Preview: (view video)

Start Icon Variations interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--start-icon-variations

With Error Status

Screenshot:

With Error Status

Interaction Preview: (view video)

With Error Status interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--with-error-status

With Warning Status

Screenshot:

With Warning Status

Interaction Preview: (view video)

With Warning Status interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--with-warning-status

With Success Status

Screenshot:

With Success Status

Interaction Preview: (view video)

With Success Status interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--with-success-status

Status Variations

Screenshot:

Status Variations

Interaction Preview: (view video)

Status Variations interaction

Run yarn storybook and navigate to: core-xdscheckboxinput--status-variations

XDSField

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: core-xdsfield--default

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: core-xdsfield--with-description

With Hidden Label

Screenshot:

With Hidden Label

Interaction Preview: (view video)

With Hidden Label interaction

Run yarn storybook and navigate to: core-xdsfield--with-hidden-label

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: core-xdsfield--all-variations

Optional Field

Screenshot:

Optional Field

Interaction Preview: (view video)

Optional Field interaction

Run yarn storybook and navigate to: core-xdsfield--optional-field

Required Field

Screenshot:

Required Field

Interaction Preview: (view video)

Required Field interaction

Run yarn storybook and navigate to: core-xdsfield--required-field

Description With Optional

Screenshot:

Description With Optional

Interaction Preview: (view video)

Description With Optional interaction

Run yarn storybook and navigate to: core-xdsfield--description-with-optional

With Tooltip

Screenshot:

With Tooltip

Interaction Preview: (view video)

With Tooltip interaction

Run yarn storybook and navigate to: core-xdsfield--with-tooltip

Tooltip With Optional

Screenshot:

Tooltip With Optional

Interaction Preview: (view video)

Tooltip With Optional interaction

Run yarn storybook and navigate to: core-xdsfield--tooltip-with-optional

XDSSwitch

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: core-xdsswitch--default

On

Screenshot:

On

Interaction Preview: (view video)

On interaction

Run yarn storybook and navigate to: core-xdsswitch--on

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: core-xdsswitch--with-description

With Hidden Label

Screenshot:

With Hidden Label

Interaction Preview: (view video)

With Hidden Label interaction

Run yarn storybook and navigate to: core-xdsswitch--with-hidden-label

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: core-xdsswitch--disabled

Disabled On

Screenshot:

Disabled On

Interaction Preview: (view video)

Disabled On interaction

Run yarn storybook and navigate to: core-xdsswitch--disabled-on

Required

Screenshot:

Required

Interaction Preview: (view video)

Required interaction

Run yarn storybook and navigate to: core-xdsswitch--required

Optional

Screenshot:

Optional

Interaction Preview: (view video)

Optional interaction

Run yarn storybook and navigate to: core-xdsswitch--optional

With Label Icon

Screenshot:

With Label Icon

Interaction Preview: (view video)

With Label Icon interaction

Run yarn storybook and navigate to: core-xdsswitch--with-label-icon

With Label Tooltip

Screenshot:

With Label Tooltip

Interaction Preview: (view video)

With Label Tooltip interaction

Run yarn storybook and navigate to: core-xdsswitch--with-label-tooltip

Label Position Start

Screenshot:

Label Position Start

Interaction Preview: (view video)

Label Position Start interaction

Run yarn storybook and navigate to: core-xdsswitch--label-position-start

Label Spacing Spread

Screenshot:

Label Spacing Spread

Interaction Preview: (view video)

Label Spacing Spread interaction

Run yarn storybook and navigate to: core-xdsswitch--label-spacing-spread

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: core-xdsswitch--all-variations

Label Icon Variations

Screenshot:

Label Icon Variations

Interaction Preview: (view video)

Label Icon Variations interaction

Run yarn storybook and navigate to: core-xdsswitch--label-icon-variations

Label Position Comparison

Screenshot:

Label Position Comparison

Interaction Preview: (view video)

Label Position Comparison interaction

Run yarn storybook and navigate to: core-xdsswitch--label-position-comparison

Spread Spacing Example

Screenshot:

Spread Spacing Example

Interaction Preview: (view video)

Spread Spacing Example interaction

Run yarn storybook and navigate to: core-xdsswitch--spread-spacing-example

With Error Status

Screenshot:

With Error Status

Interaction Preview: (view video)

With Error Status interaction

Run yarn storybook and navigate to: core-xdsswitch--with-error-status

With Warning Status

Screenshot:

With Warning Status

Interaction Preview: (view video)

With Warning Status interaction

Run yarn storybook and navigate to: core-xdsswitch--with-warning-status

With Success Status

Screenshot:

With Success Status

Interaction Preview: (view video)

With Success Status interaction

Run yarn storybook and navigate to: core-xdsswitch--with-success-status

Status Variations

Screenshot:

Status Variations

Interaction Preview: (view video)

Status Variations interaction

Run yarn storybook and navigate to: core-xdsswitch--status-variations


Generated by PR Enrichment workflow | Storybook | View full report

@cixzhang

cixzhang commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

I fixed the remaining lint issues so you may need to rebase.

@cixzhang

cixzhang commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Test failures seem related to these changes though.


const ariaDescribedBy = [
description ? descriptionID : null,
status?.message ? statusMessageID : null,

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.

Nice, could be good to update the README with some of these accessibility details.

@czarandy
czarandy force-pushed the checkbox_switch_status branch from e855e71 to 48ada5e Compare February 10, 2026 18:21
@czarandy

Copy link
Copy Markdown
Collaborator Author

Ok rebased + updated, tests should be passing now

@cixzhang
cixzhang merged commit f15d0ac into main Feb 11, 2026
5 checks passed
@cixzhang
cixzhang deleted the checkbox_switch_status branch February 20, 2026 14:41
cixzhang pushed a commit that referenced this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants