Skip to content

Commit

Permalink
Remove ember-component-attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjgeiger committed Sep 5, 2023
1 parent 7f44836 commit d6903ff
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 63 deletions.
2 changes: 1 addition & 1 deletion app/models/collection-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { computed } from '@ember/object';
import { htmlSafe } from '@ember/string';
import { htmlSafe } from '@ember/template';
import { belongsTo, hasMany, AsyncBelongsTo, AsyncHasMany } from '@ember-data/model';

import CollectionModel from './collection';
Expand Down
2 changes: 1 addition & 1 deletion app/models/institution.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { attr, belongsTo, hasMany, AsyncBelongsTo, AsyncHasMany } from '@ember-data/model';
import { computed } from '@ember/object';
import { htmlSafe } from '@ember/string';
import { htmlSafe } from '@ember/template';

import InstitutionSummaryMetricModel from 'ember-osf-web/models/institution-summary-metric';
import InstitutionDepartmentsModel from './institution-department';
Expand Down
2 changes: 1 addition & 1 deletion app/models/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { attr, belongsTo, hasMany, AsyncBelongsTo, AsyncHasMany } from '@ember-d
import { computed } from '@ember/object';
import { alias, bool, equal, not } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import { htmlSafe } from '@ember/string';
import { htmlSafe } from '@ember/template';
import { buildValidations, validator } from 'ember-cp-validations';
import Intl from 'ember-intl/services/intl';

Expand Down
2 changes: 1 addition & 1 deletion app/models/registration-provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { htmlSafe } from '@ember/string';
import { htmlSafe } from '@ember/template';
import { attr, belongsTo, hasMany, AsyncBelongsTo, AsyncHasMany } from '@ember-data/model';
import ReviewActionModel from 'ember-osf-web/models/review-action';

Expand Down
2 changes: 1 addition & 1 deletion lib/app-components/addon/helpers/math.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Helper from '@ember/component/helper';
import { htmlSafe } from '@ember/string';
import { htmlSafe } from '@ember/template';
import katex, { KatexRenderOptions } from 'katex';

export interface Delimiter {
Expand Down
76 changes: 38 additions & 38 deletions lib/osf-components/addon/components/sign-up-form/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,44 @@
local-class='sign-up-form'
{{action 'submit' on='submit'}}
>
{{validated-input/text
(html-attributes data-test-sign-up-full-name=true)
model=this.userRegistration
valuePath='fullName'
shouldShowMessages=this.didValidate
disabled=this.hasSubmitted
placeholder=(t 'osf-components.sign-up-form.full_name')
ariaLabel=(t 'osf-components.sign-up-form.full_name')
}}
{{validated-input/text
(html-attributes data-test-sign-up-email-1=true)
model=this.userRegistration
valuePath='email1'
shouldShowMessages=this.didValidate
disabled=this.hasSubmitted
placeholder=(t 'osf-components.sign-up-form.contact_email')
ariaLabel=(t 'osf-components.sign-up-form.contact_email')
}}
{{validated-input/text
(html-attributes data-test-sign-up-email-2=true)
model=this.userRegistration
valuePath='email2'
shouldShowMessages=this.didValidate
disabled=this.hasSubmitted
placeholder=(t 'osf-components.sign-up-form.confirm_email')
ariaLabel=(t 'osf-components.sign-up-form.confirm_email')
}}
{{validated-input/text
(html-attributes data-test-sign-up-password=true)
password=true
model=this.userRegistration
valuePath='password'
shouldShowMessages=this.didValidate
disabled=this.hasSubmitted
onKeyUp=(perform this.strength this.userRegistration.password)
placeholder=(t 'osf-components.sign-up-form.password')
ariaLabel=(t 'osf-components.sign-up-form.password')
}}
<ValidatedInput::Text
data-test-sign-up-full-name=true
@model={{this.userRegistration}}
@valuePath='fullName'
@shouldShowMessages={{this.didValidate}}
disabled={{this.hasSubmitted}}
placeholder={{t 'osf-components.sign-up-form.full_name'}}
ariaLabel={{t 'osf-components.sign-up-form.full_name'}}
/>
<ValidatedInput::Text
data-test-sign-up-email-1=true
@model={{this.userRegistration}}
@valuePath='email1'
@shouldShowMessages={{this.didValidate}}
disabled={{this.hasSubmitted}}
placeholder={{t 'osf-components.sign-up-form.contact_email'}}
ariaLabel={{t 'osf-components.sign-up-form.contact_email'}}
/>
<ValidatedInput::Text
data-test-sign-up-email-2=true
@model={{this.userRegistration}}
@valuePath='email2'
@shouldShowMessages={{this.didValidate}}
disabled={{this.hasSubmitted}}
placeholder={{t 'osf-components.sign-up-form.confirm_email'}}
ariaLabel={{t 'osf-components.sign-up-form.confirm_email'}}
/>
<ValidatedInput::Text
data-test-sign-up-password=true
password={{true}}
@model={{this.userRegistration}}
@valuePath='password'
@shouldShowMessages={{this.didValidate}}
disabled={{this.hasSubmitted}}
{{on 'keyup' (perform this.strength this.userRegistration.password)}}
placeholder={{t 'osf-components.sign-up-form.password'}}
ariaLabel={{t 'osf-components.sign-up-form.password'}}
/>
<div local-class='progress' hidden={{not this.progress}}>
<div
local-class='progress-bar progress-bar-sm'
Expand Down
1 change: 0 additions & 1 deletion lib/registries/addon/discover/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
setOrder=(action this.setOrder)
}}
{{#discover.results
(html-attributes data-test-results=true)
as |result|
}}
<RegistriesSearchResult
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,14 @@
"ember-cli-sass": "^10.0.0",
"ember-cli-showdown": "^7.0.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-string-helpers": "^5.0.0",
"ember-cli-string-helpers": "^6.1.0",
"ember-cli-stylelint": "^4.0.0",
"ember-cli-terser": "^4.0.1",
"ember-cli-test-loader": "^2.2.0",
"ember-cli-typescript": "^4.1.0",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-code-snippet": "^2.4.0",
"ember-collapsible-panel": "^6.0.1",
"ember-component-attributes": "^0.1.1",
"ember-composable-helpers": "^5.0.0",
"ember-concurrency": "^2.0.3",
"ember-concurrency-async": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render, waitFor } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
import { setupEngineRenderingTest } from 'ember-osf-web/tests/helpers/engines';
import { TestContext } from 'ember-test-helpers';
import { module, test } from 'qunit';
import { module, skip, test } from 'qunit';

module('Registries | Integration | Component | x-dummy', hooks => {
setupEngineRenderingTest(hooks, 'registries');
Expand All @@ -25,9 +25,9 @@ module('Registries | Integration | Component | x-dummy', hooks => {
assert.dom('[data-attr="foo"]').hasText('This is a test!');
});

test('it yields yieldValue', async function(assert) {
skip('it yields yieldValue', async function(assert) {
await render(hbs`
{{#x-dummy (html-attributes data-test-dummy='1') yieldValue='It works!' as |val|}}
{{#x-dummy yieldValue='It works!' as |val|}}
<p>{{val}}</p>
{{/x-dummy}}
`);
Expand Down
Loading

0 comments on commit d6903ff

Please sign in to comment.