Skip to content

feat: Add Sana Canvas Menu Updates#4052

Open
sheelah wants to merge 25 commits into
Workday:prerelease/majorfrom
sheelah:sana-canvas-menu
Open

feat: Add Sana Canvas Menu Updates#4052
sheelah wants to merge 25 commits into
Workday:prerelease/majorfrom
sheelah:sana-canvas-menu

Conversation

@sheelah

@sheelah sheelah commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes: #3987.

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

Summary by CodeRabbit

  • UI Updates

    • Refined Menu styling, including spacing, colors, rounded corners, and icon sizing.
    • Updated selected, focused, active, disabled, and expanded submenu visual states.
    • Improved Menu checkmark and submenu chevron icon sizing/behavior.
  • Documentation

    • Expanded the Canvas Kit 16.0 Upgrade Guide with a new Menu section and detailed migration notes.
    • Clarified rounded-corner stencil inheritance for both Card and Menu components.
  • Visual Testing

    • Added focused-and-disabled Menu item and option examples.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bb28e57a-768f-4805-8f0c-f076c0bf1b2a

📥 Commits

Reviewing files that changed from the base of the PR and between da19fb5 and d9b54f6.

📒 Files selected for processing (1)
  • modules/react/menu/lib/MenuItem.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • modules/react/menu/lib/MenuItem.tsx

📝 Walkthrough

Walkthrough

Menu styling was updated for v16 with new corner-shape, spacing, color, state, and icon rules. Visual fixtures cover focused-disabled states. Upgrade guides document the changes, and Canvas token dependencies were updated to beta.4.

Changes

Menu v16 updates

Layer / File(s) Summary
Menu stencil and layout updates
modules/react/menu/lib/MenuCard.tsx, modules/react/menu/lib/MenuList.tsx, modules/react/menu/lib/MenuItem.tsx, modules/react/menu/lib/MenuGroup.tsx
Menu surfaces and items now use cornerShapeStencil, updated spacing tokens, and revised foreground colors and dimensions.
Menu states and icon rendering
modules/react/menu/lib/MenuItem.tsx, modules/react/menu/lib/MenuOption.tsx, modules/react/menu/lib/Submenu.tsx, modules/react/menu/stories/testingVisual.stories.tsx
State styling, icon sizing, checkmark and chevron icons, and focused-disabled visual examples were updated.
Upgrade guide and token dependency alignment
modules/docs/.../16.0-UPGRADE-GUIDE.md, modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx, package.json, modules/*/package.json
Menu upgrade notes and corner stencil documentation were added, while @workday/canvas-tokens-web was updated to 4.4.0-beta.4 across packages.

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

Possibly related issues

  • Workday/canvas-kit issue 3985 — Select and Multi-Select work depends on the shared Menu styling and icon updates.

Possibly related PRs

Suggested reviewers: RayRedGoose, williamjstanton, josh-bagwell

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 describes the main change: Menu updates for Canvas.
Linked Issues check ✅ Passed The PR updates Menu tokens/styles, updates Storybook visuals, preserves the API, and does not add Kbd support.
Out of Scope Changes check ✅ Passed The changes stay focused on Menu updates, docs, and the supporting token dependency bumps needed for the feature.
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.

@cypress

cypress Bot commented Jul 8, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #11235

Run Properties:  status check passed Passed #11235  •  git commit 8ed09e2ff7 ℹ️: Merge d9b54f641c42b13f9f31722c3920f19ed85cc6db into fc927ea8a9cdb16ad227bbfc5d84...
Project Workday/canvas-kit
Branch Review sana-canvas-menu
Run status status check passed Passed #11235
Run duration 02m 27s
Commit git commit 8ed09e2ff7 ℹ️: Merge d9b54f641c42b13f9f31722c3920f19ed85cc6db into fc927ea8a9cdb16ad227bbfc5d84...
Committer Sheelah Brennan
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.65%
  Untested elements 1527  
  Tested elements 371  
Accessibility  99.37%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 72  

@sheelah sheelah changed the title feat: Add Sana Canvas Menu feat: Add Sana Canvas Menu Updates Jul 8, 2026
@sheelah sheelah added the needs-a11y Extra attention from accessibility is needed label Jul 9, 2026

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

This looks really good! I just made a couple of notes about the upgrade guides, but that's all.


- Padding updated to use `paddingBlock: padding.xs` with `paddingInline: padding.sm` / `padding.md`.

#### State Style Updates (Menu.Item)

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.

Concern: the upgrade guide labels the state table as State Style Updates (Menu.Item) and includes Selected / Selected + Focus rows. In ARIA menu patterns, Menu.Item renders role="menuitem", and aria-selected is not valid for menuitem. Persistent selected state belongs to Menu.Option when used in a listbox pattern, such as Select/Combobox.

Recommendation: rename or split that section so the selected rows are clearly tied to Menu.Option, not Menu.Item. For example:

State Style Updates (Menu.Item and Menu.Option)

I want to avoid implying that consumers (or code-gen tools) should use aria-selected on ARIA menu items.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah good callout - thank you! Ideally we'd separate these out in Figma too as "selected" state is very overloaded otherwise. I'll update this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@williamjstanton Thanks again for the review! I have these docs updated in case you want to take a look.

This branch also now has the full set of color token changes updated (selectable menu items' selected state background and text colors are blue, matching Figma), which you can see here:
https://5d854c26ba934e0020f5e98a-uxishmmarl.chromatic.com/?path=/story/components-popups-menu--selectable-menu

Comment thread modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx Outdated

- Padding updated to use `paddingBlock: padding.xs` with `paddingInline: padding.sm` / `padding.md`.

#### State Style Updates (Menu.Item)

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.

My previous comment applies here too.

@sheelah sheelah marked this pull request as ready for review July 10, 2026 18:13
@sheelah sheelah requested a review from a team as a code owner July 10, 2026 18:13
@sheelah sheelah added the ready for review Code is ready for review label Jul 10, 2026

@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/react/menu/lib/MenuItem.tsx`:
- Around line 143-144: Disabled selected items lose their selected background
because the disabled hover rule also matches aria-selected items and overrides
the selected styling. In MenuItem, update the disabled-state selector in the
rule containing background: 'none' to remove [aria-selected=true], preserving
the existing selected background for disabled+selected items.
🪄 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: b1dc74d4-816b-474e-a634-dae27b30e54f

📥 Commits

Reviewing files that changed from the base of the PR and between fc927ea and da19fb5.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (16)
  • modules/docs/llm/upgrade-guides/16.0-UPGRADE-GUIDE.md
  • modules/docs/mdx/16.0-UPGRADE-GUIDE.mdx
  • modules/docs/package.json
  • modules/labs-react/package.json
  • modules/preview-react/package.json
  • modules/react/menu/lib/MenuCard.tsx
  • modules/react/menu/lib/MenuGroup.tsx
  • modules/react/menu/lib/MenuItem.tsx
  • modules/react/menu/lib/MenuList.tsx
  • modules/react/menu/lib/MenuOption.tsx
  • modules/react/menu/lib/Submenu.tsx
  • modules/react/menu/stories/testingVisual.stories.tsx
  • modules/react/package.json
  • modules/styling-transform/package.json
  • modules/styling/package.json
  • package.json

Comment thread modules/react/menu/lib/MenuItem.tsx Outdated
Stop the background:none rule from matching aria-selected,
which was clearing the selected fill for non-interactive but still-
selected listbox options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants