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

Fixed ActionableNotification with closeOnEscape prop #17433

Merged
merged 6 commits into from
Sep 14, 2024

Conversation

guidari
Copy link
Contributor

@guidari guidari commented Sep 12, 2024

Closes #16153

The addEventListener keydown was being created even after removed. So now we are checking if the ref.current contains a value or it is null.

Testing / Reviewing

  • ActionableNotification Default story with the console open

Steps to reproduce
1 - Add an ActionableNotification with closeOnEscape property
2 - Make sure the Notification is focused, so you can close the notification with the scape key (I reload in case I focus another component)
3 - Press esc key to close the notification
4 - Press any key and check the error logs

carbon-automation bot and others added 3 commits September 12, 2024 09:47
Co-authored-by: tay1orjones <3360588+tay1orjones@users.noreply.github.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
@guidari guidari requested a review from a team as a code owner September 12, 2024 19:17
Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit d1571c6
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66e4b0f617296f0008a44fa5
😎 Deploy Preview https://deploy-preview-17433--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d1571c6
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66e4b0f6994b0a00091f0ab3
😎 Deploy Preview https://deploy-preview-17433--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.85%. Comparing base (47ceaad) to head (d1571c6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17433      +/-   ##
==========================================
- Coverage   76.87%   76.85%   -0.02%     
==========================================
  Files         408      408              
  Lines       13974    13975       +1     
  Branches     4340     4337       -3     
==========================================
- Hits        10742    10740       -2     
- Misses       3058     3061       +3     
  Partials      174      174              

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

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me!

Copy link
Member

@ariellalgilmore ariellalgilmore left a comment

Choose a reason for hiding this comment

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

LGTM!

@kennylam kennylam added this pull request to the merge queue Sep 14, 2024
Merged via the queue into carbon-design-system:main with commit 06844e9 Sep 14, 2024
36 checks passed
guidari added a commit to guidari/carbon that referenced this pull request Sep 18, 2024
…gn-system#17433)

* chore(release): v11.66.0 (carbon-design-system#17413)

Co-authored-by: tay1orjones <3360588+tay1orjones@users.noreply.github.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>

* fix: fixed onKeyDown

---------

Co-authored-by: carbon-automation[bot] <103539138+carbon-automation[bot]@users.noreply.github.com>
Co-authored-by: tay1orjones <3360588+tay1orjones@users.noreply.github.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Closing ActionableNotification with closeOnEscape throws an error when typing
4 participants