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(sbb-dialog): handle unwanted backdrop clicks on overlay components #1845

Merged
merged 3 commits into from
Jun 30, 2023

Conversation

MarioCastigliano
Copy link
Contributor

Preflight Checklist

Issue

This PR Closes #1834

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

See Review Guidelines for more information what is checked during review process.

Changes

Changes in this pull request:

  • Check event's composedPath to make sure click on overlays that overflow the dialog won't be counted as clicks on the backdrop

Browsers

I tested the build on the following browsers:

  • Firefox Desktop
  • Chrome Desktop
  • Edge Desktop
  • Safari Desktop
  • Chrome Mobile
  • Safari Mobile

Screen readers

I tested the build on the following browsers:

  • JAWS Firefox Desktop
  • JAWS Chrome Desktop
  • NVDA Firefox Desktop
  • NVDA Chrome Desktop
  • VoiceOver Safari Desktop
  • VoiceOver Chrome Desktop
  • VoiceOver Safari Mobile
  • Android Accessibility Suite Chrome Mobile

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Does this introduce a breaking change?

  • Yes
  • No

Other information

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2023

Codecov Report

Merging #1845 (1366292) into master (ab917b0) will decrease coverage by 17.43%.
The diff coverage is 34.45%.

❗ Current head 1366292 differs from pull request most recent head 948b7a2. Consider uploading reports for the commit 948b7a2 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@             Coverage Diff             @@
##           master    #1845       +/-   ##
===========================================
- Coverage   54.85%   37.42%   -17.43%     
===========================================
  Files          49      257      +208     
  Lines        1659     9841     +8182     
  Branches      406     2121     +1715     
===========================================
+ Hits          910     3683     +2773     
- Misses        671     5890     +5219     
- Partials       78      268      +190     
Impacted Files Coverage Δ
...ts/sbb-accordion-item/sbb-accordion-item.events.ts 100.00% <ø> (ø)
.../sbb-accordion-item/sbb-accordion-item.stories.tsx 0.00% <0.00%> (ø)
...mponents/sbb-accordion-item/sbb-accordion-item.tsx 0.00% <0.00%> (-37.21%) ⬇️
...components/sbb-accordion/sbb-accordion.stories.tsx 0.00% <0.00%> (ø)
...ents/sbb-action-group/sbb-action-group.stories.tsx 0.00% <0.00%> (ø)
...onents/sbb-alert-group/sbb-alert-group.stories.tsx 0.00% <0.00%> (ø)
src/components/sbb-alert/sbb-alert.stories.tsx 0.00% <0.00%> (ø)
...onents/sbb-autocomplete/sbb-autocomplete.events.ts 100.00% <ø> (ø)
...ents/sbb-autocomplete/sbb-autocomplete.stories.tsx 0.00% <0.00%> (ø)
src/components/sbb-button/sbb-button.stories.tsx 0.00% <0.00%> (ø)
... and 58 more

... and 201 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@jeripeierSBB jeripeierSBB left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this!

src/components/sbb-dialog/sbb-dialog.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot temporarily deployed to preview-pr1845 June 29, 2023 14:54 Inactive
Copy link
Contributor

@kyubisation kyubisation left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thanks for the fix 😃

src/components/sbb-dialog/sbb-dialog.tsx Outdated Show resolved Hide resolved
src/components/sbb-dialog/sbb-dialog.tsx Outdated Show resolved Hide resolved
@kyubisation kyubisation dismissed jeripeierSBB’s stale review June 30, 2023 09:34

Re-review done by kyubisation

@MarioCastigliano MarioCastigliano merged commit 9f1c3b2 into master Jun 30, 2023
12 checks passed
@MarioCastigliano MarioCastigliano deleted the fix/sbb-dialog branch June 30, 2023 12:07
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]: can't use sbb-datepicker and sbb-select in sbb-dialog
4 participants