From 45a8f95a40dd03b8519d043d72c38061a4da53b9 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 8 May 2024 00:59:07 +0200 Subject: [PATCH 1/4] FIX: uses the new component --- .discourse-compatibility | 1 + .../discourse/components/assigned-to-post.gjs | 41 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.discourse-compatibility b/.discourse-compatibility index 78499760..583b91d8 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,3 +1,4 @@ +< 3.3.0.beta2-dev: b796ae3fcc89b48cf777de5ee3a4c21aada9271e < 3.3.0.beta1-dev: 56b0de3896361b6a87523537c8f5b450d2fe0807 3.2.0: 33c43ca51ac7b7baa8a309a269dcf8685b8bd638 < 3.2.0.beta2-dev: ac930c509e2a5b0c37b84bcea28d332e686add95 diff --git a/assets/javascripts/discourse/components/assigned-to-post.gjs b/assets/javascripts/discourse/components/assigned-to-post.gjs index b0ad44b2..f8094c5a 100644 --- a/assets/javascripts/discourse/components/assigned-to-post.gjs +++ b/assets/javascripts/discourse/components/assigned-to-post.gjs @@ -2,6 +2,7 @@ import Component from "@glimmer/component"; import { action } from "@ember/object"; import { inject as service } from "@ember/service"; import DButton from "discourse/components/d-button"; +import DropdownMenu from "discourse/components/dropdown-menu"; import icon from "discourse-common/helpers/d-icon"; import i18n from "discourse-common/helpers/i18n"; import DMenu from "float-kit/components/d-menu"; @@ -38,27 +39,25 @@ export default class AssignedToPost extends Component { {{/if}} - - + + + + + + + + + } From cd96c58a762a6e4e8db1779ad5a371f7389e5f7e Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 8 May 2024 01:03:06 +0200 Subject: [PATCH 2/4] uses btn-transparent --- assets/javascripts/discourse/components/assigned-to-post.gjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/components/assigned-to-post.gjs b/assets/javascripts/discourse/components/assigned-to-post.gjs index f8094c5a..837578f3 100644 --- a/assets/javascripts/discourse/components/assigned-to-post.gjs +++ b/assets/javascripts/discourse/components/assigned-to-post.gjs @@ -46,7 +46,7 @@ export default class AssignedToPost extends Component { @action={{this.unassign}} @icon="user-plus" @label="discourse_assign.unassign.title" - class="popup-menu-btn" + class="btn-transparent" /> From 939770683c515e22508b6bf917f591676ba715fc Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 8 May 2024 02:46:09 +0200 Subject: [PATCH 3/4] spec --- .../discourse/initializers/extend-for-assigns.js | 2 ++ spec/system/page_objects/components/topic_list_header.rb | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse/initializers/extend-for-assigns.js b/assets/javascripts/discourse/initializers/extend-for-assigns.js index 8829885d..179aad03 100644 --- a/assets/javascripts/discourse/initializers/extend-for-assigns.js +++ b/assets/javascripts/discourse/initializers/extend-for-assigns.js @@ -819,6 +819,7 @@ export default { : BulkAssign; api.addBulkActionButton({ + id: "assign-topics", label: "topics.bulk.assign", icon: "user-plus", class: "btn-default assign-topics", @@ -829,6 +830,7 @@ export default { }); api.addBulkActionButton({ + id: "unassign-topics", label: "topics.bulk.unassign", icon: "user-times", class: "btn-default unassign-topics", diff --git a/spec/system/page_objects/components/topic_list_header.rb b/spec/system/page_objects/components/topic_list_header.rb index bf6734d2..13f6c288 100644 --- a/spec/system/page_objects/components/topic_list_header.rb +++ b/spec/system/page_objects/components/topic_list_header.rb @@ -4,19 +4,20 @@ module PageObjects module Components class TopicListHeader < PageObjects::Components::Base def has_assign_topics_button? - page.has_css?(bulk_select_dropdown_item("topics.bulk.assign")) + page.has_css?(bulk_select_dropdown_item("assign-topics")) end def click_assign_topics_button - find(bulk_select_dropdown_item("topics.bulk.assign")).click + p bulk_select_dropdown_item("assign-topics") + find(bulk_select_dropdown_item("assign-topics")).click end def has_unassign_topics_button? - page.has_css?(bulk_select_dropdown_item("topics.bulk.unassign")) + page.has_css?(bulk_select_dropdown_item("unassign-topics")) end def click_unassign_topics_button - find(bulk_select_dropdown_item("topics.bulk.unassign")).click + find(bulk_select_dropdown_item("unassign-topics")).click end end end From 93ae4ce3166f95815b4fe4202c0bddc1d821d468 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 8 May 2024 08:59:13 +0200 Subject: [PATCH 4/4] removes debugging --- spec/system/page_objects/components/topic_list_header.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/system/page_objects/components/topic_list_header.rb b/spec/system/page_objects/components/topic_list_header.rb index 13f6c288..b0e4b834 100644 --- a/spec/system/page_objects/components/topic_list_header.rb +++ b/spec/system/page_objects/components/topic_list_header.rb @@ -8,7 +8,6 @@ def has_assign_topics_button? end def click_assign_topics_button - p bulk_select_dropdown_item("assign-topics") find(bulk_select_dropdown_item("assign-topics")).click end