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(alert): auto-dismissible retains close button and dismisses timer while a user is hovering over #5872

Merged

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented Dec 1, 2022

Related Issue: #3338

Summary

If an alert is auto-dismissible,

  • keep the close button there, a user may want to dismiss the alert before the dismiss duration completes.

  • pause the dismiss timer while a user is hovering over, or focusing on an element within an alert. Although disincentivized, apps may put actions or links inside of an auto-dismissible alert.

@github-actions github-actions bot added the bug Bug reports for broken functionality. Issues should include a reproduction of the bug. label Dec 1, 2022
@Elijbet Elijbet added the enhancement Issues tied to a new feature or request. label Dec 8, 2022
@Elijbet Elijbet marked this pull request as ready for review December 8, 2022 21:20
@Elijbet Elijbet requested a review from a team as a code owner December 8, 2022 21:20
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

Looking good!

src/components/alert/alert.stories.ts Outdated Show resolved Hide resolved
src/components/alert/alert.tsx Outdated Show resolved Hide resolved
src/components/alert/alert.tsx Show resolved Hide resolved
@Elijbet Elijbet added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Dec 8, 2022
Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

@Elijbet Elijbet merged commit 274b104 into master Dec 8, 2022
@Elijbet Elijbet deleted the elijbet/3338-alert-usability-enhancements-to-auto-dismiss branch December 8, 2022 23:32
@github-actions github-actions bot added this to the 2023 January Priorities milestone Dec 8, 2022
@macandcheese
Copy link
Contributor

Extremely awesome work @Elijbet !! The only thing I notice is that while it pauses while hovering, it's not pausing when focus is inside the alert and the cursor is not. For instance, if there is a slotted calcite-link that has focus, the timer should pause as well. Maybe we can just add this as a follow up for later?

@Elijbet
Copy link
Contributor Author

Elijbet commented Dec 9, 2022

Extremely awesome work @Elijbet !! The only thing I notice is that while it pauses while hovering, it's not pausing when focus is inside the alert and the cursor is not. For instance, if there is a slotted calcite-link that has focus, the timer should pause as well. Maybe we can just add this as a follow up for later?

Yeah, that's a good point, I don't think I thought of that. Lets log it as an issue and I'll address that as well.

benelan added a commit that referenced this pull request Dec 12, 2022
* master: (55 commits)
  build: update browserslist db (#5986)
  docs: update component READMEs (#5980)
  1.0.0-next.670
  refactor(input-date-picker,date-picker)!: Removing deprecated locale properties (#5977)
  1.0.0-next.669
  refactor(input-date-picker)!: Remove deprecated active property (#5974)
  1.0.0-next.668
  fix(modal, popover): Add `disableFocusTrap` property to toggle focus trapping. (#5965)
  1.0.0-next.667
  refactor(input-time-picker)!: Remove deprecated active property (#5970)
  docs(changelog): fix breaking change indent levels (#5973)
  1.0.0-next.666
  refactor(time-picker)!: Remove deprecated locale property (#5962)
  1.0.0-next.665
  fix(input, input-number, input-text): Fix infinite loop crashing browser. #5882 (#5961)
  test(floating-ui): fix type errors (#5966)
  docs: update component READMEs (#5964)
  1.0.0-next.664
  fix(alert): auto-dismissible retains close button and dismisses timer while a user is hovering over (#5872)
  chore(color-picker): add opacity string (#5959)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports for broken functionality. Issues should include a reproduction of the bug. enhancement Issues tied to a new feature or request. pr ready for visual snapshots Adding this label will run visual snapshot testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants