Skip to content

Commit a3c8006

Browse files
authored
Merge pull request #284 from opf/bump/primer-upstream
Bump/primer upstream 0.43.0
2 parents 4e6fbd6 + d46afc9 commit a3c8006

28 files changed

Lines changed: 239 additions & 78 deletions

.changeset/hip-cherries-glow.md

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+
Add a new custom label for close button in dialog header
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+
Fix(SelectPanel): incorrect padding when no filter

.changeset/sour-beds-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openproject/primer-view-components': minor
3+
---
4+
5+
Create Primer::CurrentAttributes allowing apps to set request specific context to components. Update IncludeFragment to add data-nonce when a current nonce is present.

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- name: Get specific changed files
1818
id: changed-files
19-
uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3
19+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
2020
with:
2121
files: |
2222
docs/**/*.md
@@ -42,7 +42,7 @@ jobs:
4242
- uses: actions/checkout@v4
4343
- name: Get specific changed files
4444
id: changed-files
45-
uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3
45+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
4646
with:
4747
files: |
4848
app/**/*.rb
@@ -62,7 +62,7 @@ jobs:
6262
- uses: actions/checkout@v4
6363
- name: Get changed files
6464
id: changed-files
65-
uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3
65+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
6666
with:
6767
files: |
6868
app/components/**/*.erb
@@ -79,7 +79,7 @@ jobs:
7979
- uses: actions/checkout@v4
8080
- name: Get changed files
8181
id: changed-files
82-
uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3
82+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
8383
with:
8484
files: |
8585
app/components/**/*.ts
@@ -99,7 +99,7 @@ jobs:
9999
- uses: actions/checkout@v4
100100
- name: Get changed files
101101
id: changed-files
102-
uses: tj-actions/changed-files@6cb76d07bee4c9772c6882c06c37837bf82a04d3
102+
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c
103103
with:
104104
files: |
105105
app/components/**/*.pcss

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ gem "bootsnap", ">= 1.4.2", require: false
3636
gem "lookbook", "~> 2.3.8"
3737
gem "view_component", path: ENV["VIEW_COMPONENT_PATH"] if ENV["VIEW_COMPONENT_PATH"]
3838

39-
gem "kramdown", "~> 2.4"
39+
gem "kramdown", "~> 2.5"
4040
gem "sourcemap", "~> 0.1"
4141

4242
gem "cssbundling-rails", "~> 1.4"

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PATH
44
openproject-primer_view_components (0.63.0)
55
actionview (>= 7.1.0)
66
activesupport (>= 7.1.0)
7-
openproject-octicons (>= 19.23.0)
7+
openproject-octicons (>= 19.25.0)
88
view_component (>= 3.1, < 4.0)
99

1010
GEM
@@ -115,8 +115,8 @@ GEM
115115
rdoc (>= 4.0.0)
116116
reline (>= 0.4.2)
117117
json (2.7.2)
118-
kramdown (2.4.0)
119-
rexml
118+
kramdown (2.5.1)
119+
rexml (>= 3.3.9)
120120
language_server-protocol (3.17.0.3)
121121
listen (3.9.0)
122122
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -153,7 +153,7 @@ GEM
153153
racc (~> 1.4)
154154
nokogiri (1.18.7-x86_64-linux-gnu)
155155
racc (~> 1.4)
156-
openproject-octicons (19.23.0)
156+
openproject-octicons (19.25.0)
157157
parallel (1.26.3)
158158
parser (3.3.5.0)
159159
ast (~> 2.4.1)
@@ -318,7 +318,7 @@ DEPENDENCIES
318318
debug
319319
erb_lint (~> 0.6)
320320
erblint-github (~> 1.0)
321-
kramdown (~> 2.4)
321+
kramdown (~> 2.5)
322322
listen (~> 3.9)
323323
lookbook (~> 2.3.8)
324324
matrix (~> 0.4.2)

app/components/primer/alpha/dialog/header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<% end %>
1414
</div>
1515
<div class="Overlay-actionWrap">
16-
<%= render Primer::Beta::CloseButton.new(classes: "Overlay-closeButton", "data-close-dialog-id": @id) %>
16+
<%= render Primer::Beta::CloseButton.new(classes: "Overlay-closeButton", "data-close-dialog-id": @id, aria: { label: @close_label }) %>
1717
</div>
1818
</div>
1919
<%= filter %>

app/components/primer/alpha/dialog/header.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class Header < Primer::Component
1616
}.freeze
1717
VARIANT_OPTIONS = VARIANT_MAPPINGS.keys
1818

19+
DEFAULT_CLOSE_LABEL = "Close"
20+
1921
# Optional filter slot for adding a filter input to the header.
2022
#
2123
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
@@ -48,6 +50,7 @@ class Header < Primer::Component
4850
# @param show_divider [Boolean] Show a divider between the header and body.
4951
# @param visually_hide_title [Boolean] Visually hide the `title` while maintaining a label for assistive technologies.
5052
# @param variant [Symbol] <%= one_of(Primer::Alpha::Dialog::Header::VARIANT_OPTIONS) %>
53+
# @param close_label [String] The aria-label text of the close "x" button.
5154
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
5255
def initialize(
5356
id:,
@@ -56,12 +59,14 @@ def initialize(
5659
show_divider: false,
5760
visually_hide_title: false,
5861
variant: DEFAULT_VARIANT,
62+
close_label: DEFAULT_CLOSE_LABEL,
5963
**system_arguments
6064
)
6165
@id = id
6266
@title = title
6367
@subtitle = subtitle
6468
@visually_hide_title = visually_hide_title
69+
@close_label = close_label
6570
@system_arguments = deny_tag_argument(**system_arguments)
6671
@system_arguments[:tag] = :div
6772

app/components/primer/alpha/include_fragment.rb

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,27 @@ module Alpha
88
class IncludeFragment < Primer::Component
99
status :alpha
1010

11+
ALLOWED_LOADING_VALUES = [:lazy, :eager].freeze
12+
DEFAULT_LOADING = :eager
13+
1114
# @param src [String] The URL from which to retrieve an HTML element fragment.
1215
# @param loading [Symbol] <%= one_of([:lazy, :eager]) %>
16+
# @param accept [String] What to send as the Accept header.
1317
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
14-
def initialize(src: nil, loading: :eager, **system_arguments)
18+
def initialize(src: nil, loading: nil, accept: nil, **system_arguments)
1519
@system_arguments = system_arguments
1620
@system_arguments[:tag] = "include-fragment"
1721
@system_arguments[:loading] = loading
1822
@system_arguments[:src] = src
23+
@system_arguments[:accept] = accept if accept
24+
25+
if loading
26+
@system_arguments[:loading] = fetch_or_fallback(ALLOWED_LOADING_VALUES, loading.to_sym, DEFAULT_LOADING)
27+
end
28+
29+
if Primer::CurrentAttributes.nonce
30+
@system_arguments[:"data-nonce"] = Primer::CurrentAttributes.nonce
31+
end
1932
end
2033

2134
def call

app/components/primer/alpha/select_panel.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<% end %>
5151
<% end %>
5252
<% end %>
53-
<%= render Primer::Alpha::Dialog::Body.new(mt: show_filter? ? 0 : 2, p: 0) do %>
53+
<%= render Primer::Alpha::Dialog::Body.new(p: 0) do %>
5454
<focus-group direction="vertical" mnemonics retain>
5555
<live-region data-target="select-panel.liveRegion"></live-region>
5656
<%= render(Primer::BaseComponent.new(

0 commit comments

Comments
 (0)