openproject-primer_view_components 0.15.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- .PageHeader{border-bottom:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-muted,var(--color-border-muted));display:flex;flex-flow:column;margin-bottom:var(--stack-gap-normal,1rem);padding-bottom:var(--stack-padding-condensed,.5rem)}@media (max-width:767.98px){.PageHeader{border-bottom:0}}.PageHeader-titleBar{align-items:center;display:flex;flex-flow:row;justify-content:flex-end}.PageHeader-title{flex:1 1 auto;font-size:24px;font-weight:var(--base-text-weight-normal,400)}.PageHeader-title--large{font-size:var(--text-title-size-large,2rem)}.PageHeader-description{color:var(--fgColor-muted,var(--color-fg-muted));flex:1 100%;font-size:var(--text-body-size-medium,.875rem)}.PageHeader-actions{justify-content:flex-end;margin:var(--base-size-4,.25rem) 0 var(--base-size-4,.25rem) var(--base-size-4,.25rem)}.PageHeader-actions+.PageHeader-description{margin-top:var(--base-size-4,.25rem)}.PageHeader-breadcrumbs{display:block;margin-bottom:var(--base-size-8,.5rem);width:100%}.PageHeader-backButton{margin-right:var(--base-size-4,.25rem);margin-top:2px}
1
+ .PageHeader{border-bottom:var(--borderWidth-thin,max(1px,.0625rem)) solid var(--borderColor-muted,var(--color-border-muted));display:flex;flex-flow:column;margin-bottom:var(--stack-gap-normal,1rem);padding-bottom:var(--stack-padding-condensed,.5rem)}@media (max-width:767.98px){.PageHeader{border-bottom:0}}.PageHeader-contextBar,.PageHeader-titleBar{align-items:center;display:flex;flex-flow:row;justify-content:flex-end}.PageHeader-title{flex:1 1 auto;font-size:24px;font-weight:var(--base-text-weight-normal,400)}.PageHeader-title--large{font-size:var(--text-title-size-large,2rem)}.PageHeader-description{color:var(--fgColor-muted,var(--color-fg-muted));flex:1 100%;font-size:var(--text-body-size-medium,.875rem)}.PageHeader-actions{display:flex;justify-content:flex-end;margin:0 0 0 var(--base-size-4,.25rem)}.PageHeader-actions+.PageHeader-description{margin-top:var(--base-size-4,.25rem)}.PageHeader-breadcrumbs{display:block;margin-bottom:var(--base-size-8,.5rem);padding-bottom:var(--base-size-4,.25rem);width:100%}.PageHeader-backButton{margin-right:var(--base-size-4,.25rem);margin-top:2px}.PageHeader-parentLink{flex:1 1 auto;margin-bottom:var(--base-size-4,.25rem)}.PageHeader-contextBarActions{margin:0 0 0 var(--base-size-4,.25rem)}
@@ -2,6 +2,7 @@
2
2
  "name": "open_project/page_header",
3
3
  "selectors": [
4
4
  ".PageHeader",
5
+ ".PageHeader-contextBar",
5
6
  ".PageHeader-titleBar",
6
7
  ".PageHeader-title",
7
8
  ".PageHeader-title--large",
@@ -9,6 +10,8 @@
9
10
  ".PageHeader-actions",
10
11
  ".PageHeader-actions+.PageHeader-description",
11
12
  ".PageHeader-breadcrumbs",
12
- ".PageHeader-backButton"
13
+ ".PageHeader-backButton",
14
+ ".PageHeader-parentLink",
15
+ ".PageHeader-contextBarActions"
13
16
  ]
