Content
View differences
Updated by Benjamin Bädorf almost 5 years ago
As a project member
I want to see the number of unread notifications in the work packages view.
So that I can better decide whether I want to have a look at these changes.
**Acceptance criteria**
* [x] The number of relations and watchers are displayed in brackets. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] The number of unread notifications are shown inside a dot within the activity header. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] The activities with unread notifications are highlighted within the activity list. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] There can be activities that the user did not subscribe to. Those have no dot. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] The above behaviour is present regardless of where the work package page was opened from (notification center, work package list, board, my page, ...)
* [x] Changing color of badges in tab from red to blue. ([Pull Request](https://github.com/opf/openproject/pull/9591))
* [x] Notification center: Opening a work package should not remove the unread notification badges in the activity ([Pull Request](https://github.com/opf/openproject/pull/9594))
* [ ] Split view: Make header for activity tab sticky (see mockup) and place the button for marking notifications read there. ([Pull Request](https://github.com/opf/openproject/pull/9599))
* [ ] Full view: Include the "mark as read" button in the already existing menu at the top right corner of the content area (between the watcher and the zen mode toggle). ([Pull Request](https://github.com/opf/openproject/pull/9599))
* ~~If easily achievable, turn the header for the activity tab sticky.~~ (Possible, but I'd like to postpone this for now, as there is a lot of detailed work necessary. In comparison to the greater feature, this has less priority)
* [ ] A work package is marked as read in two conditions: ([Pull Request](https://github.com/opf/openproject/pull/9599))
* [ ] Clicking manually on the "Mark as Read" button on the now-sticky header in the activity tab (whether from Notification Center or work package). ([Pull Request](https://github.com/opf/openproject/pull/9599))
* [x] Clicking on "Mark as read" button that is always visible on the workpackage in Notification Center. (This applies for when the user clicks on the existing "Mark all as read" button too, naturally). ([Pull Request](https://github.com/opf/openproject/pull/9594))
* [ ] Scrolling: Always scroll to the oldest unread notification + the activity before (to create more context). Keep in mind the user's individual order settings (chronological/reverse chronological).
* [ ] In case a deep link is followed including an activity anchor, the activity anchor overrules the notification scrolling.
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/22050/content"></div></figure>
**Out of scope**
* ~~Dealing with the situation that the notifications are removed even though the user didn't have a chance to read them.~~ (Obsolete as the auto-read-change has been omitted)
* Changing the buttons in the toolbar. We keep the current styling for now.
* Flagging work packages
**Technical notes**
* For the scrolling behaviour in the activity tab, I'd suggest we change the scrolling parent of the tabs. Right now, the tab headings are in the same scroll container as the tab content, meaning that when you scroll through the activities, the tab headings also scroll away. <mention class="mention" data-id="39106" data-type="user" data-text="@Henriette Darge">@Henriette Darge</mention> already changed this in the work package list split view, where the tab content is now the scrolling parent, meaning the headings stick to the top of the list.
We need to also change this in the full view, after that it is relatively easy to scroll to the right element via JS, by setting the `scrollTop` on the tab content. This works on mobile and tablet without changes, since there the parent does not scroll at all, so we will not have to write any special case code.
I'm not sure how to handle deep links to activities. I'd rather not check for a hashbang, but rather just see if the tab content is already scrolled, and if so, not do our own scrolling.
**Visuals**
https://www.figma.com/file/54psSIYZuUgcyXrpGxHB1Z/UX-Wireframes?node-id=47%3A591
I want to see the number of unread notifications in the work packages view.
So that I can better decide whether I want to have a look at these changes.
**Acceptance criteria**
* [x] The number of relations and watchers are displayed in brackets. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] The number of unread notifications are shown inside a dot within the activity header. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] The activities with unread notifications are highlighted within the activity list. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] There can be activities that the user did not subscribe to. Those have no dot. ([Pull Request](https://github.com/opf/openproject/pull/9582))
* [x] The above behaviour is present regardless of where the work package page was opened from (notification center, work package list, board, my page, ...)
* [x] Changing color of badges in tab from red to blue. ([Pull Request](https://github.com/opf/openproject/pull/9591))
* [x] Notification center: Opening a work package should not remove the unread notification badges in the activity ([Pull Request](https://github.com/opf/openproject/pull/9594))
* [ ] Split view: Make header for activity tab sticky (see mockup) and place the button for marking notifications read there. ([Pull Request](https://github.com/opf/openproject/pull/9599))
* [ ] Full view: Include the "mark as read" button in the already existing menu at the top right corner of the content area (between the watcher and the zen mode toggle). ([Pull Request](https://github.com/opf/openproject/pull/9599))
* ~~If easily achievable, turn the header for the activity tab sticky.~~ (Possible, but I'd like to postpone this for now, as there is a lot of detailed work necessary. In comparison to the greater feature, this has less priority)
* [ ] A work package is marked as read in two conditions: ([Pull Request](https://github.com/opf/openproject/pull/9599))
* [ ] Clicking manually on the "Mark as Read" button on the now-sticky header in the activity tab (whether from Notification Center or work package). ([Pull Request](https://github.com/opf/openproject/pull/9599))
* [x] Clicking on "Mark as read" button that is always visible on the workpackage in Notification Center. (This applies for when the user clicks on the existing "Mark all as read" button too, naturally). ([Pull Request](https://github.com/opf/openproject/pull/9594))
* [ ] Scrolling: Always scroll to the oldest unread notification + the activity before (to create more context). Keep in mind the user's individual order settings (chronological/reverse chronological).
* [ ] In case a deep link is followed including an activity anchor, the activity anchor overrules the notification scrolling.
<figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/22050/content"></div></figure>
**Out of scope**
* ~~Dealing with the situation that the notifications are removed even though the user didn't have a chance to read them.~~ (Obsolete as the auto-read-change has been omitted)
* Changing the buttons in the toolbar. We keep the current styling for now.
* Flagging work packages
**Technical notes**
* For the scrolling behaviour in the activity tab, I'd suggest we change the scrolling parent of the tabs. Right now, the tab headings are in the same scroll container as the tab content, meaning that when you scroll through the activities, the tab headings also scroll away. <mention class="mention" data-id="39106" data-type="user" data-text="@Henriette Darge">@Henriette Darge</mention> already changed this in the work package list split view, where the tab content is now the scrolling parent, meaning the headings stick to the top of the list.
We need to also change this in the full view, after that it is relatively easy to scroll to the right element via JS, by setting the `scrollTop` on the tab content. This works on mobile and tablet without changes, since there the parent does not scroll at all, so we will not have to write any special case code.
I'm not sure how to handle deep links to activities. I'd rather not check for a hashbang, but rather just see if the tab content is already scrolled, and if so, not do our own scrolling.
**Visuals**
https://www.figma.com/file/54psSIYZuUgcyXrpGxHB1Z/UX-Wireframes?node-id=47%3A591