File tree Expand file tree Collapse file tree 9 files changed +39
-29
lines changed
app/components/work_package_relations_tab
spec/support/components/work_packages Expand file tree Collapse file tree 9 files changed +39
-29
lines changed Original file line number Diff line number Diff line change 417
417
418
418
gem "openproject-octicons" , "~>19.25.0"
419
419
gem "openproject-octicons_helper" , "~>19.25.0"
420
- gem "openproject-primer_view_components" , "~>0.68.0 "
420
+ gem "openproject-primer_view_components" , "~>0.69.1 "
Original file line number Diff line number Diff line change 856
856
actionview
857
857
openproject-octicons (= 19.25.0 )
858
858
railties
859
- openproject-primer_view_components (0.68.0 )
859
+ openproject-primer_view_components (0.69.1 )
860
860
actionview (>= 7.1.0 )
861
861
activesupport (>= 7.1.0 )
862
862
openproject-octicons (>= 19.25.0 )
@@ -1445,7 +1445,7 @@ DEPENDENCIES
1445
1445
openproject-octicons (~> 19.25.0 )
1446
1446
openproject-octicons_helper (~> 19.25.0 )
1447
1447
openproject-openid_connect !
1448
- openproject-primer_view_components (~> 0.68.0 )
1448
+ openproject-primer_view_components (~> 0.69.1 )
1449
1449
openproject-recaptcha !
1450
1450
openproject-reporting !
1451
1451
openproject-storages !
@@ -1817,7 +1817,7 @@ CHECKSUMS
1817
1817
openproject-octicons (19.25.0) sha256=16fc221375e693f0e893b1c208286f2d7719ae4dfe080c5415642b221f51f550
1818
1818
openproject-octicons_helper (19.25.0) sha256=9b1778a67b0015ebe84ca0471f74e31004b985a8dcaaa443f7a2ac365b0a4e2d
1819
1819
openproject-openid_connect (1.0.0)
1820
- openproject-primer_view_components (0.68.0 ) sha256=847cc5e0e2933e3c34f6106c6bb6b68d4563ef649401a59e794660b4aa50c47f
1820
+ openproject-primer_view_components (0.69.1 ) sha256=34f127506d86e30cd8ce2bad74071d18aa22f0fe7935876bf5363e032084228a
1821
1821
openproject-recaptcha (1.0.0)
1822
1822
openproject-reporting (1.0.0)
1823
1823
openproject-storages (1.0.0)
Original file line number Diff line number Diff line change 22
22
t(:label_relation)
23
23
end
24
24
25
- render_add_relations_menu_items(menu, ADD_RELATION_MENU_TYPES)
25
+ render_add_relations_menu_items(menu, FIRST_LEVEL_RELATION_MENU_TYPES)
26
+ menu.with_sub_menu_item(
27
+ label: t("#{I18N_NAMESPACE}.relations.label_other_relations"),
28
+ menu_id: ADD_RELATION_SUB_MENU
29
+ ) do |sub_menu|
30
+ render_add_relations_menu_items(sub_menu, SECOND_LEVEL_RELATION_MENU_TYPES)
31
+ end
26
32
end
27
33
end
28
34
end
Original file line number Diff line number Diff line change 9
9
class WorkPackageRelationsTab ::IndexComponent < ApplicationComponent
10
10
FRAME_ID = "work-package-relations-tab-content"
11
11
ADD_RELATION_ACTION_MENU = "add-relation-action-menu"
12
+ ADD_RELATION_SUB_MENU = "add-relation-sub-menu"
12
13
ADD_CHILD_ACTION_MENU = "add-child-action-menu"
13
14
I18N_NAMESPACE = "work_package_relations_tab"
14
15
@@ -17,20 +18,23 @@ class WorkPackageRelationsTab::IndexComponent < ApplicationComponent
17
18
Relation ::TYPE_CHILD
18
19
] . freeze
19
20
20
- ADD_RELATION_MENU_TYPES = [
21
+ FIRST_LEVEL_RELATION_MENU_TYPES = [
21
22
*ADD_CHILD_MENU_TYPES ,
22
- Relation ::TYPE_RELATES ,
23
23
Relation ::TYPE_FOLLOWS ,
24
24
Relation ::TYPE_PRECEDES ,
25
25
Relation ::TYPE_PARENT ,
26
- Relation ::TYPE_DUPLICATES ,
27
- Relation ::TYPE_DUPLICATED ,
26
+ Relation ::TYPE_RELATES
27
+ ] . freeze
28
+
29
+ SECOND_LEVEL_RELATION_MENU_TYPES = [
28
30
Relation ::TYPE_BLOCKS ,
29
31
Relation ::TYPE_BLOCKED ,
30
32
Relation ::TYPE_INCLUDES ,
31
33
Relation ::TYPE_PARTOF ,
32
34
Relation ::TYPE_REQUIRES ,
33
- Relation ::TYPE_REQUIRED
35
+ Relation ::TYPE_REQUIRED ,
36
+ Relation ::TYPE_DUPLICATES ,
37
+ Relation ::TYPE_DUPLICATED
34
38
] . freeze
35
39
36
40
include ApplicationHelper
Original file line number Diff line number Diff line change 1
1
// We reference an ID as one is required to be specified for the action menu list.
2
2
// It can't be nested inside the BEM model as it's placed as a #top-layer element.
3
3
#add-relation-action-menu-list ,
4
+ #add-relation-sub-menu-list ,
4
5
#add-child-action-menu-list
5
6
max-height : 510px
6
7
max-width : 280px
Original file line number Diff line number Diff line change 888
888
889
889
label_parent_singular : " parent"
890
890
label_parent_plural : " parent"
891
+ label_other_relations : " Other relations"
891
892
ghost_relation_title : " Related work package"
892
893
ghost_relation_description : " This is not visible to you due to permissions."
893
894
Original file line number Diff line number Diff line change 102
102
"@ngneat/content-loader" : " ^7.0.0" ,
103
103
"@ngx-formly/core" : " ^6.1.4" ,
104
104
"@openproject/octicons-angular" : " ^19.25.0" ,
105
- "@openproject/primer-view-components" : " ^0.68.0 " ,
105
+ "@openproject/primer-view-components" : " ^0.69.1 " ,
106
106
"@openproject/reactivestates" : " ^3.0.1" ,
107
107
"@primer/css" : " ^21.5.0" ,
108
108
"@primer/live-region-element" : " ^0.8.0" ,
109
109
"@primer/primitives" : " ^9.1.2" ,
110
- "@primer/view-components" : " npm:@openproject/primer-view-components@^0.68.0 " ,
110
+ "@primer/view-components" : " npm:@openproject/primer-view-components@^0.69.1 " ,
111
111
"@types/hotwired__turbo" : " ^8.0.1" ,
112
112
"@uirouter/angular" : " ^13.0.0" ,
113
113
"@uirouter/core" : " ^6.1.0" ,
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def add_relation_action_menu
128
128
end
129
129
130
130
def new_relation_button
131
- page . find_test_selector ( "add-relation-action-menu" ) . find_button
131
+ page . find_test_selector ( "add-relation-action-menu" ) . find_button ( id : "add-relation-action-menu-button" )
132
132
end
133
133
134
134
def remove_relation ( relatable )
You can’t perform that action at this time.
0 commit comments