14
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["page_header.pcss"],"names":[],"mappings":"AAEA,YAIE,gHAAqE,CAHrE,YAAa,CAIb,gBAAiB,CAFjB,0CAAsC,CADtC,mDAQF,CAHE,4BAPF,YAQI,eAEJ,CADE,CAGF,qBAIE,kBAAmB,CAHnB,YAAa,CACb,aAAc,CACd,wBAEF,CAEA,kBAGE,aAAc,CAFd,cAAe,CACf,8CAEF,CAEA,yBACE,2CACF,CAGA,wBAEE,gDAA2B,CAC3B,WAAY,CAFZ,8CAGF,CAGA,oBAEE,wBAAyB,CADzB,sFAMF,CAHE,4CACE,oCACF,CAGF,wBACE,aAAc,CAEd,sCAAiC,CADjC,UAEF,CAEA,uBAEE,sCAAgC,CADhC,cAEF","file":"page_header.css","sourcesContent":["/* OP PageHeader */\n\n.PageHeader {\n display: flex;\n padding-bottom: var(--stack-padding-condensed);\n margin-bottom: var(--stack-gap-normal);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);\n flex-flow: column;\n\n @media (max-width: 767.98px) {\n border-bottom: 0;\n }\n}\n\n.PageHeader-titleBar {\n display: flex;\n flex-flow: row;\n justify-content: flex-end;\n align-items: center; /* Keep back button vertically aligned. */\n}\n\n.PageHeader-title {\n font-size: 24px;\n font-weight: var(--base-text-weight-normal);\n flex: 1 1 auto;\n}\n\n.PageHeader-title--large {\n font-size: var(--text-title-size-large);\n}\n\n/* One-liner of supporting text */\n.PageHeader-description {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: 1 100%;\n}\n\n/* Add 1 or 2 buttons to the right of the heading */\n.PageHeader-actions {\n margin: var(--base-size-4) 0 var(--base-size-4) var(--base-size-4);\n justify-content: flex-end;\n\n & + .PageHeader-description {\n margin-top: var(--base-size-4);\n }\n}\n\n.PageHeader-breadcrumbs {\n display: block;\n width: 100%;\n margin-bottom: var(--base-size-8);\n}\n\n.PageHeader-backButton {\n margin-top: 2px; /* to center align with label */\n margin-right: var(--base-size-4);\n}\n"]}
1
+ {"version":3,"sources":["page_header.pcss"],"names":[],"mappings":"AAEA,YAIE,gHAAqE,CAHrE,YAAa,CAIb,gBAAiB,CAFjB,0CAAsC,CADtC,mDAQF,CAHE,4BAPF,YAQI,eAEJ,CADE,CAUF,4CAIE,kBAAmB,CAHnB,YAAa,CACb,aAAc,CACd,wBAEF,CAEA,kBAGE,aAAc,CAFd,cAAe,CACf,8CAEF,CAEA,yBACE,2CACF,CAGA,wBAEE,gDAA2B,CAC3B,WAAY,CAFZ,8CAGF,CAGA,oBAGE,YAAa,CADb,wBAAyB,CADzB,sCAOF,CAHE,4CACE,oCACF,CAGF,wBACE,aAAc,CAEd,sCAAiC,CACjC,wCAAkC,CAFlC,UAGF,CAEA,uBAEE,sCAAgC,CADhC,cAEF,CAEA,uBACE,aAAc,CACd,uCACF,CAEA,8BACE,sCACF","file":"page_header.css","sourcesContent":["/* OP PageHeader */\n\n.PageHeader {\n display: flex;\n padding-bottom: var(--stack-padding-condensed);\n margin-bottom: var(--stack-gap-normal);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);\n flex-flow: column;\n\n @media (max-width: 767.98px) {\n border-bottom: 0;\n }\n}\n\n.PageHeader-contextBar {\n display: flex;\n flex-flow: row;\n justify-content: flex-end;\n align-items: center;\n}\n\n.PageHeader-titleBar {\n display: flex;\n flex-flow: row;\n justify-content: flex-end;\n align-items: center; /* Keep back button vertically aligned. */\n}\n\n.PageHeader-title {\n font-size: 24px;\n font-weight: var(--base-text-weight-normal);\n flex: 1 1 auto;\n}\n\n.PageHeader-title--large {\n font-size: var(--text-title-size-large);\n}\n\n/* One-liner of supporting text */\n.PageHeader-description {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: 1 100%;\n}\n\n/* Add 1 or 2 buttons to the right of the heading */\n.PageHeader-actions {\n margin: 0 0 0 var(--base-size-4);\n justify-content: flex-end;\n display: flex;\n\n & + .PageHeader-description {\n margin-top: var(--base-size-4);\n }\n}\n\n.PageHeader-breadcrumbs {\n display: block;\n width: 100%;\n margin-bottom: var(--base-size-8);\n padding-bottom: var(--base-size-4);\n}\n\n.PageHeader-backButton {\n margin-top: 2px; /* to center align with label */\n margin-right: var(--base-size-4);\n}\n\n.PageHeader-parentLink {\n flex: 1 1 auto;\n margin-bottom: var(--base-size-4);\n}\n\n.PageHeader-contextBarActions {\n margin: 0 0 0 var(--base-size-4);\n}"]}
@@ -1,9 +1,17 @@
1
1
  <%= render Primer::BaseComponent.new(**@system_arguments) do %>
