Skip to content

feat: Update Toast and Tooltip styles to match Sana - #4053

Merged
alanbsmith merged 11 commits into
Workday:prerelease/majorfrom
RayRedGoose:issue3989_toast-tooltip
Jul 20, 2026
Merged

feat: Update Toast and Tooltip styles to match Sana#4053
alanbsmith merged 11 commits into
Workday:prerelease/majorfrom
RayRedGoose:issue3989_toast-tooltip

Conversation

@RayRedGoose

@RayRedGoose RayRedGoose commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes: #3989

Update Toast and Tooltip styles to match Sana

Release Category

Components


Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

Where Should the Reviewer Start?

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

Testing Manually

Screenshots or GIFs (if applicable)

Thank You Gif (optional)

Summary by CodeRabbit

  • Documentation
    • Updated the v16 upgrade guides’ Table of Contents and added Toast/Tooltip visual update notes, including codemod snippet formatting fixes.
    • Expanded KBD usage/accessibility docs with an “in Tooltip” example and clearer aria guidance.
  • New Features
    • Added a KBD in Tooltip Storybook example (renders keyboard hint inside a tooltip).
  • Bug Fixes
    • Refreshed Toast visuals (spacing, border/shadow, close icon placement/sizing, forced-colors outline) and updated icon color tokens across examples.
    • Restyled Tooltip (surface/border, shape/typography, spacing, focus and forced-colors behavior).
    • Adjusted Checkbox disabled styling by removing extra disabled label opacity.

@RayRedGoose
RayRedGoose requested a review from a team as a code owner July 8, 2026 18:52
Copilot AI review requested due to automatic review settings July 8, 2026 18:52
@RayRedGoose RayRedGoose added the ready for review Code is ready for review label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Toast and Tooltip receive updated v16 styling. KBD gains an “In Tooltip” example and story, Checkbox disabled opacity is removed, and the v16 upgrade guides document component and codemod updates.

Changes

v16 component and guide updates

