Skip to content

Commit 7c9af7f

Browse files
authored
Merge pull request #21638 from opf/merge-release/17.0-20260112162124
Merge release/17.0 into dev
2 parents 3bfad2c + 8c6676b commit 7c9af7f

File tree

55 files changed

+1062
-270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1062
-270
lines changed

app/components/admin/custom_fields/hierarchy/items_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ See COPYRIGHT and LICENSE files for more details.
5959

6060
component.with_heading(tag: :h3).with_content(I18n.t(blank_header_text))
6161
component.with_description { I18n.t(blank_description_text) }
62-
component.with_primary_action(tag: :a, href: new_item_path) do |button|
62+
component.with_primary_action(href: new_item_path) do |button|
6363
button.with_leading_visual_icon(icon: :plus)
6464
I18n.t(:label_item)
6565
end

app/components/filter/filter_component.html.erb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,18 @@
3434
}
3535
) do %>
3636
<fieldset class="advanced-filters--container">
37-
<a title="<%= t("js.close_form_title") %>"
38-
href=""
39-
class="advanced-filters--close icon-context icon-close"
40-
data-action="filter--filters-form#toggleDisplayFilters"></a>
37+
<%=
38+
render(
39+
Primer::Beta::IconButton.new(
40+
icon: :x,
41+
scheme: :invisible,
42+
classes: "advanced-filters--close",
43+
tooltip_direction: :se,
44+
aria: { label: t("js.close_form_title") },
45+
data: { action: "filter--filters-form#toggleDisplayFilters" }
46+
)
47+
)
48+
%>
4149
<legend><%= t(:label_filter_plural) %></legend>
4250
<ul class="advanced-filters--filters">
4351
<% each_filter do |filter, filter_active, additional_options| %>

app/components/groups/table_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def render_blank_slate
5454
component.with_visual_icon(icon: blank_icon, size: :medium) if blank_icon
5555
component.with_heading(tag: :h2) { blank_title }
5656
component.with_description { blank_description }
57-
component.with_primary_action(label: t(:label_group_new), tag: :a, href: new_group_path) do |button|
57+
component.with_primary_action(label: t(:label_group_new), href: new_group_path) do |button|
5858
button.with_leading_visual_icon(icon: :plus)
5959
t("activerecord.models.group")
6060
end

app/components/individual_principal_base_filter_component.html.erb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,18 @@ See COPYRIGHT and LICENSE files for more details.
3232
<fieldset class="simple-filters--container <%= collapsed_class %>" data-members-form-target="filterContainer">
3333
<legend><%= t(:label_filter_plural) %></legend>
3434
<% if has_close_icon? %>
35-
<a title="<%= t("js.close_form_title") %>"
36-
data-action="members-form#toggleMemberFilter"
37-
class="toggle-member-filter-link simple-filters--close icon-context icon-close">
38-
</a>
35+
<%=
36+
render(
37+
Primer::Beta::IconButton.new(
38+
icon: :x,
39+
scheme: :invisible,
40+
classes: "simple-filters--close",
41+
tooltip_direction: :se,
42+
aria: { label: t("js.close_form_title") },
43+
data: { action: "members-form#toggleMemberFilter" }
44+
)
45+
)
46+
%>
3947
<% end %>
4048
<ul class="simple-filters--filters">
4149
<% if has_statuses? %>

app/components/projects/settings/creation_wizard/blank_slate_component.html.erb

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,12 @@ See COPYRIGHT and LICENSE files for more details.
3333
render(Primer::Beta::Blankslate.new) do |component|
3434
component.with_visual_icon(icon: :"project-template")
3535
component.with_heading(tag: :h2).with_content(title)
36-
component.with_description do
37-
flex_layout do |flex|
38-
flex.with_row(mb: 2) do
39-
render(Primer::Beta::Text.new(color: :subtle)) { description }
40-
end
41-
42-
flex.with_row(mt: 4) do
43-
render(
44-
Primer::Beta::Button.new(
45-
scheme: :primary,
46-
mobile_icon: nil,
47-
mobile_label: label,
48-
aria: { label: },
49-
tag: :a,
50-
href: helpers.toggle_project_settings_creation_wizard_path(@project),
51-
data: { turbo_method: :post }
52-
)
53-
) do
54-
label
55-
end
56-
end
57-
end
36+
component.with_description_content(description)
37+
component.with_primary_action(
38+
href: helpers.toggle_project_settings_creation_wizard_path(@project),
39+
data: { turbo_method: :post }
40+
) do
41+
label
5842
end
5943
end
6044
end

app/components/shares/empty_state_component.html.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,5 @@
33
component.with_heading(tag: :h2).with_content(
44
blankslate_config[:heading_text]
55
)
6-
component.with_description do
7-
flex_layout do |flex|
8-
flex.with_row(mb: 2) do
9-
render(Primer::Beta::Text.new(color: :subtle)) do
10-
blankslate_config[:description_text]
11-
end
12-
end
13-
end
14-
end
6+
component.with_description_content(blankslate_config[:description_text])
157
end %>

app/components/shares/project_queries/empty_state_component.html.erb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,5 @@
33
component.with_heading(tag: :h2).with_content(
44
blankslate_config[:heading_text]
55
)
6-
component.with_description do
7-
flex_layout do |flex|
8-
flex.with_row(mb: 2) do
9-
render(Primer::Beta::Text.new(color: :subtle)) do
10-
blankslate_config[:description_text]
11-
end
12-
end
13-
end
14-
end
6+
component.with_description_content(blankslate_config[:description_text])
157
end %>

app/contracts/work_packages/copy_project_contract.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ class CopyProjectContract < CopyContract
4242
delegate :to_s,
4343
to: :model
4444

45+
def valid?(_context = nil)
46+
# For project copying, we want to preserve the exact state
47+
# even if copied work packages would normally be invalid
48+
true
49+
end
50+
4551
def validate_model? = false
4652

4753
private

app/models/queries/capabilities/filters/context_filter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Queries::Capabilities::Filters::ContextFilter < Queries::Capabilities::Fil
3535

3636
def split_values
3737
values.map do |value|
38-
if (matches = value.match(/\A([gw])(\d*)\z/))
38+
# @deprecated Remove the context `p` for projects for 17.2
39+
if (matches = value.match(/\A([gwp])(\d*)\z/))
3940
{
4041
context_key: matches[1],
4142
context_id: matches[2]

app/models/queries/capabilities/filters/id_filter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Queries::Capabilities::Filters::IdFilter < Queries::Capabilities::Filters:
3535

3636
def split_values
3737
values.map do |value|
38-
if (matches = value.match(/\A(\w+\/\w+)\/([wg])(\d*)-(\d+)\z/))
38+
# @deprecated Remove the context `p` for projects for 17.2
39+
if (matches = value.match(/\A(\w+\/\w+)\/([gwp])(\d*)-(\d+)\z/))
3940
{
4041
action: matches[1],
4142
context_key: matches[2],

0 commit comments

Comments
 (0)