2
- <%= breadcrumbs %>
2
+ <% if parent_link || breadcrumbs || context_bar_actions %>
3
+ <div class="PageHeader-contextBar">
4
+ <%= parent_link %>
5
+ <%= breadcrumbs %>
6
+ <%= context_bar_actions %>
7
+ </div>
8
+ <% end %>
9
+
3
10
  <div class="PageHeader-titleBar">
4
11
  <%= back_button %>
5
12
  <%= title %>
6
13
  <%= actions %>
7
14
  </div>
15
+
8
16
  <%= description %>
9
17
  <% end %>
@@ -12,6 +12,13 @@
12
12
  }
13
13
  }
14
14
 
15
+ .PageHeader-contextBar {
16
+ display: flex;
17
+ flex-flow: row;
18
+ justify-content: flex-end;
19
+ align-items: center;
20
+ }
21
+
15
22
  .PageHeader-titleBar {
16
23
  display: flex;
17
24
  flex-flow: row;
@@ -38,8 +45,9 @@
38
45
 
39
46
  /* Add 1 or 2 buttons to the right of the heading */
40
47
  .PageHeader-actions {
41
- margin: var(--base-size-4) 0 var(--base-size-4) var(--base-size-4);
48
+ margin: 0 0 0 var(--base-size-4);
42
49
  justify-content: flex-end;
50
+ display: flex;
43
51
 
44
52
  & + .PageHeader-description {
45
53
  margin-top: var(--base-size-4);
@@ -50,9 +58,19 @@
50
58
  display: block;
51
59
  width: 100%;
52
60
  margin-bottom: var(--base-size-8);
61
+ padding-bottom: var(--base-size-4);
53
62
  }
54
63
 
55
64
  .PageHeader-backButton {
56
65
  margin-top: 2px; /* to center align with label */
57
66
  margin-right: var(--base-size-4);
58
67
  }
68
+
69
+ .PageHeader-parentLink {
70
+ flex: 1 1 auto;
71
+ margin-bottom: var(--base-size-4);
72
+ }
73
+
74
+ .PageHeader-contextBarActions {
75
+ margin: 0 0 0 var(--base-size-4);
76
+ }
@@ -27,6 +27,11 @@ module Primer
27
27
  "triangle-left"
28
28
  ].freeze
29
29
 
30
+ DEFAULT_BACK_BUTTON_DISPLAY = [:none, :flex].freeze
31
+ DEFAULT_BREADCRUMBS_DISPLAY = [:none, :flex].freeze
32
+ DEFAULT_PARENT_LINK_DISPLAY = [:block, :none].freeze
33
+ DEFAULT_CONTEXT_BAR_ACTIONS_DISPLAY = [:block, :none].freeze
34
+
30
35
  status :open_project
31
36
 
32
37
  # The title of the page header
@@ -64,7 +69,21 @@ module Primer
64
69
  Primer::BaseComponent.new(**system_arguments)
65
70
  }
66
71
 
72
+ # Context Bar Actions
73
+ # By default shown on narrow screens. Can be overridden with system_argument: display
74
+ #
75
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
76
+ renders_one :context_bar_actions, lambda { |**system_arguments|
77
+ deny_tag_argument(**system_arguments)
78
+ system_arguments[:tag] = :div
79
+ system_arguments[:classes] = class_names(system_arguments[:classes], "PageHeader-contextBarActions")
80
+ system_arguments[:display] ||= DEFAULT_CONTEXT_BAR_ACTIONS_DISPLAY
81
+
82
+ Primer::BaseComponent.new(**system_arguments)
83
+ }
84
+
67
85
  # Optional back button prepend the title
