Content
View differences
Updated by Marc Alcobé 1 day ago
### User Story
**As a** mobile app user viewing **As** a work package detail \[enter role of user\]
**I want** see “Mark all as read” when there are unread notifications want to** \[enter objective\]
**So **so that** the header stays uncluttered and I can clear unread activity efficiently when it is relevant \[enter desired result\]
### Acceptance Criteria **Acceptance criteria**
* The Work Package detail view header no longer shows a dedicated **Share** action button
<br>
**Technical notes**
* The **Share** action is available inside the **More** menu on the Work Package detail view
* The Work Package detail view header includes a **Mark all as read** action in the space freed by moving Share
* The **Mark all as read** action is **only visible <br>
**Permissions and enabled** when the work package has **active (unread) notifications** associated with the **Activity** tab
visibility considerations**
* If the work package has **no active (unread) notifications** for the Activity tab:
* The **Mark all as read** action _To whom is hidden
* Tapping **Mark all as read** marks all unread notifications for that work package’s Activity as read this feature visible?_
* After successful completion of “Mark all as read”:
* The work package shows no active notifications in the Activity tab
* The “Mark all as read” action _When is no longer visible on the header
it not visible?_
**Translation considerations**
* Any unread badges/counters related to that work package’s Activity are updated immediately without requiring a full screen refresh
* A toast message appears on the bottom confirming the action _Key terms and allowing to undo
* If the “Mark all as read” operation fails (for example due to connectivity/API error):
* The app shows a non-blocking error message
* No notifications are incorrectly marked as read phrases in the UI
* The action remains available so the user can retry
* The More menu continues to behave as it is, and Share remains discoverable inside this menu with an appropriate label and icon key languages_
### Technical Notes **Out of scope**
* **UI implementation**
* Remove Share icon/button from the navigation/header actions for Work Package detail
* Add a new header action slot for “Mark all as read”
* Add Share entry <br>
_Set the_ **To be informed/consulted teams** _field to the More menu action list
* **State and data**
* Introduce/consume a boolean (or count) for the work package: `hasUnreadActivityNotifications` (or `unreadActivityNotificationCount`)
* “Mark include all as read” visibility binds directly teams necessary to this state
* On success, update local state immediately:
* Set unread count to 0
* Update Activity tab badge/indicators
* Update any notification list items to read state if cached locally
* **API dependencies / contracts (OpenProject API v3)**
* Requires an endpoint/operation to mark notifications as read for a scope:
* Minimum viable: mark all notifications for a work package as read
* Preferred: mark all _Activity-related_ notifications for a work package as read, if server supports that distinction
* **Performance**
* Avoid refetching the entire work package detail if only notification state changes
### Permissions and Visibility Considerations
* Share visibility follows existing rules:
* If the work package can be shared/viewed externally or internally, Share is shown in More
* If sharing is not permitted for the user/context, Share is hidden or disabled in More (follow existing behavior)
* “Mark all as read” is only available to authenticated users
* If notification read state changes require specific permissions, enforce them:
* If the user cannot update notification state, hide “Mark all as read” and do not show it even when unread items exist
### Translation Considerations
* No new translation strings
### Out informed of Scope
* Changing the behavior or contents of the work packages tab beyond notification read/unread state
* Changing Share behavior itself (only relocating the entry point) changes._
**As a** mobile app user viewing
**I want** see “Mark all as read” when there are unread notifications
**So
### Acceptance Criteria
* The Work Package detail view header no longer shows a dedicated **Share** action button
**Technical notes**
* The Work Package detail view header includes a **Mark all as read** action in the space freed by moving Share
* The **Mark all as read** action is **only visible
**Permissions
* The **Mark all as read** action
* Tapping **Mark all as read** marks all unread notifications for that work package’s Activity as read
* After successful completion of “Mark all as read”:
* The work package shows no active notifications in the Activity tab
* The “Mark all as read” action
**Translation considerations**
* A toast message appears on the bottom confirming the action
* If the “Mark all as read” operation fails (for example due to connectivity/API error):
* The app shows a non-blocking error message
* No notifications are incorrectly marked as read
* The action remains available so the user can retry
* The More menu continues to behave as it is, and Share remains discoverable inside this menu with an appropriate label and icon
### Technical Notes
* **UI implementation**
* Remove Share icon/button from the navigation/header actions for Work Package detail
* Add a new header action slot for “Mark all as read”
* Add Share entry
_Set the_ **To be informed/consulted teams** _field
* **State and data**
* Introduce/consume a boolean (or count) for the work package: `hasUnreadActivityNotifications` (or `unreadActivityNotificationCount`)
* “Mark
* On success, update local state immediately:
* Set unread count to 0
* Update Activity tab badge/indicators
* Update any notification list items to read state if cached locally
* **API dependencies / contracts (OpenProject API v3)**
* Requires an endpoint/operation to mark notifications as read for a scope:
* Minimum viable: mark all notifications for a work package as read
* Preferred: mark all _Activity-related_ notifications for a work package as read, if server supports that distinction
* **Performance**
* Avoid refetching the entire work package detail if only notification state changes
### Permissions and Visibility Considerations
* Share visibility follows existing rules:
* If the work package can be shared/viewed externally or internally, Share is shown in More
* If sharing is not permitted for the user/context, Share is hidden or disabled in More (follow existing behavior)
* “Mark all as read” is only available to authenticated users
* If notification read state changes require specific permissions, enforce them:
* If the user cannot update notification state, hide “Mark all as read” and do not show it even when unread items exist
### Translation Considerations
* No new translation strings
### Out
* Changing the behavior or contents of the work packages tab beyond notification read/unread state
* Changing Share behavior itself (only relocating the entry point)