openproject-primer_view_components 0.51.0 → 0.52.0
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/feedback_dialog.html.erb +2 -2
- data/app/components/primer/open_project/feedback_dialog.rb +3 -3
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/open_project/danger_confirmation_dialog_preview/playground.html.erb +1 -1
- data/previews/primer/open_project/feedback_dialog_preview/playground.html.erb +3 -3
- data/previews/primer/open_project/feedback_dialog_preview/{additional_content.html.erb → with_additional_details.html.erb} +1 -1
- data/previews/primer/open_project/feedback_dialog_preview.rb +6 -6
- data/static/info_arch.json +6 -6
- data/static/previews.json +4 -4
- metadata +4 -4
- /data/previews/primer/open_project/feedback_dialog_preview/{custom_footer.html.erb → with_custom_footer.html.erb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd140b594a3320327597c717407335fcb2a75d74160f81635780fe093f32a6db
|
4
|
+
data.tar.gz: a3d6b3886f9900157721df6a670b305360387f9969753a9f790605caa5c1faa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24f9cb45a17f8e132c3eb41117a2a0300dff084738285eef44818b57b5da876472030691fcafe463e5c77a1050c21fb39a79df2e7107b5ab7a6f95872c8df0e6
|
7
|
+
data.tar.gz: 3887155c4ef530bf37c7aa5c5dc30ef87dfb14002939d427a761b16c6e8e676cf52168de0f263972ba39cb71fd03105b7252cd1f2134c2980d630af4fb2a003a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.52.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#219](https://github.com/opf/primer_view_components/pull/219) [`e3a93b7`](https://github.com/opf/primer_view_components/commit/e3a93b72299395d039758b1fda8ec78d51687127) Thanks [@myabc](https://github.com/myabc)! - [#60359] Harmonise FeedbackDialog slot naming: renames the `additional_content` slot to `additional_details` to make Feedback Dialog consistent with the newly introduced Danger Confirmation Dialog.
|
8
|
+
|
3
9
|
## 0.51.0
|
4
10
|
|
5
11
|
### Minor Changes
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<%= render @dialog do |dialog| %>
|
2
2
|
<% dialog.with_body do %>
|
3
3
|
<%= feedback_message %>
|
4
|
-
<% if
|
5
|
-
<%=
|
4
|
+
<% if additional_details.present? %>
|
5
|
+
<%= additional_details %>
|
6
6
|
<% end %>
|
7
7
|
<% end %>
|
8
8
|
<% dialog.with_footer do %>
|
@@ -17,15 +17,15 @@ module Primer
|
|
17
17
|
Primer::OpenProject::FeedbackMessage.new(icon_arguments: icon_arguments, **system_arguments)
|
18
18
|
}
|
19
19
|
|
20
|
-
# Optional
|
20
|
+
# Optional additional_details like a form input or toast.
|
21
21
|
#
|
22
22
|
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
23
|
-
renders_one :
|
23
|
+
renders_one :additional_details, lambda { |**system_arguments|
|
24
24
|
deny_tag_argument(**system_arguments)
|
25
25
|
system_arguments[:tag] = :div
|
26
26
|
system_arguments[:classes] = class_names(
|
27
27
|
system_arguments[:classes],
|
28
|
-
"FeedbackDialog-
|
28
|
+
"FeedbackDialog-additionalDetails"
|
29
29
|
)
|
30
30
|
|
31
31
|
system_arguments[:display] ||= :flex
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<% end %>
|
7
7
|
<% if show_additional_details %>
|
8
8
|
<% dialog.with_additional_details do %>
|
9
|
-
<%= render(Primer::Alpha::Banner.new) { "Some additional
|
9
|
+
<%= render(Primer::Alpha::Banner.new) { "Some additional details below" } %>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
<% dialog.with_confirmation_check_box_content(check_box_text) %>
|
@@ -4,9 +4,9 @@
|
|
4
4
|
<% message.with_heading(tag: :h2).with_content("Awesome!") %>
|
5
5
|
<% message.with_description { "Great! Everything worked well." } if show_description %>
|
6
6
|
<% end %>
|
7
|
-
<% if
|
8
|
-
<% dialog.
|
9
|
-
<%= render(Primer::Alpha::Banner.new) { "Some additional
|
7
|
+
<% if show_additional_details %>
|
8
|
+
<% dialog.with_additional_details(display: :inline) do %>
|
9
|
+
<%= render(Primer::Alpha::Banner.new) { "Some additional details below" } %>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
12
12
|
<% if custom_footer %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% dialog.with_feedback_message do |message| %>
|
4
4
|
<% message.with_heading(tag: :h2).with_content("Action successful") %>
|
5
5
|
<% end %>
|
6
|
-
<% dialog.
|
6
|
+
<% dialog.with_additional_details do %>
|
7
7
|
<% render(Primer::Beta::Text.new) { "You can render whatever component you want here." } %>
|
8
8
|
<% end %>
|
9
9
|
<% end %>
|
@@ -24,19 +24,19 @@ module Primer
|
|
24
24
|
# @param icon_color [Symbol] select [default, muted, subtle, accent, success, attention, severe, danger, open, closed, done, sponsors, on_emphasis, inherit]
|
25
25
|
# @param loading_state [Boolean] toggle
|
26
26
|
# @param show_description toggle
|
27
|
-
# @param
|
27
|
+
# @param show_additional_details toggle
|
28
28
|
# @param custom_footer toggle
|
29
|
-
def playground(icon: :"check-circle", icon_color: :success, loading_state: false, show_description: true,
|
29
|
+
def playground(icon: :"check-circle", icon_color: :success, loading_state: false, show_description: true, show_additional_details: false, custom_footer: false)
|
30
30
|
render_with_template(locals: { icon: icon,
|
31
31
|
icon_color: icon_color,
|
32
32
|
loading_state: loading_state,
|
33
33
|
show_description: show_description,
|
34
|
-
|
34
|
+
show_additional_details: show_additional_details,
|
35
35
|
custom_footer: custom_footer })
|
36
36
|
end
|
37
37
|
|
38
|
-
# @label With additional
|
39
|
-
def
|
38
|
+
# @label With additional details
|
39
|
+
def with_additional_details
|
40
40
|
render_with_template(locals: {})
|
41
41
|
end
|
42
42
|
|
@@ -52,7 +52,7 @@ module Primer
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# @label With custom footer
|
55
|
-
def
|
55
|
+
def with_custom_footer
|
56
56
|
render_with_template(locals: {})
|
57
57
|
end
|
58
58
|
|
data/static/info_arch.json
CHANGED
@@ -17497,8 +17497,8 @@
|
|
17497
17497
|
]
|
17498
17498
|
},
|
17499
17499
|
{
|
17500
|
-
"name": "
|
17501
|
-
"description": "Optional
|
17500
|
+
"name": "additional_details",
|
17501
|
+
"description": "Optional additional_details like a form input or toast.",
|
17502
17502
|
"parameters": [
|
17503
17503
|
{
|
17504
17504
|
"name": "system_arguments",
|
@@ -17547,8 +17547,8 @@
|
|
17547
17547
|
}
|
17548
17548
|
},
|
17549
17549
|
{
|
17550
|
-
"preview_path": "primer/open_project/feedback_dialog/
|
17551
|
-
"name": "
|
17550
|
+
"preview_path": "primer/open_project/feedback_dialog/with_additional_details",
|
17551
|
+
"name": "with_additional_details",
|
17552
17552
|
"snapshot": "false",
|
17553
17553
|
"skip_rules": {
|
17554
17554
|
"wont_fix": [
|
@@ -17573,8 +17573,8 @@
|
|
17573
17573
|
}
|
17574
17574
|
},
|
17575
17575
|
{
|
17576
|
-
"preview_path": "primer/open_project/feedback_dialog/
|
17577
|
-
"name": "
|
17576
|
+
"preview_path": "primer/open_project/feedback_dialog/with_custom_footer",
|
17577
|
+
"name": "with_custom_footer",
|
17578
17578
|
"snapshot": "false",
|
17579
17579
|
"skip_rules": {
|
17580
17580
|
"wont_fix": [
|
data/static/previews.json
CHANGED
@@ -3680,8 +3680,8 @@
|
|
3680
3680
|
}
|
3681
3681
|
},
|
3682
3682
|
{
|
3683
|
-
"preview_path": "primer/open_project/feedback_dialog/
|
3684
|
-
"name": "
|
3683
|
+
"preview_path": "primer/open_project/feedback_dialog/with_additional_details",
|
3684
|
+
"name": "with_additional_details",
|
3685
3685
|
"snapshot": "false",
|
3686
3686
|
"skip_rules": {
|
3687
3687
|
"wont_fix": [
|
@@ -3706,8 +3706,8 @@
|
|
3706
3706
|
}
|
3707
3707
|
},
|
3708
3708
|
{
|
3709
|
-
"preview_path": "primer/open_project/feedback_dialog/
|
3710
|
-
"name": "
|
3709
|
+
"preview_path": "primer/open_project/feedback_dialog/with_custom_footer",
|
3710
|
+
"name": "with_custom_footer",
|
3711
3711
|
"snapshot": "false",
|
3712
3712
|
"skip_rules": {
|
3713
3713
|
"wont_fix": [
|
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.
|
4
|
+
version: 0.52.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:
|
12
|
+
date: 2025-01-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|
@@ -1034,9 +1034,9 @@ files:
|
|
1034
1034
|
- previews/primer/open_project/danger_confirmation_dialog_preview/with_form_builder_form.html.erb
|
1035
1035
|
- previews/primer/open_project/drag_handle_preview.rb
|
1036
1036
|
- previews/primer/open_project/feedback_dialog_preview.rb
|
1037
|
-
- previews/primer/open_project/feedback_dialog_preview/additional_content.html.erb
|
1038
|
-
- previews/primer/open_project/feedback_dialog_preview/custom_footer.html.erb
|
1039
1037
|
- previews/primer/open_project/feedback_dialog_preview/playground.html.erb
|
1038
|
+
- previews/primer/open_project/feedback_dialog_preview/with_additional_details.html.erb
|
1039
|
+
- previews/primer/open_project/feedback_dialog_preview/with_custom_footer.html.erb
|
1040
1040
|
- previews/primer/open_project/feedback_message_preview.rb
|
1041
1041
|
- previews/primer/open_project/flex_layout_preview.rb
|
1042
1042
|
- previews/primer/open_project/grid_layout_preview.rb
|
File without changes
|