openproject-primer_view_components 0.70.2 → 0.70.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/components/primer/open_project/page_header.rb +8 -3
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/open_project/page_header_preview.rb +10 -0
- data/static/info_arch.json +13 -0
- data/static/previews.json +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a785d163158f587ca90f435db4af5848928b4dac863a8762c8cf773cd617c53
|
4
|
+
data.tar.gz: 6a2d170f3f502a607aefa119c1159184d67ee1ee6ef77ef675224ac45616ea6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c4b40a3921d2c3ec2968d6e46a232d15ad7533e6e7520390ae366d2351141235c4ac3b6bbe8d942a960f73c117f0327328aa4fd0b72f7b48dbb1cfad7ee237
|
7
|
+
data.tar.gz: 839e929ef1c3fe84220ad042336bdf7a65cab4d68f6ad8c91617bf9cfcaf065d32e20daaa270201e9e023b820e8fa5a17fa6a63438d7454f7c5adbf060ae1ad5
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.70.3
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#337](https://github.com/opf/primer_view_components/pull/337) [`afd57b3`](https://github.com/opf/primer_view_components/commit/afd57b356d0e75d046bbf8cbb7ae3fef13841c98) Thanks [@HDinger](https://github.com/HDinger)! - Add the option to skip breadcrumb items for mobile
|
8
|
+
|
3
9
|
## 0.70.2
|
4
10
|
|
5
11
|
### Patch Changes
|
@@ -186,11 +186,16 @@ module Primer
|
|
186
186
|
system_arguments[:classes] = class_names(system_arguments[:classes], "PageHeader-breadcrumbs")
|
187
187
|
system_arguments[:display] ||= DEFAULT_BREADCRUMBS_DISPLAY
|
188
188
|
|
189
|
+
parent_item = nil
|
190
|
+
|
189
191
|
# show parent link if there is a parent for current page
|
190
|
-
|
191
|
-
|
192
|
-
|
192
|
+
items.reverse_each do |item|
|
193
|
+
parent_item = item if item.is_a?(Hash) && item[:skip_for_mobile] != true
|
194
|
+
break if parent_item.present?
|
195
|
+
end
|
193
196
|
|
197
|
+
if parent_item.present? && parent_item[:href].present?
|
198
|
+
link_arguments = {}
|
194
199
|
link_arguments[:icon] = fetch_or_fallback(BACK_BUTTON_ICON_OPTIONS, DEFAULT_BACK_BUTTON_ICON)
|
195
200
|
link_arguments[:href] = parent_item[:href]
|
196
201
|
link_arguments[:target] = "_top"
|
@@ -256,6 +256,16 @@ module Primer
|
|
256
256
|
end
|
257
257
|
end
|
258
258
|
end
|
259
|
+
|
260
|
+
# @label With skipable breadcrumb items
|
261
|
+
def skip_breadcrumb_item
|
262
|
+
render(Primer::OpenProject::PageHeader.new) do |component|
|
263
|
+
component.with_title { "Resize me to mobile screen size" }
|
264
|
+
component.with_breadcrumbs([{ href: "/foo", text: "Foo" },
|
265
|
+
{ href: "/bar", text: "Bar", skip_for_mobile: true },
|
266
|
+
"Baz"])
|
267
|
+
end
|
268
|
+
end
|
259
269
|
end
|
260
270
|
end
|
261
271
|
end
|
data/static/info_arch.json
CHANGED
@@ -19122,6 +19122,19 @@
|
|
19122
19122
|
"color-contrast"
|
19123
19123
|
]
|
19124
19124
|
}
|
19125
|
+
},
|
19126
|
+
{
|
19127
|
+
"preview_path": "primer/open_project/page_header/skip_breadcrumb_item",
|
19128
|
+
"name": "skip_breadcrumb_item",
|
19129
|
+
"snapshot": "false",
|
19130
|
+
"skip_rules": {
|
19131
|
+
"wont_fix": [
|
19132
|
+
"region"
|
19133
|
+
],
|
19134
|
+
"will_fix": [
|
19135
|
+
"color-contrast"
|
19136
|
+
]
|
19137
|
+
}
|
19125
19138
|
}
|
19126
19139
|
],
|
19127
19140
|
"subcomponents": []
|
data/static/previews.json
CHANGED
@@ -6109,6 +6109,19 @@
|
|
6109
6109
|
"color-contrast"
|
6110
6110
|
]
|
6111
6111
|
}
|
6112
|
+
},
|
6113
|
+
{
|
6114
|
+
"preview_path": "primer/open_project/page_header/skip_breadcrumb_item",
|
6115
|
+
"name": "skip_breadcrumb_item",
|
6116
|
+
"snapshot": "false",
|
6117
|
+
"skip_rules": {
|
6118
|
+
"wont_fix": [
|
6119
|
+
"region"
|
6120
|
+
],
|
6121
|
+
"will_fix": [
|
6122
|
+
"color-contrast"
|
6123
|
+
]
|
6124
|
+
}
|
6112
6125
|
}
|
6113
6126
|
]
|
6114
6127
|
},
|
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.70.
|
4
|
+
version: 0.70.3
|
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: 2025-
|
12
|
+
date: 2025-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|