-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ToolTip: refactor using ariakit (#48440)
* Add ariakit dependency * Initial creation of component * Add shortcut from legacy tooltip * Replace initial tests with legacy tooltip tests * Add anchor styles for tooltip placement * Ensure tooltip renders only if one child is passed * Replace query with tooltip role and add user actions to ensure tests complete * Remove forwarding refs to match legacy tooltip * Add legacy positioning * Remove unnecessary code and add describedby id * Replace cloneElement with Radix Slot * Replace emotion with sass * Update tests and types * Updated ariakit package and update-related props and types * Remove radix-ui/react-slot related package changes * Add arrow to fix floating-ui errors * Replace zero value in temp fix to avoid NaN errors * resolve test failures after package update * Match legacy styles * Hide tooltip onBlur to match legacy behavior * Revert "resolve test failures after package update" This reverts commit 9182f1e. * Prevent leaking by ensuring tooltip is hidden after each test * Remove ‘overlay’ option to match legacy * hide on anchor interact to match legacy * Temporarily replace placement with position for rollout * Update story after storybook upgrade * Update descriptions in readme and types * Replace legacy tooltip with ariakit tooltip * Add test with modal for new Esc feature * Error for multiple children but continue to render anchor without tooltip * Update snapshots * Update assertions in failing tests * Replace waitFor with findBy * Replace workaround with utility function * Clean up variables * Update package-lock * Add cleanup to test where toBePositioned was used previously * Update Changelog * Update event handling * Fix failing test * Add cleanup for other components testing tooltip * Remove Arrow workaround after floating-ui/core update * Refine test query to avoid conflict * Update tests based on feedback * remove unnecessary type and variable * Simplify by removing unnecessary logic and adding default value to position prop * Add timeout to test for custom delay * Ensure anchor shows when Icon or multiple children * Update types and README * Update snapshots * Remove type ignore after update in #54101 * Fix link control tests by querying explicitly for the spinner --------- Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
- Loading branch information
Showing
23 changed files
with
582 additions
and
768 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
938e747
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in 938e747.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6109604804
📝 Reported issues:
/test/e2e/specs/editor/various/behaviors.spec.js