-
Notifications
You must be signed in to change notification settings - Fork 2.1k
refactor(dialog): Split dialog Foundation#handleInteraction into #handleClick/#handleKeydown. #4655
Conversation
…dleClick and #handleKeydown.
All 639 screenshot tests passed for commit bcfc394 vs. |
All 639 screenshot tests passed for commit bcfc394 vs. |
…onents-web into dialog
…onents-web into dialog
Codecov Report
@@ Coverage Diff @@
## develop #4655 +/- ##
===========================================
- Coverage 98.96% 98.95% -0.02%
===========================================
Files 129 129
Lines 6297 6298 +1
Branches 821 821
===========================================
Hits 6232 6232
- Misses 64 65 +1
Partials 1 1
Continue to review full report at Codecov.
|
All 639 screenshot tests passed for commit b6900b4 vs. |
All 639 screenshot tests passed for commit 50714b1 vs. |
All 639 screenshot tests passed for commit 85523ec vs. |
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.
Looks good overall! Need to update unit tests based on refactor.
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.
Since this is a breaking change merge develop
onto your branch and update this PR.
All 639 screenshot tests passed for commit 5e47a5a vs. |
All 639 screenshot tests passed for commit 63d6898 vs. |
All 639 screenshot tests passed for commit cda032a vs. |
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.
LGTM 🎉
const isClick = evt.type === 'click'; | ||
const isEnter = (evt as KeyboardEvent).key === 'Enter' || (evt as KeyboardEvent).keyCode === 13; | ||
const isSpace = (evt as KeyboardEvent).key === 'Space' || (evt as KeyboardEvent).keyCode === 32; | ||
/** Closes the dialog if scrim or action button click. */ |
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.
Handles click event on dialog root element.
…dleClick/#handleKeydown. (#4655) BREAKING CHANGE: Dialog `Foundation#handleInteraction` has been split into two methods: `#handleClick` and `#handleKeydown`.
…dleClick/#handleKeydown. (#4655) BREAKING CHANGE: Dialog `Foundation#handleInteraction` has been split into two methods: `#handleClick` and `#handleKeydown`.
…dleClick/#handleKeydown. (#4655) BREAKING CHANGE: Dialog `Foundation#handleInteraction` has been split into two methods: `#handleClick` and `#handleKeydown`.
…dleClick/#handleKeydown. (#4655) BREAKING CHANGE: Dialog `Foundation#handleInteraction` has been split into two methods: `#handleClick` and `#handleKeydown`.
…dleClick/#handleKeydown. (#4655) BREAKING CHANGE: Dialog `Foundation#handleInteraction` has been split into two methods: `#handleClick` and `#handleKeydown`.
This allows wrapper libraries to wire up #handleClick to their own custom events.
BREAKING CHANGE: Dialog
Foundation#handleInteraction
has been split into two methods:#handleClick
and#handleKeydown
.