From b0e4b906ad770cd327024a638add7e40525789d3 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 12 Jun 2024 21:11:44 +0200 Subject: [PATCH] Revert "FIX: Properly close user-card after page transition (#27423)" (#27456) This reverts commit 1ecfc397d36536795824d5b46d7687a5f76778f4. --- .../tests/acceptance/user-card-test.js | 19 +------------------ .../float-kit/addon/lib/d-menu-instance.js | 1 - .../float-kit/addon/lib/d-tooltip-instance.js | 1 - 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js index 2f1ff0c5342..7622010b312 100644 --- a/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js +++ b/app/assets/javascripts/discourse/tests/acceptance/user-card-test.js @@ -1,5 +1,5 @@ import { getOwner } from "@ember/owner"; -import { click, currentURL, visit } from "@ember/test-helpers"; +import { click, visit } from "@ember/test-helpers"; import { test } from "qunit"; import userFixtures from "discourse/tests/fixtures/user-fixtures"; import { @@ -10,23 +10,6 @@ import { import { cloneJSON } from "discourse-common/lib/object"; import I18n from "discourse-i18n"; -acceptance("User Card", function (needs) { - needs.user(); - - test("opens and closes properly", async function (assert) { - await visit("/t/internationalization-localization/280"); - await click('a[data-user-card="charlie"]'); - - assert.dom(".user-card .card-content").exists(); - - await click(".card-huge-avatar"); - - assert.strictEqual(currentURL(), "/u/charlie/summary"); - assert.dom(".user-card").doesNotExist(); - assert.dom(".card-content").doesNotExist(); - }); -}); - acceptance("User Card - Show Local Time", function (needs) { needs.user(); needs.settings({ display_local_time_in_user_card: true }); diff --git a/app/assets/javascripts/float-kit/addon/lib/d-menu-instance.js b/app/assets/javascripts/float-kit/addon/lib/d-menu-instance.js index 89261465fe7..81411276713 100644 --- a/app/assets/javascripts/float-kit/addon/lib/d-menu-instance.js +++ b/app/assets/javascripts/float-kit/addon/lib/d-menu-instance.js @@ -112,7 +112,6 @@ export default class DMenuInstance extends FloatKitInstance { @action destroy() { - this.close(); this.tearDownListeners(); } } diff --git a/app/assets/javascripts/float-kit/addon/lib/d-tooltip-instance.js b/app/assets/javascripts/float-kit/addon/lib/d-tooltip-instance.js index a1dd9836201..c16e6079930 100644 --- a/app/assets/javascripts/float-kit/addon/lib/d-tooltip-instance.js +++ b/app/assets/javascripts/float-kit/addon/lib/d-tooltip-instance.js @@ -102,7 +102,6 @@ export default class DTooltipInstance extends FloatKitInstance { @action destroy() { - this.close(); this.tearDownListeners(); } }