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] Add prop to prioritize a component in the queue #8705

Closed
2 of 8 tasks
geospatialem opened this issue Feb 7, 2024 · 11 comments
Closed
2 of 8 tasks

[Alert] Add prop to prioritize a component in the queue #8705

geospatialem opened this issue Feb 7, 2024 · 11 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Online Issues logged by ArcGIS Online team members. c-alert Issues that pertain to the calcite-alert component 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 - medium Issue is non core or affecting less that 60% of people using the library

Comments

@geospatialem
Copy link
Member

Check existing issues

Description

Current behavior of the component's queue is causing customer confusion is some scenarios and workflows.

We should provide a prop (name tbd) when a low-priority alert is already visible, and a higher impact alert that is very important to the user's workflow needs to be displayed. When enabled, the low priority alert would be rendered behind the current alert.

Acceptance Criteria

  • Developer can modify the priority of one alert to become a high priority over another
  • Enforce an alert to display with its priority

Relevant Info

Which Component

alert

Example Use Case

  1. An alert is showing at the bottom of the screen telling the user a new feature is now available.
  2. The user does not dismiss this, they just ignore it
  3. The user is taking a critical action and an error occurs
  4. The error alert is behind the first alert, and they don't know what is wrong as the meaningful information is hidden

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

ArcGIS Online

@geospatialem geospatialem 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. labels Feb 7, 2024
@github-actions github-actions bot added p3 - want for upcoming milestone calcite-components Issues specific to the @esri/calcite-components package. ArcGIS Online Issues logged by ArcGIS Online team members. labels Feb 7, 2024
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library estimate - 5 A few days of work, definitely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Feb 7, 2024
@macandcheese
Copy link
Contributor

This could be a high-priority boolean that replaces the top-most (currently open) Alert immediately, or it could also be a property like urgency or queue-type / queue-strategy that accepted values to: "replace the top-most", "add to stack immediately behind top-most", or "add to back of stack (current / default behavior).

@geospatialem geospatialem added this to the 2024-08-27 - Aug Release milestone Apr 3, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Apr 3, 2024
@macandcheese macandcheese added the c-alert Issues that pertain to the calcite-alert component label May 1, 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
@driskull
Copy link
Member

driskull commented Aug 8, 2024

Should there be any visual difference between a high priority alert and one without high priority?

Would we want something like priority="high" or just urgent as a prop?

@driskull driskull self-assigned this Aug 8, 2024
@macandcheese
Copy link
Contributor

I don’t think there would be a visual difference, outside of whatever icon / content combination the author chooses. I think it’s solely a position-in-queue prop.

@driskull
Copy link
Member

driskull commented Aug 9, 2024

Ok so basically its a "move to top" property. 👍

@macandcheese
Copy link
Contributor

Yeah. There are some related issues for different ways to manage that queue - I think an Alert Group component could help refactor some of the Alert events + allow for multiple "queues" across different page surfaces, etc., but this is a good step towards that with the current set up.

@geospatialem geospatialem 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
Copy link
Member

Would we want something like priority="high"

Late to the party here, but I like the idea of a high | medium | low priority. Doesn't seem like we have a use case for it yet, but something to consider if we need a bit more control.

@driskull
Copy link
Member

Late to the party here, but I like the idea of a high | medium | low priority. Doesn't seem like we have a use case for it yet, but something to consider if we need a bit more control.

I think we would need a good use case to have 3 levels of priority.

@macandcheese do you foresee any use case for 3 levels of priority? With current changes it would just be urgent/non-urgent which provides us with two levels of priority.

@driskull
Copy link
Member

We could always add as a priority prop and just have high/low as values to start if we think we may want another level in the future.

driskull added a commit that referenced this issue Aug 17, 2024
…s when opened (#10029)

**Related Issue:** #8705 #8316

## Summary

- add `queue` property to order an open alert `immediate`, `next` or
`last` (default).
- When a `queue="immediate"` alert is opened it is displayed
immediately.
- When a `queue="next"` alert is opened it will be displayed after the
currently opened one is closed.
  - By default, alerts are queued to be `last` when opened.
- When an alert is set to `queue="immediate"` after already being opened
it will be presented first.
    - Done by unregistering and registering the alert again
- All open alerts not at the top of the stack will be queued and auto
close timeout reset
  - All other alerts remain in their place.
- cleanup private var names
- add simple story
- add urgent story
- add e2e 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 17, 2024
Copy link
Contributor

Installed and assigned for verification.

@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned driskull Aug 17, 2024
@DitwanP
Copy link
Contributor

DitwanP commented Aug 20, 2024

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

@DitwanP DitwanP closed this as completed Aug 20, 2024
@DitwanP DitwanP 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 Aug 20, 2024
Copy link
Contributor

Issue #9340 has been closed, this issue is ready for re-evaluation.

cc @geospatialem,@DitwanP

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. ArcGIS Online Issues logged by ArcGIS Online team members. c-alert Issues that pertain to the calcite-alert component 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 - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

5 participants