chore: Build Switch for Preview#3842
Open
josh-bagwell wants to merge 16 commits intoWorkday:prerelease/majorfrom
Open
chore: Build Switch for Preview#3842josh-bagwell wants to merge 16 commits intoWorkday:prerelease/majorfrom
josh-bagwell wants to merge 16 commits intoWorkday:prerelease/majorfrom
Conversation
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
chore/build-preview-switch-26-03
|
| Run status |
|
| Run duration | 02m 16s |
| Commit |
|
| Committer | Josh |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
15
|
|
|
0
|
|
|
798
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
19.43%
|
|
|---|---|
|
|
1524
|
|
|
365
|
Accessibility
99.36%
|
|
|---|---|
|
|
5 critical
5 serious
0 moderate
2 minor
|
|
|
67
|
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a new Preview Switch component with updated visuals aimed at improving accessibility (checked/unchecked iconography + better visibility in Windows High Contrast / forced-colors scenarios), and wires it into Storybook + docs + tests.
Changes:
- Added
@workday/canvas-kit-preview-react/switchimplementation, exports, and Storybook docs/examples. - Added Jest/RTL unit tests and Cypress a11y/component coverage for the Preview switch.
- Updated v15 upgrade guide content to call out the new Preview Switch.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/preview-react/switch/lib/Switch.tsx | Adds the Preview Switch implementation (styling, icon states, forced-colors affordances). |
| modules/preview-react/switch/spec/Switch.spec.tsx | Adds React Testing Library unit tests for core behaviors. |
| cypress/component/SwitchPreview.spec.tsx | Adds Cypress component + axe checks for Preview switch stories. |
| modules/preview-react/switch/stories/Switch.stories.ts | New Storybook stories wiring examples into autodocs. |
| modules/preview-react/switch/stories/Switch.mdx | New Storybook MDX documentation page for the Preview switch. |
| modules/preview-react/switch/stories/examples/*.tsx | Adds usage examples (basic, disabled, error/caution, layout, ref forwarding). |
| modules/preview-react/switch/stories/visualTesting.stories.tsx | Adds Chromatic visual regression coverage matrix for states. |
| modules/preview-react/switch/index.ts | Exports the switch module entrypoint. |
| modules/preview-react/index.ts | Re-exports switch from the Preview package barrel. |
| modules/preview-react/switch/README.md | Adds README stub pointing to Storybook docs. |
| modules/preview-react/switch/spec/tsconfig.json | Adds spec tsconfig for the switch module. |
| modules/docs/mdx/15.0-UPGRADE-GUIDE.mdx | Documents the new Preview Switch in the v15 upgrade guide (MDX). |
| modules/docs/llm/upgrade-guides/15.0-UPGRADE-GUIDE.md | Mirrors the upgrade guide change in the LLM-facing markdown. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
Comment on lines
+22
to
+25
| - [Structure Changes](#structure-changes) | ||
| - [API Differences](#api-differences) | ||
| - [Size Mapping](#api-differences) | ||
| - [Code Migration](#code-migration) |
Contributor
There was a problem hiding this comment.
it's related to Avatar, but with that change it's on the same level
RayRedGoose
reviewed
Apr 1, 2026
| - [Removals](#removals) | ||
| - [Avatar (Deprecated)](#avatar-deprecated) | ||
| - [Side Panel (Deprecated)](#side-panel-deprecated) | ||
| - [Side Panel (Deprecated)](#side-panel-deprecated) |
Contributor
There was a problem hiding this comment.
Not related to this PR but we will need to alphabetically order that inner lists
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 1, 2026
RayRedGoose
reviewed
Apr 2, 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
Fixes: #3803, #3800 |
Updated visuals with "High Contrast Mode" enabled:




Release Category
Components
Release Note
We've created a new version of the
Switchcomponent inPreview.It has increased accessibility with:
uncheckedandcheckedstate.Where Should the Reviewer Start?
/modules/preview-react/switch/lib/Switch.tsx