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

[Alert] Multiple open Alerts present in DOM at initialization should form a queue #9340

Closed
2 of 6 tasks
macandcheese opened this issue May 14, 2024 · 2 comments
Closed
2 of 6 tasks
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. c-alert Issues that pertain to the calcite-alert component Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 5 A few days of work, definitely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - low Issue is non core or affecting less that 10% of people using the library p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone

Comments

@macandcheese
Copy link
Contributor

macandcheese commented May 14, 2024

Check existing issues

Description

If multiple Alert with the open property are present in the DOM as the components initialize, they will not form a queue, and appear stacked on top of one another.

Subsequently added Alert will "fix the queue" and properly stack Alert, but this doesn't happen at load.

Can be coupled with the effort of #9499.

Acceptance Criteria

If there are multiple Alert with the open property present in the DOM as the components initialize, they should form a queue. As there currently isn't a way to manage order, we might just use "last one wins" like we do in other components that have multiple sibling components that can load simultaneously.

Relevant Info

Further improvements may occur in #8705, but it would be nice to solve this with our current set up... might require the addition of an Alert Group to manage?

Which Component

Alert

Example Use Case

Codepen:

https://codepen.io/mac_and_cheese/pen/xxNGjVe?editors=1000

Note that on load the two Alert are stacked on top of one another, each unaware of the other's existence. If you "Add an Alert" - it will correctly create a queue with 3 Alerts.

Priority impact

p3 - want for upcoming milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

Calcite (design)

@macandcheese macandcheese added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. c-alert Issues that pertain to the calcite-alert component labels May 14, 2024
@github-actions github-actions bot added p3 - want for upcoming milestone Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. labels May 14, 2024
@macandcheese macandcheese changed the title [Alert] Multiple Alerts present in DOM at initialization should form a queue [Alert] Multiple open Alerts present in DOM at initialization should form a queue May 14, 2024
@geospatialem geospatialem added impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone and removed p3 - want for upcoming milestone labels May 21, 2024
@geospatialem geospatialem added this to the 2024-12-17 - Dec Release milestone Aug 12, 2024
@geospatialem geospatialem added p - low Issue is non core or affecting less that 10% of people using the library estimate - 5 A few days of work, definitely requires updates to tests. labels Aug 12, 2024
@github-actions github-actions bot added the p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone label Aug 12, 2024
@jcfranco jcfranco added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Aug 12, 2024
@jcfranco jcfranco removed the needs triage Planning workflow - pending design/dev review. label Aug 12, 2024
driskull added a commit that referenced this issue Aug 19, 2024
**Related Issue:** #9340

## Summary

- add `AlertManager` class for handling registration of alerts.
- refactor `Alert` to no longer emit internal events. Instead, alert
communication is handled via the `AlertManager`
- added two internal props to alert to whether an alert is active and
how many alerts are opened.
- instead of multiple alerts being `queued`, only one alert is `active`.
All other `open` alerts are assumed to be queued.
- add spec test
@driskull driskull added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Aug 19, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Aug 20, 2024

🍡 Verified on 2.12.0-next.26
https://codepen.io/Ditwan-Price/pen/poXLgmW?editors=1010

@DitwanP DitwanP closed this as completed Aug 20, 2024
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. c-alert Issues that pertain to the calcite-alert component Calcite (design) Issues logged by Calcite designers. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 5 A few days of work, definitely requires updates to tests. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - low Issue is non core or affecting less that 10% of people using the library p3 - want for upcoming milestone User set priority status of p3 - want for upcoming milestone
Projects
None yet
Development

No branches or pull requests

5 participants