Skip to content

Conversation

@Sidnioulz
Copy link
Member

Follows #32492
Closes #32249

What I did

Ported WithTooltip and friends to react-aria

  • Replaced Popper.js with react-aria

  • Removed WithTooltipPure and WithTooltipState in favour of a single WithTooltip that supports both controlled and uncontrolled usage with the same API as WithPopover and WithMenu

  • Removed many unused props and renamed some to align with other components

  • Added ability to make focus-only tooltip so we can provide KB navigation shortcut hints in the future sidebar

  • Reworked stories to match current API

  • Reworked Tooltip to have hasChrome and color like Popover, except it doesn't have a close button since it's not interactive

  • Removed a lot of arrow-related code we weren't using

  • Added stories for Tooltip

  • Removed default margin in TooltipNote to make overlay positioning more coherent (use offset on WithTooltip/WithMenu/WithPopover instead)

Deprecated Tooltip-adjacent components

  • ListItem and TooltipLinkList because these should be replaced by MenuItem/WithMenu
  • TooltipMessage because tooltips are not interactive; a custom popover should be used instead (and we did not use TooltipMessage at all)

Migrated internal UI code

  • ArgValue: ported to new API
  • InteractiveTooltipWrapper: ported to new API, strengthened children type
  • InteractiveTooltipWrapper: changed logic to read data-shortcuts-enabled to provide a better default in the Preview context where the attribute is missing on body; this lets our own stories show shortcut tooltips inside our own Storybook
  • Tabs (to be deleted): Fixed up import paths so the code builds
  • FileSearchList: Fixed up tooltip management
  • FileSearchList: Refactored code to place WithTooltip inside the memoized component, as ref passing was buggy otherwise

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

  1. Run yarn storybook:ui
  2. Open relevant stories
  3. Ensure there are no glaring regressions

Documentation

  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@Sidnioulz Sidnioulz added maintenance User-facing maintenance tasks ci:normal labels Sep 17, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sidnioulz/issue-32249-tooltip-tooltip

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

@nx-cloud
Copy link

nx-cloud bot commented Sep 17, 2025

View your CI Pipeline Execution ↗ for commit e914108

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 49s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-22 17:38:53 UTC

@Sidnioulz Sidnioulz force-pushed the a11y-consolidation branch 2 times, most recently from 166c0f2 to d291255 Compare September 18, 2025 21:47
@Sidnioulz Sidnioulz force-pushed the sidnioulz/issue-32249-tooltip-tooltip branch from ecf77f4 to cfd370f Compare September 22, 2025 08:27
… UI code

BREAKING CHANGE: The WithTooltip API has significantly changed, and adjacent components
WithTooltipPure and WithTooltipState were removed.
@Sidnioulz Sidnioulz force-pushed the sidnioulz/issue-32249-tooltip-tooltip branch from cfd370f to e914108 Compare September 22, 2025 17:13
@Sidnioulz Sidnioulz merged commit 496cf94 into a11y-consolidation Sep 22, 2025
5 of 7 checks passed
@Sidnioulz Sidnioulz deleted the sidnioulz/issue-32249-tooltip-tooltip branch September 22, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal maintenance User-facing maintenance tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants