From 9563d82dcc7b1ebb5169d820ad553269bee9d18a Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Tue, 16 Jun 2020 14:39:42 -0400 Subject: [PATCH 1/5] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Integrate=20rose=20?= =?UTF-8?q?link=20button=20in=20admin/ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace "New" projects and host catalog link with rose link-button component --- addons/rose/addon/templates/components/rose/link-button.hbs | 1 - ui/core/app/templates/orgs/org/projects/index.hbs | 2 +- .../projects/project/host-catalogs/host-catalog/index.hbs | 2 +- .../orgs/org/projects/project/host-catalogs/index.hbs | 6 ++---- ui/core/app/templates/orgs/org/projects/project/index.hbs | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/rose/addon/templates/components/rose/link-button.hbs b/addons/rose/addon/templates/components/rose/link-button.hbs index 9db7c752c..9a992f149 100644 --- a/addons/rose/addon/templates/components/rose/link-button.hbs +++ b/addons/rose/addon/templates/components/rose/link-button.hbs @@ -1,7 +1,6 @@ diff --git a/ui/core/app/templates/orgs/org/projects/index.hbs b/ui/core/app/templates/orgs/org/projects/index.hbs index 0ddef022c..c98116b42 100644 --- a/ui/core/app/templates/orgs/org/projects/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/index.hbs @@ -9,7 +9,7 @@ - {{t 'titles.new'}} + {{t 'titles.new'}} diff --git a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs index b80d3f9b0..735397eef 100644 --- a/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/host-catalogs/host-catalog/index.hbs @@ -14,7 +14,7 @@ @submit={{route-action "save" @model}} @cancel={{route-action "cancel" @model}} /> - + - + {{t 'titles.new'}} - + diff --git a/ui/core/app/templates/orgs/org/projects/project/index.hbs b/ui/core/app/templates/orgs/org/projects/project/index.hbs index 5c297e624..77050cd72 100644 --- a/ui/core/app/templates/orgs/org/projects/project/index.hbs +++ b/ui/core/app/templates/orgs/org/projects/project/index.hbs @@ -22,7 +22,7 @@ @submit={{route-action "save" @model}} @cancel={{route-action "cancel" @model}} /> - + Date: Wed, 17 Jun 2020 13:51:15 -0400 Subject: [PATCH 2/5] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Add=20model=20check?= =?UTF-8?q?=20for=20linkbutton=20rose=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Anchor element cannot be passed in an invalid or empty model when a route is defined. Add check for model existence when generating linkbutton html. --- .../rose/addon/components/rose/link-button.js | 3 ++ .../addon/components/rose/link-button/body.js | 7 +++ .../templates/components/rose/link-button.hbs | 53 ++++++++----------- .../components/rose/link-button/body.hbs | 26 +++++++++ .../app/components/rose/link-button/body.js | 1 + .../components/rose/link-button/body-test.js | 40 ++++++++++++++ 6 files changed, 98 insertions(+), 32 deletions(-) create mode 100644 addons/rose/addon/components/rose/link-button/body.js create mode 100644 addons/rose/addon/templates/components/rose/link-button/body.hbs create mode 100644 addons/rose/app/components/rose/link-button/body.js create mode 100644 addons/rose/tests/integration/components/rose/link-button/body-test.js diff --git a/addons/rose/addon/components/rose/link-button.js b/addons/rose/addon/components/rose/link-button.js index 32e084f7e..3219bcbff 100644 --- a/addons/rose/addon/components/rose/link-button.js +++ b/addons/rose/addon/components/rose/link-button.js @@ -3,6 +3,9 @@ import layout from '../../templates/components/rose/link-button'; /** * An achor element based on `rose-button` component styles + * An empty model cannot be passed in to `link-to` component when a route + * is defined. Thus, `link-button` body content is separated to avoid + * duplication when checked for model existence. * * @example * Save diff --git a/addons/rose/addon/components/rose/link-button/body.js b/addons/rose/addon/components/rose/link-button/body.js new file mode 100644 index 000000000..7934097df --- /dev/null +++ b/addons/rose/addon/components/rose/link-button/body.js @@ -0,0 +1,7 @@ +import Component from '@ember/component'; +import layout from '../../../templates/components/rose/link-button/body'; + +export default Component.extend({ + layout, + tagName: '', +}); diff --git a/addons/rose/addon/templates/components/rose/link-button.hbs b/addons/rose/addon/templates/components/rose/link-button.hbs index 9a992f149..f7d7e94c3 100644 --- a/addons/rose/addon/templates/components/rose/link-button.hbs +++ b/addons/rose/addon/templates/components/rose/link-button.hbs @@ -1,33 +1,22 @@ - - - - {{#if @iconLeft}} - - {{/if}} - - +{{#if @model}} + + {{yield}} - - - {{#if @iconOnly}} - - {{/if}} - - {{#if @iconRight}} - - {{/if}} - - + + +{{else}} + + + {{yield}} + + +{{/if}} diff --git a/addons/rose/addon/templates/components/rose/link-button/body.hbs b/addons/rose/addon/templates/components/rose/link-button/body.hbs new file mode 100644 index 000000000..20ea6c6a5 --- /dev/null +++ b/addons/rose/addon/templates/components/rose/link-button/body.hbs @@ -0,0 +1,26 @@ + + {{#if @iconLeft}} + + {{/if}} + + + {{yield}} + + + {{#if @iconOnly}} + + {{/if}} + + {{#if @iconRight}} + + {{/if}} + diff --git a/addons/rose/app/components/rose/link-button/body.js b/addons/rose/app/components/rose/link-button/body.js new file mode 100644 index 000000000..b3c9ee39f --- /dev/null +++ b/addons/rose/app/components/rose/link-button/body.js @@ -0,0 +1 @@ +export { default } from 'rose/components/rose/link-button/body'; diff --git a/addons/rose/tests/integration/components/rose/link-button/body-test.js b/addons/rose/tests/integration/components/rose/link-button/body-test.js new file mode 100644 index 000000000..2ff8aecaa --- /dev/null +++ b/addons/rose/tests/integration/components/rose/link-button/body-test.js @@ -0,0 +1,40 @@ +import { module, test } from 'qunit'; +import { setupRenderingTest } from 'ember-qunit'; +import { render, find } from '@ember/test-helpers'; +import hbs from 'htmlbars-inline-precompile'; + +module('Integration | Component | rose/link-button/body', function (hooks) { + setupRenderingTest(hooks); + + test('it renders', async function (assert) { + await render(hbs``); + assert.ok(find('.rose-button-wrapper')); + }); + + test('it renders with content', async function (assert) { + await render(hbs` + Body content + `); + assert.equal( + find('.rose-button-wrapper').textContent.trim(), + 'Body content' + ); + }); + + test('it supports @iconLeft', async function (assert) { + await render(hbs``); + assert.ok(find('.rose-icon')); + }); + + test('it supports @iconRight', async function (assert) { + await render(hbs``); + assert.ok(find('.rose-icon')); + }); + + test('it supports @iconOnly', async function (assert) { + await render( + hbs`` + ); + assert.ok(find('.rose-icon')); + }); +}); From a9a0ca6d6cd3d818ab6f90bb99cd3656580e5532 Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Wed, 17 Jun 2020 17:08:30 -0400 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Update=20linkbut?= =?UTF-8?q?ton=20to=20a=20link-to=20ember=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linkbutton provides template for link-to content. --- .../rose/addon/components/rose/link-button.js | 25 ++++++++-- .../components/rose/link-button.stories.mdx | 7 +-- .../addon/components/rose/link-button/body.js | 7 --- .../templates/components/rose/link-button.hbs | 48 ++++++++++--------- .../components/rose/link-button/body.hbs | 26 ---------- .../app/components/rose/link-button/body.js | 1 - .../rose/tests/dummy/app/templates/index.hbs | 14 +++--- .../components/rose/link-button-test.js | 18 +++---- .../components/rose/link-button/body-test.js | 40 ---------------- 9 files changed, 64 insertions(+), 122 deletions(-) delete mode 100644 addons/rose/addon/components/rose/link-button/body.js delete mode 100644 addons/rose/addon/templates/components/rose/link-button/body.hbs delete mode 100644 addons/rose/app/components/rose/link-button/body.js delete mode 100644 addons/rose/tests/integration/components/rose/link-button/body-test.js diff --git a/addons/rose/addon/components/rose/link-button.js b/addons/rose/addon/components/rose/link-button.js index 3219bcbff..d5c12ed37 100644 --- a/addons/rose/addon/components/rose/link-button.js +++ b/addons/rose/addon/components/rose/link-button.js @@ -1,17 +1,32 @@ -import Component from '@ember/component'; +import LinkComponent from '@ember/routing/link-component'; import layout from '../../templates/components/rose/link-button'; +import { computed } from '@ember/object'; /** * An achor element based on `rose-button` component styles * An empty model cannot be passed in to `link-to` component when a route - * is defined. Thus, `link-button` body content is separated to avoid - * duplication when checked for model existence. + * is defined. Thus, `link-to` component is used to generate this component. * * @example * Save * Disabled */ -export default Component.extend({ +export default LinkComponent.extend({ layout, - tagName: '', + tagName: 'a', + classNames: ['rose-link-button'], + classNameBindings: [ + 'linkButtonStyle', + 'iconOnly:has-icon-only', + 'iconLeft:has-icon-left', + 'iconRight:has-icon-right', + ], + linkButtonStyle: computed(function () { + let styleClassName = ''; + if (this.style) { + styleClassName = `rose-button-${this.style}`; + } + + return styleClassName; + }), }); diff --git a/addons/rose/addon/components/rose/link-button.stories.mdx b/addons/rose/addon/components/rose/link-button.stories.mdx index cb6b13001..0ca00a2ee 100644 --- a/addons/rose/addon/components/rose/link-button.stories.mdx +++ b/addons/rose/addon/components/rose/link-button.stories.mdx @@ -12,7 +12,7 @@ Styles supported: primary, secondary, warning, and ghost. Disabling link button is not supported as it is an action on form components only. ```html - + Content ``` @@ -21,6 +21,7 @@ Disabling link button is not supported as it is an action on form components onl {{ template: hbs` + ``` {{ template: hbs` - + `, context: { style: select( diff --git a/addons/rose/addon/components/rose/link-button/body.js b/addons/rose/addon/components/rose/link-button/body.js deleted file mode 100644 index 7934097df..000000000 --- a/addons/rose/addon/components/rose/link-button/body.js +++ /dev/null @@ -1,7 +0,0 @@ -import Component from '@ember/component'; -import layout from '../../../templates/components/rose/link-button/body'; - -export default Component.extend({ - layout, - tagName: '', -}); diff --git a/addons/rose/addon/templates/components/rose/link-button.hbs b/addons/rose/addon/templates/components/rose/link-button.hbs index f7d7e94c3..20ea6c6a5 100644 --- a/addons/rose/addon/templates/components/rose/link-button.hbs +++ b/addons/rose/addon/templates/components/rose/link-button.hbs @@ -1,22 +1,26 @@ -{{#if @model}} - - - {{yield}} - - -{{else}} - - - {{yield}} - - -{{/if}} + + {{#if @iconLeft}} + + {{/if}} + + + {{yield}} + + + {{#if @iconOnly}} + + {{/if}} + + {{#if @iconRight}} + + {{/if}} + diff --git a/addons/rose/addon/templates/components/rose/link-button/body.hbs b/addons/rose/addon/templates/components/rose/link-button/body.hbs deleted file mode 100644 index 20ea6c6a5..000000000 --- a/addons/rose/addon/templates/components/rose/link-button/body.hbs +++ /dev/null @@ -1,26 +0,0 @@ - - {{#if @iconLeft}} - - {{/if}} - - - {{yield}} - - - {{#if @iconOnly}} - - {{/if}} - - {{#if @iconRight}} - - {{/if}} - diff --git a/addons/rose/app/components/rose/link-button/body.js b/addons/rose/app/components/rose/link-button/body.js deleted file mode 100644 index b3c9ee39f..000000000 --- a/addons/rose/app/components/rose/link-button/body.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from 'rose/components/rose/link-button/body'; diff --git a/addons/rose/tests/dummy/app/templates/index.hbs b/addons/rose/tests/dummy/app/templates/index.hbs index 8df466fc3..2422caa03 100644 --- a/addons/rose/tests/dummy/app/templates/index.hbs +++ b/addons/rose/tests/dummy/app/templates/index.hbs @@ -1,9 +1,9 @@ -Primary -Secondary -Warning -Ghost +Primary +Secondary +Warning +Ghost
-Left Icon -Right Icon - +Left Icon +Right Icon + diff --git a/addons/rose/tests/integration/components/rose/link-button-test.js b/addons/rose/tests/integration/components/rose/link-button-test.js index d7d3c8497..617f76ed0 100644 --- a/addons/rose/tests/integration/components/rose/link-button-test.js +++ b/addons/rose/tests/integration/components/rose/link-button-test.js @@ -7,19 +7,19 @@ module('Integration | Component | rose/link-button', function (hooks) { setupRenderingTest(hooks); test('it renders', async function (assert) { - await render(hbs``); + 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``); + await render(hbs``); assert.ok(find('#link-button')); }); test('it renders with content', async function (assert) { - await render(hbs`Link button content`); + await render(hbs`Link button content`); assert.ok( find('.rose-link-button').textContent.trim(), 'Link button content' @@ -27,28 +27,24 @@ module('Integration | Component | rose/link-button', function (hooks) { }); test('it renders with rose button styles', async function (assert) { - this.set('style', 'primary'); - await render(hbs``); - assert.ok(find(`.rose-button-primary`)); - - this.set('style', 'sample'); + await render(hbs``); assert.ok(find(`.rose-button-sample`)); }); test('it supports left icon with @iconLeft', async function (assert) { - await render(hbs``); + 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``); + 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``); + await render(hbs``); assert.ok(find('.rose-icon')); assert.ok(find('.has-icon-only')); }); diff --git a/addons/rose/tests/integration/components/rose/link-button/body-test.js b/addons/rose/tests/integration/components/rose/link-button/body-test.js deleted file mode 100644 index 2ff8aecaa..000000000 --- a/addons/rose/tests/integration/components/rose/link-button/body-test.js +++ /dev/null @@ -1,40 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'ember-qunit'; -import { render, find } from '@ember/test-helpers'; -import hbs from 'htmlbars-inline-precompile'; - -module('Integration | Component | rose/link-button/body', function (hooks) { - setupRenderingTest(hooks); - - test('it renders', async function (assert) { - await render(hbs``); - assert.ok(find('.rose-button-wrapper')); - }); - - test('it renders with content', async function (assert) { - await render(hbs` - Body content - `); - assert.equal( - find('.rose-button-wrapper').textContent.trim(), - 'Body content' - ); - }); - - test('it supports @iconLeft', async function (assert) { - await render(hbs``); - assert.ok(find('.rose-icon')); - }); - - test('it supports @iconRight', async function (assert) { - await render(hbs``); - assert.ok(find('.rose-icon')); - }); - - test('it supports @iconOnly', async function (assert) { - await render( - hbs`` - ); - assert.ok(find('.rose-icon')); - }); -}); From 096d125f163ef3c14e9e46bda4bd0356c1be68e8 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 17 Jun 2020 18:00:38 -0400 Subject: [PATCH 4/5] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20organization?= =?UTF-8?q?=20and=20auth=20method=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/api/addon/adapters/auth-method.js | 16 ++++++++ .../api/addon/generated/models/auth-method.js | 37 +++++++++++++++++++ .../addon/generated/models/organization.js | 33 +++++++++++++++++ addons/api/addon/models/auth-method.js | 3 ++ addons/api/addon/models/organization.js | 3 ++ addons/api/app/adapters/auth-method.js | 1 + addons/api/app/models/auth-method.js | 1 + addons/api/app/models/organization.js | 1 + .../tests/unit/adapters/auth-method-test.js | 16 ++++++++ .../api/tests/unit/models/auth-method-test.js | 13 +++++++ .../tests/unit/models/organization-test.js | 13 +++++++ 11 files changed, 137 insertions(+) create mode 100644 addons/api/addon/adapters/auth-method.js create mode 100644 addons/api/addon/generated/models/auth-method.js create mode 100644 addons/api/addon/generated/models/organization.js create mode 100644 addons/api/addon/models/auth-method.js create mode 100644 addons/api/addon/models/organization.js create mode 100644 addons/api/app/adapters/auth-method.js create mode 100644 addons/api/app/models/auth-method.js create mode 100644 addons/api/app/models/organization.js create mode 100644 addons/api/tests/unit/adapters/auth-method-test.js create mode 100644 addons/api/tests/unit/models/auth-method-test.js create mode 100644 addons/api/tests/unit/models/organization-test.js diff --git a/addons/api/addon/adapters/auth-method.js b/addons/api/addon/adapters/auth-method.js new file mode 100644 index 000000000..2da687841 --- /dev/null +++ b/addons/api/addon/adapters/auth-method.js @@ -0,0 +1,16 @@ +import ApplicationAdapter from './application'; +import ScopeAdapterMixin from '../mixins/scope-adapter'; + +export default class AuthMethodAdapter extends ApplicationAdapter.extend( + ScopeAdapterMixin +) { + + // =attributes + + /** + * Auth method is scoped to org only. + * @type {boolean} + */ + includeProject = false; + +} diff --git a/addons/api/addon/generated/models/auth-method.js b/addons/api/addon/generated/models/auth-method.js new file mode 100644 index 000000000..c006b935c --- /dev/null +++ b/addons/api/addon/generated/models/auth-method.js @@ -0,0 +1,37 @@ +import BaseModel from '../../models/base'; +import { attr } from '@ember-data/model'; + +/** + * + */ +export default class GeneratedOrganizationModel extends BaseModel { + + // =attributes + + @attr('string', { + description: 'The type of the resource, to help differentiate schemas' + }) type; + + @attr('string', { + description: 'Optional name for identification purposes', + }) + name; + + @attr('string', { + description: 'Optional user-set description for identification purposes', + }) + description; + + @attr('date', { + description: 'The time this resource was created\nOutput only.', + readOnly: true, + }) + created_time; + + @attr('date', { + description: 'The time this resource was last updated\nOutput only.', + readOnly: true, + }) + updated_time; + +} diff --git a/addons/api/addon/generated/models/organization.js b/addons/api/addon/generated/models/organization.js new file mode 100644 index 000000000..773afb70f --- /dev/null +++ b/addons/api/addon/generated/models/organization.js @@ -0,0 +1,33 @@ +import BaseModel from '../../models/base'; +import { attr } from '@ember-data/model'; + +/** + * + */ +export default class GeneratedOrganizationModel extends BaseModel { + + // =attributes + + @attr('string', { + description: 'Optional name for identification purposes', + }) + name; + + @attr('string', { + description: 'Optional user-set description for identification purposes', + }) + description; + + @attr('date', { + description: 'The time this resource was created\nOutput only.', + readOnly: true, + }) + created_time; + + @attr('date', { + description: 'The time this resource was last updated\nOutput only.', + readOnly: true, + }) + updated_time; + +} diff --git a/addons/api/addon/models/auth-method.js b/addons/api/addon/models/auth-method.js new file mode 100644 index 000000000..ad795fd7d --- /dev/null +++ b/addons/api/addon/models/auth-method.js @@ -0,0 +1,3 @@ +import GeneratedAuthMethodModel from '../generated/models/auth-method'; + +export default class AuthMethodModel extends GeneratedAuthMethodModel {} diff --git a/addons/api/addon/models/organization.js b/addons/api/addon/models/organization.js new file mode 100644 index 000000000..a9478f967 --- /dev/null +++ b/addons/api/addon/models/organization.js @@ -0,0 +1,3 @@ +import GeneratedOrganizationModel from '../generated/models/organization'; + +export default class OrganizationModel extends GeneratedOrganizationModel {} diff --git a/addons/api/app/adapters/auth-method.js b/addons/api/app/adapters/auth-method.js new file mode 100644 index 000000000..02c325d6e --- /dev/null +++ b/addons/api/app/adapters/auth-method.js @@ -0,0 +1 @@ +export { default } from 'api/adapters/auth-method'; diff --git a/addons/api/app/models/auth-method.js b/addons/api/app/models/auth-method.js new file mode 100644 index 000000000..7dfb3b20c --- /dev/null +++ b/addons/api/app/models/auth-method.js @@ -0,0 +1 @@ +export { default } from 'api/models/auth-method'; diff --git a/addons/api/app/models/organization.js b/addons/api/app/models/organization.js new file mode 100644 index 000000000..f9e7429d3 --- /dev/null +++ b/addons/api/app/models/organization.js @@ -0,0 +1 @@ +export { default } from 'api/models/organization'; diff --git a/addons/api/tests/unit/adapters/auth-method-test.js b/addons/api/tests/unit/adapters/auth-method-test.js new file mode 100644 index 000000000..d7c2f176c --- /dev/null +++ b/addons/api/tests/unit/adapters/auth-method-test.js @@ -0,0 +1,16 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; +import config from 'ember-get-config'; + +module('Unit | Adapter | auth method', function (hooks) { + setupTest(hooks); + + test('it generates URL prefixes without project scope', function (assert) { + assert.expect(1); + const service = this.owner.lookup('service:scope'); + service.org = { id: 1 }; + service.project = { id: 2 }; + const adapter = this.owner.lookup('adapter:auth-method'); + assert.equal(adapter.urlPrefix(), `${config.api.namespace}/orgs/1`); + }); +}); diff --git a/addons/api/tests/unit/models/auth-method-test.js b/addons/api/tests/unit/models/auth-method-test.js new file mode 100644 index 000000000..3de95883a --- /dev/null +++ b/addons/api/tests/unit/models/auth-method-test.js @@ -0,0 +1,13 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Model | auth method', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let store = this.owner.lookup('service:store'); + let model = store.createRecord('auth-method', {}); + assert.ok(model); + }); +}); diff --git a/addons/api/tests/unit/models/organization-test.js b/addons/api/tests/unit/models/organization-test.js new file mode 100644 index 000000000..9d94b9ea4 --- /dev/null +++ b/addons/api/tests/unit/models/organization-test.js @@ -0,0 +1,13 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Model | organization', function(hooks) { + setupTest(hooks); + + // Replace this with your real tests. + test('it exists', function(assert) { + let store = this.owner.lookup('service:store'); + let model = store.createRecord('organization', {}); + assert.ok(model); + }); +}); From 34e76f5565b2d4408e21dd0281736269bca7ea7c Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 18 Jun 2020 10:44:56 -0400 Subject: [PATCH 5/5] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Update=20link-bu?= =?UTF-8?q?tton=20rose=20component=20tagName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/rose/addon/components/rose/link-button.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/rose/addon/components/rose/link-button.js b/addons/rose/addon/components/rose/link-button.js index d5c12ed37..f2e283b63 100644 --- a/addons/rose/addon/components/rose/link-button.js +++ b/addons/rose/addon/components/rose/link-button.js @@ -13,7 +13,6 @@ import { computed } from '@ember/object'; */ export default LinkComponent.extend({ layout, - tagName: 'a', classNames: ['rose-link-button'], classNameBindings: [ 'linkButtonStyle', @@ -22,11 +21,6 @@ export default LinkComponent.extend({ 'iconRight:has-icon-right', ], linkButtonStyle: computed(function () { - let styleClassName = ''; - if (this.style) { - styleClassName = `rose-button-${this.style}`; - } - - return styleClassName; + return this.style ? `rose-button-${this.style}` : ''; }), });