From 42dd029611f36222a3fd0628df3a9957227af31d Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Tue, 26 Nov 2024 08:58:09 -0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Remove=20rose:linkbu?= =?UTF-8?q?tton=20(#2590)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove rose:linkbutton references and tests --- .../components/rose/link-button/index.hbs | 32 ---------- .../rose/app/components/rose/link-button.js | 6 -- .../app/styles/rose/components/_index.scss | 1 - .../styles/rose/components/_link-button.scss | 9 --- .../components/rose/link-button-test.js | 64 ------------------- 5 files changed, 112 deletions(-) delete mode 100644 addons/rose/addon/components/rose/link-button/index.hbs delete mode 100644 addons/rose/app/components/rose/link-button.js delete mode 100644 addons/rose/app/styles/rose/components/_link-button.scss delete mode 100644 addons/rose/tests/integration/components/rose/link-button-test.js diff --git a/addons/rose/addon/components/rose/link-button/index.hbs b/addons/rose/addon/components/rose/link-button/index.hbs deleted file mode 100644 index bdf8b4234..000000000 --- a/addons/rose/addon/components/rose/link-button/index.hbs +++ /dev/null @@ -1,32 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 -}} - - - - {{#if @iconLeft}} - - {{/if}} - - - {{yield}} - - - {{#if @iconOnly}} - - {{/if}} - - {{#if @iconRight}} - - {{/if}} - - \ No newline at end of file diff --git a/addons/rose/app/components/rose/link-button.js b/addons/rose/app/components/rose/link-button.js deleted file mode 100644 index 3299c8573..000000000 --- a/addons/rose/app/components/rose/link-button.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -export { default } from 'rose/components/rose/link-button'; diff --git a/addons/rose/app/styles/rose/components/_index.scss b/addons/rose/app/styles/rose/components/_index.scss index e79b7def8..bdbe24095 100644 --- a/addons/rose/app/styles/rose/components/_index.scss +++ b/addons/rose/app/styles/rose/components/_index.scss @@ -19,7 +19,6 @@ @import 'nav'; @import 'table'; @import 'message'; -@import 'link-button'; @import 'toolbar'; @import 'code-editor'; @import 'metadata-list'; diff --git a/addons/rose/app/styles/rose/components/_link-button.scss b/addons/rose/app/styles/rose/components/_link-button.scss deleted file mode 100644 index bec0911d1..000000000 --- a/addons/rose/app/styles/rose/components/_link-button.scss +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -// Link button uses rose-button styling -.rose-link-button { - text-decoration: none; -} diff --git a/addons/rose/tests/integration/components/rose/link-button-test.js b/addons/rose/tests/integration/components/rose/link-button-test.js deleted file mode 100644 index 98513986b..000000000 --- a/addons/rose/tests/integration/components/rose/link-button-test.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: BUSL-1.1 - */ - -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | rose/link-button', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - await render(hbs``); - assert.ok(find('a')); - assert.notOk(find('.rose-button')); - assert.ok(find('.rose-link-button')); - }); - - test('it renders with attributes', async function (assert) { - await render(hbs``); - assert.ok(find('#link-button')); - }); - - test('it renders with content', async function (assert) { - await render( - hbs`Link button content`, - ); - assert.ok( - find('.rose-link-button').textContent.trim(), - 'Link button content', - ); - }); - - test('it renders with rose button styles', async function (assert) { - await render(hbs``); - assert.ok(find(`.rose-button-sample`)); - }); - - test('it supports left icon with @iconLeft', async function (assert) { - await render( - hbs``, - ); - assert.ok(find('.rose-icon')); - assert.ok(find('.has-icon-left')); - }); - - test('it supports left icon with @iconRight', async function (assert) { - await render( - hbs``, - ); - assert.ok(find('.rose-icon')); - assert.ok(find('.has-icon-right')); - }); - - test('it supports only icon with @iconOnly', async function (assert) { - await render( - hbs``, - ); - assert.ok(find('.rose-icon')); - assert.ok(find('.has-icon-only')); - }); -});