Content
View differences
Updated by Parimal Satyal over 1 year ago
**As** an OpenProject user
**I want to** be able to quickly undo my an action if that I accidentally click on 'Mark all as read' on Notificaiton center executed inadvertently
**so that** I don't lose valuable unread notifications can avoid costly mistakes
**Context**
We recently introduced the [Danger Dialog](https://qa.openproject-edge.com/lookbook/pages/patterns/danger_dialog) with two variations: a regular and a 'confirmation' variant. However, there must be used with parsimony and only when we really want the user to pay special attention to a potentially potentiationally destructive, non-reversible action.
There might be cases where the action has important consequences but for which we wouldn't want to use the danger codes. We decided currently don't have a non-danger variant of the dialog. Instead, the idea that the 'Mark all as read' button is not a good candidate for it.
was proposed by <mention class="mention" data-id="72512" data-type="user" data-text="@Marc Alcobé">@Marc Alcobé</mention> suggested was a success banner with an undo action in button. This already exists on the the success banner instead, like in the native mobile app. This feature is then to bring this forgiving forviging behaviour to the main OpenProject web app.
**Acceptance criteria**
* When the user clicks on 'Mark For certain actions (eg. marking all notifications as read' in Notification center (this button might since have been renamed since by #61309) read or for certain batch actions),
* Do not show Show a new "Succes with undo" banner
* This will be a standard green success Primer banner with:
* the native browser confirmation dialog usual options (icon, title, message, dismiss button)
* no primary action
* a secondary action named "Undo"
* The undo action will reverse
* Execute If the action and, if undo is successful, show show another standard success banner with text and action: text:
* Message: "All _\[open\] Ideally, a personalised message depending on the action. eg "Restored notifications in this view have been that were previously marked as read." read."_
* Action: "Undo" (invisible button)
* Clicking on 'Undo' undo restores the unread notifications, taking the user back to the previous state
Generic default message: "Undo successful."
**Technical notes**
* We introduced a browser confirmation dialog in #61309; this super-cedes that. How possible is generally to offer these 'undo' actions?
* <mention class="mention" data-id="61407" data-type="work_package" data-text="#61407">#61407</mention>
* We have to update LookBook docs accordingly accordingly, including specifying when to specify use this banner and how to determine when such an undo action should be used vs. the Danger dialog undo-able or not
**Permissions and visibility considerations**
* This 'Success with undo' will only be shown to users who have the permission to execute the orignal action
**Visuals**
Only for reference. For final design, please always see [Figma file](https://www.figma.com/design/5GbR9iFpfUxIPWXTYx9flB/Untitled?node-id=1-2&t=jS7qgT2H2RAoGXfg-4).
<img class="image_resized op-uc-image op-uc-image_inline" style="width:883px;" src="/api/v3/attachments/314799/content">
<br> style="width:703px;" src="/api/v3/attachments/313773/content">
**I want to** be able to quickly undo my
**so that** I don't lose valuable unread notifications
**Context**
We recently introduced the [Danger Dialog](https://qa.openproject-edge.com/lookbook/pages/patterns/danger_dialog) with two variations: a regular and a 'confirmation' variant. However, there must be used with parsimony and only when we really want the user to pay special attention to a potentially
There might be cases where the action has important consequences but for which we wouldn't want to use the danger codes.
**Acceptance criteria**
* When the user clicks on 'Mark
* Do not show
* This will be a standard green success Primer banner with:
*
* no primary action
* a secondary action named "Undo"
* The undo action will reverse
* Execute
* Message: "All
* Action: "Undo" (invisible button)
* Clicking on 'Undo' undo restores the unread notifications, taking the user back to the previous state
* We introduced a browser confirmation dialog in #61309; this super-cedes that.
*
*
**Permissions and visibility considerations**
* This 'Success with undo' will only be shown to users who have the permission to execute the orignal action
**Visuals**
Only for reference. For final design, please always see [Figma file](https://www.figma.com/design/5GbR9iFpfUxIPWXTYx9flB/Untitled?node-id=1-2&t=jS7qgT2H2RAoGXfg-4).
<img class="image_resized op-uc-image op-uc-image_inline" style="width:883px;" src="/api/v3/attachments/314799/content">
<br>