Layer / File(s) Summary
Toast styling and examples
modules/react/toast/lib/*, modules/react/toast/stories/examples/*
Toast layout, tokens, icon positioning, and close-button sizing are updated; story examples use brand foreground tokens.
Tooltip container restyling
modules/react/tooltip/lib/TooltipContainer.tsx
Tooltip typography, surface, border, padding, spacing, forced-colors handling, and focused-state margin are updated.
KBD-in-Tooltip example and story
modules/labs-react/kbd/stories/*
A new InTooltip example renders a keyboard shortcut inside a Tooltip and is added to Storybook and documentation.
Checkbox disabled styling
modules/react/checkbox/lib/CheckboxContainer.tsx
Disabled Checkbox styling no longer applies the disabled opacity token.
Upgrade guide component and codemod updates
modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md, modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
The guides add Toast and Tooltip visual updates and reformat related navigation and codemod blocks.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: williamjstanton

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Toast and Tooltip style updates are covered, but the Tooltip Kbd opt-in slot and documented component decision are missing. Implement the Tooltip Kbd slot once Kbd is available, and document whether Tooltip remains the same component or becomes a new one.
Out of Scope Changes check ⚠️ Warning The CheckboxContainer opacity change is unrelated to the Toast/Tooltip objectives and appears out of scope. Remove or justify the CheckboxContainer change in a separate PR unless it is required for the Toast/Tooltip work.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change: Toast and Tooltip style updates to match Sana.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI 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.

Pull request overview

Updates Toast and Tooltip component styling to align with Sana/v16 visual design, and documents these changes in the v16 upgrade guide. Also adds a KBD Storybook example demonstrating use of KBD within a Tooltip title.

Changes:

  • Restyles TooltipContainer (type level, padding, light surface + border, rounding, spacing).
  • Restyles Toast container and subcomponents (container padding/gap/border/shadow, icon sizing, close icon positioning/size, body spacing).
  • Adds KBD “In Tooltip” Storybook example and updates v16 upgrade guides (MDX + LLM copy) with Toast/Tooltip notes.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
modules/react/tooltip/lib/TooltipContainer.tsx Tooltip container visual/token updates for Sana styling
modules/react/toast/lib/Toast.tsx Toast container layout + v16 token styling (padding, border, surface, shadow)
modules/react/toast/lib/ToastBody.tsx Adjust Toast body spacing to match new container padding strategy
modules/react/toast/lib/ToastIcon.tsx Update Toast icon sizing approach
modules/react/toast/lib/ToastCloseIcon.tsx Update close icon positioning and size
modules/labs-react/kbd/stories/KBD.stories.tsx Adds new “InTooltip” story export
modules/labs-react/kbd/stories/KBD.mdx Documents new “In Tooltip” example usage
modules/labs-react/kbd/stories/examples/InTooltip.tsx New example showing KBD content within Tooltip title
modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx Adds Toast/Tooltip upgrade notes
modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md Mirrors upgrade notes for LLM docs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/react/tooltip/lib/TooltipContainer.tsx
Comment thread modules/labs-react/kbd/stories/examples/InTooltip.tsx Outdated
Comment thread modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx Outdated
Comment thread modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md Outdated
Comment thread modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
modules/labs-react/kbd/stories/examples/InTooltip.tsx (1)

24-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Simplify the KBD nesting structure.

The current structure nests KBD inside KBD.Item inside an outer KBD, which is more complex than the documented pattern. The standard usage shown in KBD.mdx is a flat KBD with KBD.Item children. The outer KBD and its single KBD.Item wrapper add no visual or semantic value.

♻️ Proposed simplification
-          <KBD aria-keyshortcuts="Command+P">
-            <KBD.Item>
-              <KBD variant="plain">
-                <KBD.Item>⌘</KBD.Item>
-                <KBD.Item>C</KBD.Item>
-              </KBD>
-            </KBD.Item>
-          </KBD>
+          <KBD variant="plain">
+            <KBD.Item aria-label="Command">⌘</KBD.Item>
+            <KBD.Item>C</KBD.Item>
+          </KBD>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx` around lines 24 - 31,
The KBD example uses an unnecessary nested wrapper pattern, with a KBD inside
KBD.Item inside an outer KBD, which should be simplified to the documented flat
KBD composition. Update the InTooltip story to use the KBD component directly
with KBD.Item children, removing the extra outer KBD and the single-item wrapper
while preserving the same displayed shortcut keys and aria-keyshortcuts
behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md`:
- Around line 261-273: The Toast entry in the upgrade guide is missing the
standard PR reference used by other Component Updates sections. Update the Toast
section in the docs upgrade guide to include a matching PR link, following the
same `**PR:**` pattern as Avatar, Buttons, and Card so it is consistent and
traceable.

In `@modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx`:
- Around line 267-279: The Toast section under Component Updates is missing the
standard PR reference used by the other component entries. Update the Toast
subsection in the upgrade guide to include a matching `**PR:**` link for
traceability, consistent with the Avatar, Buttons, and Card sections, and place
it alongside the existing Toast notes so the section format stays uniform.

In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx`:
- Around line 24-35: Update the InTooltip example to add accessible names where
assistive text is missing: in the KBD composition, give the glyph item for ⌘ an
aria-label with the spoken modifier name, and give the icon-only SecondaryButton
an aria-label that describes its action. Use the existing KBD and
SecondaryButton usages in InTooltip.tsx to locate the spots and keep the visible
UI unchanged.
- Around line 24-31: The shortcut metadata is attached to the wrong element and
uses the wrong value: in the InTooltip example, `aria-keyshortcuts` on the `KBD`
display should be changed to match the visual shortcut (`Command+C`), and the
actual `aria-keyshortcuts` should be moved onto the `SecondaryButton` control
that the shortcut activates. Update the `KBD`/`KBD.Item` tooltip markup
accordingly so the accessible shortcut exposed to assistive tech matches the
displayed keys and follows the documented pattern.

---

Nitpick comments:
In `@modules/labs-react/kbd/stories/examples/InTooltip.tsx`:
- Around line 24-31: The KBD example uses an unnecessary nested wrapper pattern,
with a KBD inside KBD.Item inside an outer KBD, which should be simplified to
the documented flat KBD composition. Update the InTooltip story to use the KBD
component directly with KBD.Item children, removing the extra outer KBD and the
single-item wrapper while preserving the same displayed shortcut keys and
aria-keyshortcuts behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e2eea64a-0a8c-46b2-8322-3f722ce09f5f

📥 Commits

Reviewing files that changed from the base of the PR and between df9a69a and e2df3a9.

📒 Files selected for processing (10)
  • modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
  • modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
  • modules/labs-react/kbd/stories/KBD.mdx
  • modules/labs-react/kbd/stories/KBD.stories.tsx
  • modules/labs-react/kbd/stories/examples/InTooltip.tsx
  • modules/react/toast/lib/Toast.tsx
  • modules/react/toast/lib/ToastBody.tsx
  • modules/react/toast/lib/ToastCloseIcon.tsx
  • modules/react/toast/lib/ToastIcon.tsx
  • modules/react/tooltip/lib/TooltipContainer.tsx

Comment thread modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
Comment thread modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
Comment thread modules/labs-react/kbd/stories/examples/InTooltip.tsx Outdated
Comment thread modules/labs-react/kbd/stories/examples/InTooltip.tsx Outdated
@cypress

cypress Bot commented Jul 8, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #11286

Run Properties:  status check passed Passed #11286  •  git commit 47645dbc58 ℹ️: Merge d75ba3f7bf4b4745e79bc6be8fc0db3589142967 into f21d7cc4d8f56e8a7ffffbb5881a...
Project Workday/canvas-kit
Branch Review issue3989_toast-tooltip
Run status status check passed Passed #11286
Run duration 02m 26s
Commit git commit 47645dbc58 ℹ️: Merge d75ba3f7bf4b4745e79bc6be8fc0db3589142967 into f21d7cc4d8f56e8a7ffffbb5881a...
Committer Raisa Primerova
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 17
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 809
View all changes introduced in this branch ↗︎
UI Coverage  19.68%
  Untested elements 1524  
  Tested elements 371  
Accessibility  99.47%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 72  

@RayRedGoose RayRedGoose added the needs-a11y Extra attention from accessibility is needed label Jul 9, 2026
Comment thread modules/react/tooltip/lib/TooltipContainer.tsx
Comment thread modules/labs-react/kbd/stories/examples/InTooltip.tsx Outdated
Comment thread modules/react/toast/lib/Toast.tsx Outdated

@sheelah sheelah 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.

LG! Left just a few minor comments.

@williamjstanton williamjstanton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

I think I missed some things in the KBD PR examples and we may need to polish many if not all of them. :(

  • aria-keyshortcuts isn't supposed to go on the presentational KBD wrapper, it should be on the interactive control witht he key listener.
  • The <KBD.Item> components that use glyphs need translated aria-label strings. (E.g. "Command", "Control", etc. )

@@ -54,34 +54,28 @@ export const tooltipContainerStencil = createStencil({
tooltipTransformOriginVertical: '',
},
base: ({tooltipTransformOriginHorizontal, tooltipTransformOriginVertical}) => ({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Toast and Tooltip should include explicit Windows High Contrast support after this restyle. Tooltip removed the previous transparent outline pattern called out in our accessibility guidance, and both components now rely on token borders/backgrounds plus shadows. In forced-colors mode, shadows disappear and authored colors may be overridden, so we should add @media (forced-colors: active) styles that preserve a visible boundary and readable foreground/background using system colors.

E.g.: CanvasText
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/system-color

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.

this was also added

paddingInline: `${system.padding.md} ${system.padding.xl}`,
gap: base.size150,
borderRadius: system.shape.xl,
border: `${px2rem(1)} solid ${system.color.border.default}`,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Refer to same comment about forced color fall-back on TooltipContainer.tsx

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.

looks like this was added!

Comment thread modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
Comment thread modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
Comment thread modules/labs-react/kbd/stories/examples/InTooltip.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md`:
- Around line 73-76: Fix both codemod instruction sections by placing the
opening ```sh fence on its own line, putting the complete npx command on the
following line, and closing with a standard ``` fence; update both the v16
command section and the ${canvasKitMajorVersionNumber} section.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 13cc83d5-10ce-4515-9a85-54dc60d57a63

📥 Commits

Reviewing files that changed from the base of the PR and between 7c051ec and c7b9df5.

📒 Files selected for processing (5)
  • modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
  • modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
  • modules/labs-react/kbd/stories/examples/InTooltip.tsx
  • modules/react/checkbox/lib/CheckboxContainer.tsx
  • modules/react/toast/lib/Toast.tsx
✅ Files skipped from review due to trivial changes (1)
  • modules/react/checkbox/lib/CheckboxContainer.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • modules/react/toast/lib/Toast.tsx
  • modules/labs-react/kbd/stories/examples/InTooltip.tsx

Comment thread modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md Outdated

@sheelah sheelah 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.

LGTM 👍🏻

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md`:
- Line 374: Remove the stray Markdown heading marker from the
padding-and-spacing bullet so the upgrade guide renders it as “- Padding and
spacing have been adjusted to accommodate the new styling.”
- Line 468: Remove the unresolved merge-conflict marker from the Segmented
Control section, restore the intended documentation content in its place, and
verify this guide contains no remaining merge-conflict markers.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fe2cd9dd-e3e7-47aa-a03b-8e934dfeb038

📥 Commits

Reviewing files that changed from the base of the PR and between c3f22a3 and b587ac8.

📒 Files selected for processing (3)
  • modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
  • modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
  • modules/labs-react/kbd/stories/KBD.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx

Comment thread modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md Outdated
Comment thread modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md Outdated
@alanbsmith
alanbsmith enabled auto-merge (squash) July 20, 2026 18:35
@mannycarrera4
mannycarrera4 dismissed williamjstanton’s stale review July 20, 2026 18:35

fixed has been added

@alanbsmith
alanbsmith merged commit e91ae68 into Workday:prerelease/major Jul 20, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge needs-a11y Extra attention from accessibility is needed ready for review Code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants