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

Restrict child action menu in the same way as relation one

Oliver Günther93e117e8228d
diff --git a/app/components/work_package_relations_tab/index_component.rb b/app/components/work_package_relations_tab/index_component.rb
index f2926ef8193..cbf0e528134 100644
--- a/app/components/work_package_relations_tab/index_component.rb
+++ b/app/components/work_package_relations_tab/index_component.rb
@@ -9,6 +9,7 @@
class WorkPackageRelationsTab::IndexComponent < ApplicationComponent
FRAME_ID = "work-package-relations-tab-content"
NEW_RELATION_ACTION_MENU = "new-relation-action-menu"
+ NEW_CHILD_ACTION_MENU = "new-child-action-menu"
I18N_NAMESPACE = "work_package_relations_tab"
include ApplicationHelper
include OpPrimer::ComponentHelpers
@@ -91,7 +92,7 @@ class WorkPackageRelationsTab::IndexComponent < ApplicationComponent
concat render(Primer::Beta::Counter.new(count: items.size, round: true, scheme: :primary))
end
header.with_column do
- render(Primer::Alpha::ActionMenu.new(menu_id: "new-child-relation")) do |menu|
+ render(Primer::Alpha::ActionMenu.new(menu_id: NEW_CHILD_ACTION_MENU)) do |menu|
menu.with_show_button do |button|
button.with_leading_visual_icon(icon: :plus)
button.with_trailing_action_icon(icon: :"triangle-down")
diff --git a/app/components/work_package_relations_tab/index_component.sass b/app/components/work_package_relations_tab/index_component.sass
index 32a1e670cce..ae2778fdeb9 100644
--- a/app/components/work_package_relations_tab/index_component.sass
+++ b/app/components/work_package_relations_tab/index_component.sass
@@ -1,5 +1,6 @@
// We reference an ID as one is required to be specified for the action menu list.
// It can't be nested inside the BEM model as it's placed as a #top-layer element.
-#new-relation-action-menu-list
+#new-relation-action-menu-list,
+#new-child-action-menu-list
max-height: 450px
max-width: 280px