Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allow hover tooltips to be dismissed using Esc #3217

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avinashbot
Copy link
Member

@avinashbot avinashbot commented Jan 24, 2025

Description

Does what it says on the tin - tooltips should be dismissible by hitting the Escape key. I know the visibility logic for the tooltips is handled outside them, but it still seemed sensible to put the dismiss handler inside the tooltip in one shared place.

Related links, issue #, if available: AWSUI-60227, AWSUI-60225, AWSUI-60230, AWSUI-60226, AWSUI-60228, AWSUI-60231, AWSUI-60229

How has this been tested?

Added a unit test to the tooltip component itself, and all other components just implement it as a callback on the tooltip, so I didn't feel more testing was needed. Might add tests to select/multiselect though.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 71.05263% with 11 lines in your changes missing coverage. Please review.

Project coverage is 96.36%. Comparing base (c357e20) to head (aa34e19).

Files with missing lines Patch % Lines
src/button-group/item-element.tsx 50.00% 2 Missing ⚠️
src/button/internal.tsx 50.00% 1 Missing ⚠️
src/calendar/grid/index.tsx 50.00% 1 Missing ⚠️
src/date-range-picker/calendar/grids/grid-cell.tsx 50.00% 1 Missing ⚠️
src/file-token-group/file-token.tsx 0.00% 1 Missing ⚠️
src/segmented-control/segment.tsx 50.00% 1 Missing ⚠️
src/select/parts/item.tsx 75.00% 1 Missing ⚠️
src/select/parts/multiselect-item.tsx 75.00% 1 Missing ⚠️
src/slider/internal.tsx 66.66% 1 Missing ⚠️
src/tabs/tab-header-bar.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3217      +/-   ##
==========================================
- Coverage   96.44%   96.36%   -0.09%     
==========================================
  Files         790      790              
  Lines       22246    22274      +28     
  Branches     7575     7647      +72     
==========================================
+ Hits        21455    21464       +9     
- Misses        739      757      +18     
- Partials       52       53       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant