Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Display currently selected filter option

Aaron Contreras310b840aac54
diff --git a/app/components/work_packages/share/modal_body_component.html.erb b/app/components/work_packages/share/modal_body_component.html.erb
index 0ce0b33c7a3..91d2a4c4003 100644
--- a/app/components/work_packages/share/modal_body_component.html.erb
+++ b/app/components/work_packages/share/modal_body_component.html.erb
@@ -38,9 +38,10 @@
header_actions.with_column(mr: 2) do
render(Primer::Alpha::ActionMenu.new(anchor_align: :end,
select_variant: :single,
+ dynamic_label: true,
color: :muted,
data: { 'test-selector': 'op-share-wp-filter-type' })) do |menu|
- menu.with_show_button(scheme: :invisible, color: :muted) do |button|
+ menu.with_show_button(scheme: :invisible, color: :muted, data: { 'test-selector': 'op-share-wp-filter-type-button' }) do |button|
button.with_trailing_action_icon(icon: "triangle-down")
I18n.t('work_package.sharing.filter.type')
end
@@ -58,9 +59,10 @@
header_actions.with_column do
render(Primer::Alpha::ActionMenu.new(anchor_align: :end,
select_variant: :single,
+ dynamic_label: true,
color: :muted,
data: { 'test-selector': 'op-share-wp-filter-role' })) do |menu|
- menu.with_show_button(scheme: :invisible, color: :muted) do |button|
+ menu.with_show_button(scheme: :invisible, color: :muted, data: { 'test-selector': 'op-share-wp-filter-role-button' }) do |button|
button.with_trailing_action_icon(icon: "triangle-down")
I18n.t('work_package.sharing.filter.role')
end