86
+ # By default shown on wider screens. Can be overridden with system_argument: display
68
87
  #
69
88
  # @param size [Symbol] <%= one_of(Primer::OpenProject::PageHeader::BACK_BUTTON_SIZE_OPTIONS) %>
70
89
  # @param icon [String] <%= one_of(Primer::OpenProject::PageHeader::BACK_BUTTON_ICON_OPTIONS) %>
@@ -80,16 +99,35 @@ module Primer
80
99
  system_arguments[:size] = fetch_or_fallback(BACK_BUTTON_SIZE_OPTIONS, size, DEFAULT_BACK_BUTTON_SIZE)
81
100
  system_arguments[:icon] = fetch_or_fallback(BACK_BUTTON_ICON_OPTIONS, icon, DEFAULT_BACK_BUTTON_ICON)
82
101
  system_arguments[:classes] = class_names(system_arguments[:classes], "PageHeader-backButton")
102
+ system_arguments[:display] ||= DEFAULT_BACK_BUTTON_DISPLAY
83
103
 
84
104
  Primer::Beta::IconButton.new(**system_arguments)
85
105
  }
86
106
 
107
+ # Optional parent link in the context area
108
+ # By default shown on narrow screens. Can be overridden with system_argument: display
109
+ #
110
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
111
+ renders_one :parent_link, lambda { |icon: DEFAULT_BACK_BUTTON_ICON, **system_arguments, &block|
112
+ deny_tag_argument(**system_arguments)
113
+ system_arguments[:icon] = fetch_or_fallback(BACK_BUTTON_ICON_OPTIONS, icon, DEFAULT_BACK_BUTTON_ICON)
114
+ system_arguments[:classes] = class_names(system_arguments[:classes], "PageHeader-parentLink")
115
+ system_arguments[:display] ||= DEFAULT_PARENT_LINK_DISPLAY
116
+
117
+ render(Primer::Beta::Link.new(scheme: :primary, muted: true, **system_arguments)) do
118
+ render(Primer::Beta::Octicon.new(icon: "arrow-left", "aria-label": "aria_label", mr: 2)) + content_tag(:span, &block)
119
+ end
120
+ }
121
+
87
122
  # Optional breadcrumbs above the title row
123
+ # By default shown on wider screens. Can be overridden with system_argument: display
88
124
  #
89
125
  # @param items [Array<String, Hash>] Items is an array of strings, hash {href, text} or an anchor tag string
90
126
  # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
