Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Add documentation to 10-page-headers.md.erb

Marc Alcobé Tallóef80fee14837
diff --git a/lookbook/docs/patterns/10-page-headers.md.erb b/lookbook/docs/patterns/10-page-headers.md.erb
index 2d909c089c7..cf1750c71aa 100644
--- a/lookbook/docs/patterns/10-page-headers.md.erb
+++ b/lookbook/docs/patterns/10-page-headers.md.erb
@@ -1 +1,42 @@
-Some important specification on the page headers is coming...
+# Page Headers
+
+This component, Page Header, is an adaptation to fir OpenProject requirements of the React component Page Header of primer. This document will only state the points that differ from what **[Primer specifies](https://primer.style/components/page-header)** about this component in their documentation.
+
+## Anatomy
+
+There are minor adjustments on how the composition of this component is defined in Primer for OpenProject:
+
+**[Context bar](https://primer.style/components/page-header#context-bar):** Will be always present in all pages and will change depending on the viewport:
+
+- **Desktop:** the content of the context bar will be a [breadcrumb](https://primer.style/components/breadcrumbs).
+- **Tablet:** the content of the context bar will be a [breadcrumb](https://primer.style/components/breadcrumbs).
+- **Mobile:** the content will use the parent link style with context bar actions, moving all the page header actions to it in a single [Icon button](https://primer.style/components/icon-button).
+
+**[Title bar](https://primer.style/components/page-header#title-bar):** The default (medium) size will be always used keeping the capability as optionals of adding leading and trailing visuals and actions.
+
+**Actions:** A maximum amount of 5 actions can be displayed independently in the Page Header actions. If there are more than 5 actions the last one will be an [Icon button](https://primer.style/components/icon-button) with a more action, this one will trigger all the extra actions in a dropdown. All actions require their own icon.
+
+**Divider**: The divider bellow the Page Header will be always present with the exception of displaying a [Tav nav](https://primer.style/components/tab-nav) as navigation element bellow.
+
+## **Exceptional behaviours**
+
+- A special behaviour occurs when the page can be saved (or saved as) as one of the Page Header actions will be used to display an informational text and a link to perform the action.
+- Work packages details would be the only exceptional case where the breadcrumb will be used to display the parent work package instead of the navigational hierarchy.
+
+## Best practices
+
+**Do**
+
+- Limit the actions of the Page Header to the global actions of the page (e. for a work package list: favourite, share, full-screen, …). *Note: this can not be 100% fulfilled until the Primer page sub-headers are implemented.*
+- Use the H1 tag always for the Page Header even if the default Page Header doesn’t contain this tag in the code.
+- All actions require their own icon.
+- Use Icon buttons instead of buttons for actions only when the icon is clear enough to describe the action.
+
+**Don't**
+
+- Don’t use the trailing action in the page header as navigation element “back”, the breadcrumb and the browser back are covering this case.
+- Use Page Headers as section sub-header inside of the content of the page.
+
+## Used in
+
+The Page Header is a navigational mandatory component in all pages that will always use as title the name of the page where is contained.