fix(alert): pause auto-close alert when link focused#9503
Merged
josercarcamo merged 11 commits intomainfrom Jun 5, 2024
Merged
fix(alert): pause auto-close alert when link focused#9503josercarcamo merged 11 commits intomainfrom
josercarcamo merged 11 commits intomainfrom
Conversation
driskull
reviewed
Jun 4, 2024
Member
driskull
left a comment
There was a problem hiding this comment.
Looking good @josercarcamo. I'm not super familiar with the alert component so maybe someone who is can review this a bit better :)
| }; | ||
|
|
||
| private handleMouseLeave = (): void => { | ||
| private handleUnfocus = (): void => { |
Member
There was a problem hiding this comment.
maybe rename to handleBlur? focus/blur and focusin/focusout are the correct opposites I think
| :host(:hover[auto-close-duration="#{$name}"]) .dismiss-progress:after { | ||
| animation-play-state: paused; | ||
| } | ||
| :host(:focus[auto-close-duration="#{$name}"]) .dismiss-progress:after { |
Member
There was a problem hiding this comment.
I think these can be combined like this:
:host(:hover[auto-close-duration="#{$name}"]) .dismiss-progress:after,
:host(:focus[auto-close-duration="#{$name}"]) .dismiss-progress:after {
animation-play-state: paused;
}
driskull
approved these changes
Jun 5, 2024
Member
driskull
left a comment
There was a problem hiding this comment.
Looks good after adding class to CSS lookup object.
| [CSS.containerQueued]: queued, | ||
| [`${CSS.container}--${placement}`]: true, | ||
| [CSS.containerSlottedInShell]: this.slottedInShell, | ||
| ["focused"]: this.keyBoardFocus, |
Member
There was a problem hiding this comment.
@josercarcamo can you add the focused class to the CSS object?
…:Esri/calcite-design-system into josercarcamo/5960-timer-pause-when-focus
benelan
added a commit
that referenced
this pull request
Jun 10, 2024
…orkflow * origin/main: (26 commits) revert: refactor: add simpler `componentFocusable` util (deprecates `LoadableComponent`) (#9515) chore(linting): enable selector-pseudo-element-colon-notation rule (#9518) refactor(storybook): refactor tooltip simple story interface (#9538) refactor(dom): consolidate transition/animation waiting utils (#9341) refactor(storybook): build storybook simple story args interfaces using component class (#9457) chore: release next fix(block): add accessible label for slotted controls (#9502) feat(action-bar, action-pad): add expandLabel and collapseLabel to messages (#9497) chore: release next feat(action-menu, combobox, dropdown, input-date-picker, popover): allow logical placements for flipPlacements property. #8825 (#9490) fix(popover): correct border radius on close button (#9485) fix(list-item): hide nested list items by default (#9474) refactor: move component types into component specific interfaces files (#9527) chore: release next fix(alert): pause auto-close alert when link focused (#9503) refactor(storybook): consolidate storybook and component types (#9500) refactor(calcite-block-section,calcite-card): consolidate interfaces imports (#9517) chore: release next fix(block-section): restore block toggling when clicking on the header switch (#9472) chore: release next ...
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue: #5960
Summary
Paused auto close when the focus is in the link or close buton or when the mouse is hovered over the alert dialog.