91
127
  renders_one :breadcrumbs, lambda { |items, **system_arguments|
92
128
  system_arguments[:classes] = class_names(system_arguments[:classes], "PageHeader-breadcrumbs")
129
+ system_arguments[:display] ||= DEFAULT_BREADCRUMBS_DISPLAY
130
+
93
131
  render(Primer::Beta::Breadcrumbs.new(**system_arguments)) do |breadcrumbs|
94
132
  items.each do |item|
95
133
  item = anchor_string_to_object(item) if anchor_tag_string?(item)
@@ -5,7 +5,7 @@ module Primer
5
5
  module ViewComponents
6
6
  module VERSION
7
7
  MAJOR = 0
8
- MINOR = 15
8
+ MINOR = 16
9
9
  PATCH = 0
10
10
 
11
11
  STRING = [MAJOR, MINOR, PATCH].join(".")
@@ -0,0 +1,25 @@
1
+ <%= render(Primer::OpenProject::PageHeader.new) do |component| %>
2
+ <% component.with_title(tag: :h1) do %>
3
+ A title
4
+ <% end %>
5
+ <% component.with_description do %>
6
+ A description with actions
7
+ <% end %>
8
+ <% component.with_parent_link(href: "#") do %>
9
+ Parent link
10
+ <% end %>
11
+ <% component.with_context_bar_actions do %>
12
+ <%= render(Primer::Alpha::ActionMenu.new) do |component| %>
13
+ <% component.with_show_button { "Menu" } %>
14
+ <% component.with_item(label: "Item", tag: :button, value: "") %>
15
+ <% component.with_item(
16
+ label: "Show dialog",
17
+ tag: :button,
18
+ content_arguments: { "data-show-dialog-id": "my-dialog" },
19
+ value: "",
20
+ scheme: :danger
21
+ ) %>
22
+ <% end %>
23
+ <% end %>
24
+ <% end %>
25
+
@@ -0,0 +1,32 @@
1
+ <%= render Primer::OpenProject::PageHeader.new do |header| %>
2
+ <%= header.with_title(variant: variant) { title } %>
3
+ <%= header.with_description { description } %>
4
+ <%= header.with_back_button(href: "#", size: back_button_size, 'aria-label': "Back") if with_back_button %>
5
+ <%= header.with_breadcrumbs(breadcrumb_items) if with_breadcrumbs %>
6
+ <%= header.with_parent_link(href: "#") { "Parent link" } if with_parent_link %>
7
+ <% if with_actions %>
8
+ <% header.with_actions do %>
9
+ <%= render(Primer::Alpha::ActionMenu.new) do |component| %>
10
+ <% component.with_show_button { "Menu" } %>
11
+ <% component.with_item(label: "Item", tag: :button, value: "") %>
12
+ <% component.with_item(
13
+ label: "Show dialog",
14
+ tag: :button,
15
+ content_arguments: { "data-show-dialog-id": "my-dialog" },
16
+ value: "",
17
+ scheme: :danger
18
+ ) %>
19
+ <% end %>
20
+ <% end %>
21
+ <% end %>
22
+ <% if with_context_bar_actions %>
23
+ <% header.with_context_bar_actions do %>
24
+ <%= render(Primer::Beta::IconButton.new(
25
+ scheme: :default,
26
+ size: :small,
27
+ icon: "pencil",
28
+ "aria-label": "aria_label"
29
+ )) %>
30
+ <% end %>
31
+ <% end %>
32
+ <% end %>
@@ -21,22 +21,32 @@ module Primer
21
21
  # @param with_back_button [Boolean]
22
22
  # @param back_button_size [Symbol] select [small, medium, large]
23
23
  # @param with_breadcrumbs [Boolean]
24
+ # @param with_actions [Boolean]
25
+ # @param with_context_bar_actions [Boolean]
26
+ # @param with_parent_link [Boolean]
24
27
  def playground(
25
28
  variant: :medium,
26
29
  title: "Hello",
27
30
  description: "Last updated 5 minutes ago by XYZ.",
28
31
  with_back_button: false,
29
32
  back_button_size: :medium,
30
- with_breadcrumbs: false
33
+ with_breadcrumbs: false,
34
+ with_actions: false,
35
+ with_context_bar_actions: false,
36
+ with_parent_link: false
31
37
  )
32
38
  breadcrumb_items = [{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"]
33
39
 
34
- render(Primer::OpenProject::PageHeader.new) do |header|
35
- header.with_title(variant: variant) { title }
36
- header.with_description { description }
37
- header.with_back_button(href: "#", size: back_button_size, 'aria-label': "Back") if with_back_button
38
- header.with_breadcrumbs(breadcrumb_items) if with_breadcrumbs
39
- end
40
+ render_with_template(locals: { variant: variant,
41
+ title: title,
42
+ description: description,
43
+ with_back_button: with_back_button,
44
+ back_button_size: back_button_size,
45
+ with_breadcrumbs: with_breadcrumbs,
46
+ with_parent_link: with_parent_link,
47
+ with_actions: with_actions,
48
+ with_context_bar_actions: with_context_bar_actions,
49
+ breadcrumb_items: breadcrumb_items })
40
50
  end
41
51
 
42
52
  # @label Large
@@ -52,7 +62,11 @@ module Primer
52
62
  render_with_template(locals: {})
53
63
  end
54
64
 
55
- # @label With back button
65
+ # @label With back button (on wide)
66
+ # **Back button** is only shown on **wider than narrow screens** by default.
67
+ # If you want to override that behaviour please use the system_argument: **display**
68
+ # e.g. **component.with\_breadcrumbs(display: [:block, :block])**
69
+ #
56
70
  # @param href [String] text
57
71
  # @param size [Symbol] select [small, medium, large]
58
72
  # @param icon [String] select ["arrow-left", "chevron-left", "triangle-left"]
@@ -63,7 +77,11 @@ module Primer
63
77
  end
64
78
  end
65
79
 
66
- # @label With breadcrumbs
80
+ # @label With breadcrumbs (on wide)
81
+ # **Breadcrumbs** are only shown on **wider than narrow screens** by default.
82
+ # If you want to override that behaviour please use the system_argument: **display**
83
+ # e.g. **component.with\_breadcrumbs(display: [:block, :block])**
84
+ #
67
85
  def breadcrumbs
68
86
  breadcrumb_items = [
69
87
  { href: "/foo", text: "Foo" },
@@ -75,6 +93,27 @@ module Primer
75
93
  header.with_breadcrumbs(breadcrumb_items)
76
94
  end
77
95
  end
96
+
97
+ # @label With parent link (on narrow)
98
+ # **Parent link** is only shown on **narrow screens** by default.
99
+ # If you want to override that behaviour please use the system_argument: **display**
100
+ # e.g. **component.with\_parent\_link(display: [:block, :block])**
101
+ #
102
+ def parent_link
103
+ render(Primer::OpenProject::PageHeader.new) do |header|
104
+ header.with_title { "A title" }
105
+ header.with_parent_link(href: "test") { "Parent link" }
106
+ end
107
+ end
108
+
109
+ # @label With context bar actions (on narrow)
110
+ # **Context bar actions** are only shown on **narrow screens** by default.
111
+ # If you want to override that behaviour please use the system_argument: **display**
112
+ # e.g. **component.with\_context\_bar\_actions(display: [:block, :block])**
113
+ #
114
+ def context_bar_actions
115
+ render_with_template(locals: {})
116
+ end
78
117
  end
79
118
  end
80
119
  end
data/static/classes.json CHANGED
@@ -441,9 +441,18 @@
441
441
  "PageHeader-breadcrumbs": [
442
442
  "Primer::OpenProject::PageHeader"
443
443
  ],
444
+ "PageHeader-contextBar": [
445
+ "Primer::OpenProject::PageHeader"
446
+ ],
447
+ "PageHeader-contextBarActions": [
448
+ "Primer::OpenProject::PageHeader"
449
+ ],
444
450
  "PageHeader-description": [
445
451
  "Primer::OpenProject::PageHeader"
446
452
  ],
453
+ "PageHeader-parentLink": [
454
+ "Primer::OpenProject::PageHeader"
455
+ ],
447
456
  "PageHeader-title": [
448
457
  "Primer::OpenProject::PageHeader"
449
458
  ],
@@ -1370,9 +1370,25 @@
1370
1370
  "medium",
1371
1371
  "large"
1372
1372
  ],
1373
+ "DEFAULT_BACK_BUTTON_DISPLAY": [
1374
+ "none",
1375
+ "flex"
1376
+ ],
1373
1377
  "DEFAULT_BACK_BUTTON_ICON": "arrow-left",
1374
1378
  "DEFAULT_BACK_BUTTON_SIZE": "medium",
1379
+ "DEFAULT_BREADCRUMBS_DISPLAY": [
1380
+ "none",
1381
+ "flex"
1382
+ ],
1383
+ "DEFAULT_CONTEXT_BAR_ACTIONS_DISPLAY": [
1384
+ "block",
1385
+ "none"
1386
+ ],
1375
1387
  "DEFAULT_HEADER_VARIANT": "medium",
1388
+ "DEFAULT_PARENT_LINK_DISPLAY": [
1389
+ "block",
1390
+ "none"
1391
+ ],
1376
1392
  "HEADER_VARIANT_OPTIONS": [
1377
1393
  "large",
1378
1394
  "medium"
@@ -15473,9 +15473,21 @@
15473
15473
  }
15474
15474
  ]
15475
15475
  },
15476
+ {
15477
+ "name": "context_bar_actions",
15478
+ "description": "Context Bar Actions\nBy default shown on narrow screens. Can be overridden with system_argument: display",
15479
+ "parameters": [
15480
+ {
15481
+ "name": "system_arguments",
15482
+ "type": "Hash",
15483
+ "default": "N/A",
15484
+ "description": "{{link_to_system_arguments_docs}}"
15485
+ }
15486
+ ]
15487
+ },
15476
15488
  {
15477
15489
  "name": "back_button",
15478
- "description": "Optional back button prepend the title",
15490
+ "description": "Optional back button prepend the title\nBy default shown on wider screens. Can be overridden with system_argument: display",
15479
15491
  "parameters": [
15480
15492
  {
15481
15493
  "name": "size",
@@ -15497,9 +15509,21 @@
15497
15509
  }
15498
15510
  ]
15499
15511
  },
15512
+ {
15513
+ "name": "parent_link",
15514
+ "description": "Optional parent link in the context area\nBy default shown on narrow screens. Can be overridden with system_argument: display",
15515
+ "parameters": [
15516
+ {
15517
+ "name": "system_arguments",
15518
+ "type": "Hash",
15519
+ "default": "N/A",
15520
+ "description": "{{link_to_system_arguments_docs}}"
15521
+ }
15522
+ ]
15523
+ },
15500
15524
  {
15501
15525
  "name": "breadcrumbs",
15502
- "description": "Optional breadcrumbs above the title row",
15526
+ "description": "Optional breadcrumbs above the title row\nBy default shown on wider screens. Can be overridden with system_argument: display",
15503
15527
  "parameters": [
15504
15528
  {
15505
15529
  "name": "items",
@@ -15610,6 +15634,32 @@
15610
15634
  "color-contrast"
15611
15635
  ]
15612
15636
  }
15637
+ },
15638
+ {
15639
+ "preview_path": "primer/open_project/page_header/parent_link",
15640
+ "name": "parent_link",
15641
+ "snapshot": "false",
15642
+ "skip_rules": {
15643
+ "wont_fix": [
15644
+ "region"
15645
+ ],
15646
+ "will_fix": [
15647
+ "color-contrast"
15648
+ ]
15649
+ }
15650
+ },
15651
+ {
15652
+ "preview_path": "primer/open_project/page_header/context_bar_actions",
15653
+ "name": "context_bar_actions",
15654
+ "snapshot": "false",
15655
+ "skip_rules": {
15656
+ "wont_fix": [
15657
+ "region"
15658
+ ],
15659
+ "will_fix": [
15660
+ "color-contrast"
15661
+ ]
15662
+ }
15613
15663
  }
15614
15664
  ],
