From 038b8306042816df735a78591287349cbcc2526b Mon Sep 17 00:00:00 2001 From: chapoi <101828855+chapoi@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:29:49 +0200 Subject: [PATCH 1/5] Prep for modal class changes --- assets/stylesheets/assigns.scss | 5 +---- spec/system/page_objects/modals/assign.rb | 2 +- test/javascripts/acceptance/assigns-tab-user-menu-test.js | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assets/stylesheets/assigns.scss b/assets/stylesheets/assigns.scss index 7cad73cc..a068dca6 100644 --- a/assets/stylesheets/assigns.scss +++ b/assets/stylesheets/assigns.scss @@ -67,11 +67,8 @@ } .modal.assign { - .modal-inner-container { - width: 400px; - } - .modal-body { + .d-modal__body { overflow-y: unset; } diff --git a/spec/system/page_objects/modals/assign.rb b/spec/system/page_objects/modals/assign.rb index afe51e93..91e4fea2 100644 --- a/spec/system/page_objects/modals/assign.rb +++ b/spec/system/page_objects/modals/assign.rb @@ -19,7 +19,7 @@ def note=(note) end def confirm - find(".modal-footer .btn-primary").click + find(".d-modal__footer .btn-primary").click end end end diff --git a/test/javascripts/acceptance/assigns-tab-user-menu-test.js b/test/javascripts/acceptance/assigns-tab-user-menu-test.js index d80ff309..3e0ffef1 100644 --- a/test/javascripts/acceptance/assigns-tab-user-menu-test.js +++ b/test/javascripts/acceptance/assigns-tab-user-menu-test.js @@ -262,7 +262,7 @@ acceptance("Discourse Assign | user menu", function (needs) { assert.false(markRead, "mark-read request isn't sent"); assert.strictEqual( query( - ".dismiss-notification-confirmation .modal-body" + ".dismiss-notification-confirmation .d-modal__body" ).textContent.trim(), I18n.t("notifications.dismiss_confirmation.body.assigns", { count: 173 }), "dismiss confirmation modal is shown" @@ -312,7 +312,7 @@ acceptance("Discourse Assign | user menu", function (needs) { await click(".notifications-dismiss"); assert.false(markRead, "a request to the server is not made"); assert - .dom(".dismiss-notification-confirmation .modal-body") + .dom(".dismiss-notification-confirmation .d-modal__body") .exists("the dismiss notification confirmation modal is present"); }); }); From bf7cac356559a48eb9b303e34bef16c24cea65db Mon Sep 17 00:00:00 2001 From: chapoi <101828855+chapoi@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:32:24 +0200 Subject: [PATCH 2/5] fix one more test --- test/javascripts/acceptance/assigns-tab-user-menu-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/javascripts/acceptance/assigns-tab-user-menu-test.js b/test/javascripts/acceptance/assigns-tab-user-menu-test.js index 3e0ffef1..394dc22d 100644 --- a/test/javascripts/acceptance/assigns-tab-user-menu-test.js +++ b/test/javascripts/acceptance/assigns-tab-user-menu-test.js @@ -268,7 +268,7 @@ acceptance("Discourse Assign | user menu", function (needs) { "dismiss confirmation modal is shown" ); - await click(".modal-footer .btn-primary"); + await click(".d-modal__footer .btn-primary"); assert.true(markRead, "mark-read request is sent"); assert.dom(".notifications-dismiss").doesNotExist("dismiss button is gone"); assert From a7af25d61bbdf155ccb7cea340630676faeef434 Mon Sep 17 00:00:00 2001 From: chapoi <101828855+chapoi@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:00:19 +0200 Subject: [PATCH 3/5] Double CSS declarations for modal changes --- assets/stylesheets/assigns.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/stylesheets/assigns.scss b/assets/stylesheets/assigns.scss index a068dca6..009372e3 100644 --- a/assets/stylesheets/assigns.scss +++ b/assets/stylesheets/assigns.scss @@ -67,8 +67,12 @@ } .modal.assign { + .modal-inner-container { + max-width: 400px; + } - .d-modal__body { + .d-modal__body, + .modal-body { overflow-y: unset; } From 2e1a43e334ed8b27d5f9396ced11f1cf157562ae Mon Sep 17 00:00:00 2001 From: chapoi <101828855+chapoi@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:13:10 +0200 Subject: [PATCH 4/5] Revert tests --- spec/system/page_objects/modals/assign.rb | 2 +- test/javascripts/acceptance/assigns-tab-user-menu-test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/system/page_objects/modals/assign.rb b/spec/system/page_objects/modals/assign.rb index 91e4fea2..afe51e93 100644 --- a/spec/system/page_objects/modals/assign.rb +++ b/spec/system/page_objects/modals/assign.rb @@ -19,7 +19,7 @@ def note=(note) end def confirm - find(".d-modal__footer .btn-primary").click + find(".modal-footer .btn-primary").click end end end diff --git a/test/javascripts/acceptance/assigns-tab-user-menu-test.js b/test/javascripts/acceptance/assigns-tab-user-menu-test.js index 394dc22d..d80ff309 100644 --- a/test/javascripts/acceptance/assigns-tab-user-menu-test.js +++ b/test/javascripts/acceptance/assigns-tab-user-menu-test.js @@ -262,13 +262,13 @@ acceptance("Discourse Assign | user menu", function (needs) { assert.false(markRead, "mark-read request isn't sent"); assert.strictEqual( query( - ".dismiss-notification-confirmation .d-modal__body" + ".dismiss-notification-confirmation .modal-body" ).textContent.trim(), I18n.t("notifications.dismiss_confirmation.body.assigns", { count: 173 }), "dismiss confirmation modal is shown" ); - await click(".d-modal__footer .btn-primary"); + await click(".modal-footer .btn-primary"); assert.true(markRead, "mark-read request is sent"); assert.dom(".notifications-dismiss").doesNotExist("dismiss button is gone"); assert @@ -312,7 +312,7 @@ acceptance("Discourse Assign | user menu", function (needs) { await click(".notifications-dismiss"); assert.false(markRead, "a request to the server is not made"); assert - .dom(".dismiss-notification-confirmation .d-modal__body") + .dom(".dismiss-notification-confirmation .modal-body") .exists("the dismiss notification confirmation modal is present"); }); }); From 818830edf98ab7165993e41b76b65e41e6f628e7 Mon Sep 17 00:00:00 2001 From: chapoi <101828855+chapoi@users.noreply.github.com> Date: Mon, 13 Nov 2023 14:17:16 +0200 Subject: [PATCH 5/5] fix max width to width --- assets/stylesheets/assigns.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/stylesheets/assigns.scss b/assets/stylesheets/assigns.scss index 009372e3..3a803205 100644 --- a/assets/stylesheets/assigns.scss +++ b/assets/stylesheets/assigns.scss @@ -68,7 +68,7 @@ .modal.assign { .modal-inner-container { - max-width: 400px; + width: 400px; } .d-modal__body,