A platform for community discussion. Free, open, simple.
DEV: removes hidden-details component (#27833)
Joffrey JAFFEUX67c3f294860f
diff --git a/app/assets/javascripts/discourse/app/components/hidden-details.hbs b/app/assets/javascripts/discourse/app/components/hidden-details.hbsdeleted file mode 100644index 2ef594cdedc..00000000000--- a/app/assets/javascripts/discourse/app/components/hidden-details.hbs+++ /dev/null@@ -1,6 +0,0 @@-{{#unless this.expanded}}- <DButton @action={{this.expand}} @label={{this.label}} class="btn-link" />-{{/unless}}-{{#if this.expanded}}- <span class="description" aria-live="assertive">{{this.details}}</span>-{{/if}}\ No newline at end of filediff --git a/app/assets/javascripts/discourse/app/components/hidden-details.js b/app/assets/javascripts/discourse/app/components/hidden-details.jsdeleted file mode 100644index a06ed1ee91c..00000000000--- a/app/assets/javascripts/discourse/app/components/hidden-details.js+++ /dev/null@@ -1,9 +0,0 @@-import Component from "@ember/component";-import { action } from "@ember/object";--export default Component.extend({- @action- expand() {- this.set("expanded", true);- },-});diff --git a/app/assets/javascripts/discourse/tests/integration/components/hidden-details-test.js b/app/assets/javascripts/discourse/tests/integration/components/hidden-details-test.jsdeleted file mode 100644index ff81361d819..00000000000--- a/app/assets/javascripts/discourse/tests/integration/components/hidden-details-test.js+++ /dev/null@@ -1,29 +0,0 @@-import { click, render } from "@ember/test-helpers";-import { hbs } from "ember-cli-htmlbars";-import { module, test } from "qunit";-import { setupRenderingTest } from "discourse/tests/helpers/component-test";-import { exists, query } from "discourse/tests/helpers/qunit-helpers";-import I18n from "discourse-i18n";--module("Integration | Component | hidden-details", function (hooks) {- setupRenderingTest(hooks);-- test("Shows a link and turns link into details on click", async function (assert) {- this.set("label", "label");- this.set("details", "details");-- await render(- hbs`<HiddenDetails @label={{this.label}} @details={{this.details}} />`- );-- assert.ok(exists(".btn-link"));- assert.strictEqual(query(".btn-link span").innerText, I18n.t("label"));- assert.notOk(exists(".description"));-- await click(".btn-link");-- assert.notOk(exists(".btn-link"));- assert.ok(exists(".description"));- assert.strictEqual(query(".description").innerText, "details");- });-});