Skip to content

Commit fc75bc4

Browse files
authored
Merge pull request #345 from opf/65869-meeting-status-captions-are-underlined
[65869] All links in page header description are undelined
2 parents 492b84a + 6798217 commit fc75bc4

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@openproject/primer-view-components": patch
3+
---
4+
5+
[65869] Add an option in the page header description that allows all links in it to be displayed with or without an underline.

app/components/primer/open_project/page_header.pcss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
.PageHeader {
44
display: flex;
5-
padding-bottom: var(--stack-padding-condensed);
6-
margin-bottom: var(--stack-gap-normal);
5+
padding-bottom: var(--base-size-8);
6+
margin-bottom: var(--base-size-16);
77
border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);
88
flex-flow: column;
99
}
@@ -47,7 +47,7 @@
4747
flex: 1 100%;
4848
}
4949

50-
.PageHeader-description a {
50+
.PageHeader-description--underlined-links a {
5151
/* Ensure the accessibility is met, given that the description is written in light grey */
5252
text-decoration: underline;
5353
}
@@ -76,7 +76,7 @@
7676
}
7777

7878
.PageHeader-leadingAction {
79-
margin-top: 2px; /* to center align with label */
79+
margin-top: var(--base-size-2); /* to center align with label */
8080
margin-right: var(--base-size-4);
8181
}
8282

app/components/primer/open_project/page_header.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ class PageHeader < Primer::Component
4545
}
4646

4747
# Optional description below the title row
48-
renders_one :description, lambda { |**system_arguments|
48+
renders_one :description, lambda { |underlined_links: true, **system_arguments|
4949
deny_tag_argument(**system_arguments)
5050

5151
system_arguments[:tag] = :div
52-
system_arguments[:classes] = class_names(system_arguments[:classes], "PageHeader-description")
52+
system_arguments[:classes] = class_names(
53+
system_arguments[:classes],
54+
"PageHeader-description",
55+
("PageHeader-description--underlined-links" if underlined_links)
56+
)
5357

5458
Primer::BaseComponent.new(**system_arguments)
5559
}

0 commit comments

Comments
 (0)