15615
15665
  "subcomponents": [
data/static/previews.json CHANGED
@@ -4781,6 +4781,32 @@
4781
4781
  "color-contrast"
4782
4782
  ]
4783
4783
  }
4784
+ },
4785
+ {
4786
+ "preview_path": "primer/open_project/page_header/parent_link",
4787
+ "name": "parent_link",
4788
+ "snapshot": "false",
4789
+ "skip_rules": {
4790
+ "wont_fix": [
4791
+ "region"
4792
+ ],
4793
+ "will_fix": [
4794
+ "color-contrast"
4795
+ ]
4796
+ }
4797
+ },
4798
+ {
4799
+ "preview_path": "primer/open_project/page_header/context_bar_actions",
4800
+ "name": "context_bar_actions",
4801
+ "snapshot": "false",
4802
+ "skip_rules": {
4803
+ "wont_fix": [
4804
+ "region"
4805
+ ],
4806
+ "will_fix": [
4807
+ "color-contrast"
4808
+ ]
4809
+ }
4784
4810
  }
4785
4811
  ]
4786
4812
  },
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openproject-primer_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-11-16 00:00:00.000000000 Z
12
+ date: 2023-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionview
@@ -852,6 +852,8 @@ files:
852
852
  - previews/primer/open_project/grid_layout_preview.rb
853
853
  - previews/primer/open_project/page_header_preview.rb
854
854
  - previews/primer/open_project/page_header_preview/actions.html.erb
855
+ - previews/primer/open_project/page_header_preview/context_bar_actions.html.erb
856
+ - previews/primer/open_project/page_header_preview/playground.html.erb
855
857
  - previews/primer/url_helpers.rb
856
858
  - static/arguments.json
857
859
  - static/assets/view-components.svg