Content
View differences
Updated by Oliver Günther almost 5 years ago
**Acceptance criteria**
When the user has unread notifications in a Work Package and the Work package is opened:
* [ ] Make the tabs (Activity, Relations, Watcher ...) in the full view sticky, so that when scrolled, they are still visible.
* [ ] Always scroll to the **oldest** unread notification and leave some space for the activity before (to create more context).
* [ ] Keep in mind the user's individual order settings (chronological/reverse chronological). So either the space needs to be above or below the shown notification
* [ ] In case a deep link is followed including an activity anchor, the activity anchor overrules the notification scrolling.
* [ ] The behaviour should apply for split view and full view
**Technical notes (taken from #38339)**
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.
Note Oliver: Instead of `scrollTop` , also take a look at `element.scrollIntoView` in combination with the CSS property `scroll-margin`. It might be easier to implement. References: [(1)](https://css-tricks.com/almanac/properties/s/scroll-margin/), [(2)](https://newbedev.com/scrollintoview-with-margin)
Suggestion for the deep link behaviour: Don't check for a hashbang in URL, but rather just see if the tab content is already scrolled. If no, do our own scrolling. If yes, don't trigger our scrolling.
When the user has unread notifications in a Work Package and the Work package is opened:
* [ ] Make the tabs (Activity, Relations, Watcher ...) in the full view sticky, so that when scrolled, they are still visible.
* [ ] Always scroll to the **oldest** unread notification and leave some space for the activity before (to create more context).
* [ ] Keep in mind the user's individual order settings (chronological/reverse chronological). So either the space needs to be above or below the shown notification
* [ ] In case a deep link is followed including an activity anchor, the activity anchor overrules the notification scrolling.
* [ ] The behaviour should apply for split view and full view
**Technical notes (taken from #38339)**
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.
Note Oliver: Instead of `scrollTop` , also take a look at `element.scrollIntoView` in combination with the CSS property `scroll-margin`. It might be easier to implement. References: [(1)](https://css-tricks.com/almanac/properties/s/scroll-margin/), [(2)](https://newbedev.com/scrollintoview-with-margin)
Suggestion for the deep link behaviour: Don't check for a hashbang in URL, but rather just see if the tab content is already scrolled. If no, do our own scrolling. If yes, don't trigger our scrolling.