Content
Feature SDS-197: Document and implement proper mobile behaviour for Sub Header component (OP Primer)
View differences
Updated by Parimal Satyal about 1 year ago
#### **Context**
We're increasingly using the [Primer Sub Header](https://qa.openproject-edge.com/lookbook/pages/patterns/sub_header) component in different pages. This provides the user with a toolbar with additional actions related to the objets contained below. Most pages have a very limited number of elements on the sub header; they work just as well in mobile devices. In others, some Meetings index pages, there are too many and it all appears squished.
This feature seeks to define mobile behaviour at a component level in order to avoid case-by-base overrides as much as possible.
**⚠️ The scope is limited: this feature only concerns currently-implemented subheaders, not future variations. We will have to adapt the mobile behaviour again once, for example, quick filters are implemented.**
#### **Acceptance criteria**
The Sub Header adapts to mobile screens:
* All buttons The actions on the left side always turn into icon buttons without labels, and without trailing icons (eg. dropdown)
* This is for both the left- and the right-side buttons
* Segmented controls also go into icon-only mode labels
* If there are badges (notably on the 'Filter' tab) tab), these will be displayed
* All subheader items must have an icon specified, even if the desktop version does not show an icon (eg. 'Filter')
* Currently, three types of actions have been identified:
* Search (on mobile, the currently implementation takes the full length when clicked)
* Filter
* Segmented controls
* _\[open\] Can segmented controls be converted to drop-down on mobile, like on the GitHub notification center?_
* ~~A A new slot needs tobe added to it and segmented controls must also have icons in their desktop variant.~~ variant.
* Buttons
* If there are were no actions on the left side of the SubHeader Sub Header on desktop, this space will remain empty on mobile too
* ~~The The right-side actions (usually a solitary primary add "+ {Object} button) will remain in its full form. They will not go into icon-only mode.~~ mode.
* All actions that do not have a visible label need a title or ARIA label for accessibilty
#### **Out of scope**
* These adaptation don't take the upcoming quick filters into account:
* ###57964
**Tasks**
* [ ] Discuss this in a UX/UI Open Door so [x] Mobile behaviour for the update mobile behaviour Sub header is discussed defined and agreed upon (scheduled)
* [ ] Update The LookBook docs (Parimal)
* [ ] Add documentation is updated with code examples to LookBook docs (Henriette)
* [ ] Update component The mobile behaviour (Henriette) is implemented as documented in all relevant pages (see below)
#### **Where it's relevant**
* Project list
* Notification center
* Meetings mobile subheader
* Members list
* Administration settings:
* Users and Permissions → Users
* Authentication → OAuth Applications
* Authentication → SAML providers
* Authentication → OpenID providers
* Files → External files storages
* ...
* Notification center
* My Time tracker
#### **Why we need this**
**To To avoid crowded/squished sub-headers like this in mobile:** mobile:
<img class="image_resized op-uc-image op-uc-image_inline" style="width:310px;" style="width:398px;" src="https://community.openproject.org/api/v3/attachments/264138/content"> <img class="image_resized op-uc-image op-uc-image_inline" style="width:296px;" src="/api/v3/attachments/314831/content">
**And And go towards cleaner sub-headers like:** something like this:
<img class="image_resized op-uc-image op-uc-image_inline" style="width:303px;" src="/api/v3/attachments/435314/content"> style="width:467px;" src="/api/v3/attachments/310839/content">
And from this:
<img class="image_resized op-uc-image op-uc-image_inline" style="width:306px;" src="/api/v3/attachments/435312/content"> style="width:368px;" src="/api/v3/attachments/314831/content">
To this:
<img class="image_resized op-uc-image op-uc-image_inline" style="width:297px;" src="/api/v3/attachments/435315/content"> style="width:375px;" src="/api/v3/attachments/314833/content">
We're increasingly using the [Primer Sub Header](https://qa.openproject-edge.com/lookbook/pages/patterns/sub_header) component in different pages. This provides the user with a toolbar with additional actions related to the objets contained below. Most pages have a very limited number of elements on the sub header; they work just as well in mobile devices. In others, some Meetings index pages, there are too many and it all appears squished.
This feature seeks to define mobile behaviour at a component level in order to avoid case-by-base overrides as much as possible.
The Sub Header adapts to mobile screens:
* All buttons
* This is for both the left- and the right-side buttons
* Segmented controls also go into icon-only mode
* If there are badges (notably on the 'Filter' tab)
* All subheader items must have an icon specified, even if the desktop version does not show an icon (eg. 'Filter')
* Currently, three types of actions have been identified:
* Search (on mobile, the currently implementation takes the full length when clicked)
* Filter
* Segmented controls
* _\[open\] Can segmented controls be converted to drop-down on mobile, like on the GitHub notification center?_
* ~~A
* Buttons
* If there are
* ~~The
* All actions that do not have a visible label need a title or ARIA label for accessibilty
#### **Out of scope**
* These adaptation don't take the upcoming quick filters into account:
* ###57964
**Tasks**
* [ ] Discuss this in a UX/UI Open Door so
* [ ] Update
* [ ] Add
* [ ] Update component
#### **Where it's relevant**
* Project list
* Notification center
* Meetings mobile subheader
* Members list
* Administration settings:
* Users and Permissions → Users
* Authentication → OAuth Applications
* Authentication → SAML providers
* Authentication → OpenID providers
* Files → External files storages
* ...
* Notification center
* My Time tracker
#### **Why we need this**
**To
<img class="image_resized op-uc-image op-uc-image_inline" style="width:310px;"
**And
<img class="image_resized op-uc-image op-uc-image_inline" style="width:303px;" src="/api/v3/attachments/435314/content">
And from this:
To this: