From 9a3d05c156a817d8f3974754c68de79a4f6c51d8 Mon Sep 17 00:00:00 2001 From: Matthew Hartstonge Date: Mon, 7 Oct 2024 10:51:48 +1300 Subject: [PATCH 1/2] chore(addon/components): updates curly-brace syntax to angle bracket invocation. --- addon/components/paper-checkbox.js | 2 +- addon/components/paper-chips/template.hbs | 2 +- addon/components/paper-input.js | 2 +- addon/components/paper-radio-base.js | 2 +- addon/components/paper-radio-group.js | 2 +- addon/components/paper-switch.js | 2 +- addon/components/paper-tabs.hbs | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addon/components/paper-checkbox.js b/addon/components/paper-checkbox.js index 50af5c3ae..86acc469e 100644 --- a/addon/components/paper-checkbox.js +++ b/addon/components/paper-checkbox.js @@ -55,7 +55,7 @@ export default Component.extend(FocusableMixin, ColorMixin, ProxiableMixin, { init() { this._super(...arguments); assert( - '{{paper-checkbox}} requires an `onChange` action or null for no action.', + ' requires an `onChange` action or null for no action.', this.onChange !== undefined ); }, diff --git a/addon/components/paper-chips/template.hbs b/addon/components/paper-chips/template.hbs index 0cfde98f2..53c83f23d 100644 --- a/addon/components/paper-chips/template.hbs +++ b/addon/components/paper-chips/template.hbs @@ -30,7 +30,7 @@ aria-hidden="true" tabindex="-1" {{on "click" (fn this.handleRemoveItem item)}}> - + Remove {{/unless}} diff --git a/addon/components/paper-input.js b/addon/components/paper-input.js index c4c8d0587..256d9e300 100644 --- a/addon/components/paper-input.js +++ b/addon/components/paper-input.js @@ -92,7 +92,7 @@ export default Component.extend( didReceiveAttrs() { this._super(...arguments); assert( - '{{paper-input}} requires an `onChange` action or null for no action.', + ' requires an `onChange` action or null for no action.', this.onChange !== undefined ); diff --git a/addon/components/paper-radio-base.js b/addon/components/paper-radio-base.js index f27e928d4..8f645ca84 100644 --- a/addon/components/paper-radio-base.js +++ b/addon/components/paper-radio-base.js @@ -37,7 +37,7 @@ export default Component.extend(FocusableMixin, ColorMixin, { // Lifecycle hooks init() { assert( - '{{paper-radio}} requires an `onChange` action or null for no action.', + ' requires an `onChange` action or null for no action.', this.onChange !== undefined ); this._super(...arguments); diff --git a/addon/components/paper-radio-group.js b/addon/components/paper-radio-group.js index 0f61abf9b..79be11810 100644 --- a/addon/components/paper-radio-group.js +++ b/addon/components/paper-radio-group.js @@ -34,7 +34,7 @@ export default Component.extend(FocusableMixin, ParentMixin, { init() { this._super(...arguments); assert( - '{{paper-radio-group}} requires an `onChange` action or null for no action', + ' requires an `onChange` action or null for no action', this.onChange !== undefined ); }, diff --git a/addon/components/paper-switch.js b/addon/components/paper-switch.js index 0226d831f..041a47285 100644 --- a/addon/components/paper-switch.js +++ b/addon/components/paper-switch.js @@ -57,7 +57,7 @@ export default Component.extend(FocusableMixin, ColorMixin, ProxiableMixin, { init() { this._super(...arguments); assert( - '{{paper-switch}} requires an `onChange` action or null for no action.', + ' requires an `onChange` action or null for no action.', this.onChange !== undefined ); }, diff --git a/addon/components/paper-tabs.hbs b/addon/components/paper-tabs.hbs index cf2d7c442..094589e15 100644 --- a/addon/components/paper-tabs.hbs +++ b/addon/components/paper-tabs.hbs @@ -3,10 +3,10 @@ {{#if shouldPaginate}} - {{paper-icon "keyboard-arrow-left"}} + - {{paper-icon "keyboard-arrow-left"}} + {{/if}} From 14d27a4eb2726f7193bfe3a09056f56adc781a50 Mon Sep 17 00:00:00 2001 From: Matthew Hartstonge Date: Mon, 7 Oct 2024 11:35:48 +1300 Subject: [PATCH 2/2] chore(tests/dummy/app/templates): updates site documentation to use angle-bracket invocation. --- tests/dummy/app/templates/addons.hbs | 2 +- .../app/templates/components/example-item.hbs | 2 +- .../app/templates/components/menu-item.hbs | 2 +- .../app/templates/components/page-toolbar.hbs | 8 ++--- tests/dummy/app/templates/cookbook.hbs | 2 +- .../dummy/app/templates/demo/autocomplete.hbs | 22 ++++++------- tests/dummy/app/templates/demo/button.hbs | 2 +- tests/dummy/app/templates/demo/card.hbs | 24 +++++++------- tests/dummy/app/templates/demo/chips.hbs | 2 +- tests/dummy/app/templates/demo/dialog.hbs | 2 +- tests/dummy/app/templates/demo/icons.hbs | 16 +++++----- tests/dummy/app/templates/demo/input.hbs | 6 ++-- tests/dummy/app/templates/demo/list.hbs | 16 +++++----- tests/dummy/app/templates/demo/menu.hbs | 32 +++++++++---------- tests/dummy/app/templates/demo/sidenav.hbs | 6 ++-- tests/dummy/app/templates/demo/speed-dial.hbs | 22 ++++++------- tests/dummy/app/templates/demo/tabs.hbs | 10 +++--- tests/dummy/app/templates/demo/toast.hbs | 4 +-- tests/dummy/app/templates/demo/toolbar.hbs | 8 ++--- tests/dummy/app/templates/demo/tooltip.hbs | 8 ++--- tests/dummy/app/templates/forms.hbs | 12 +++---- 21 files changed, 103 insertions(+), 105 deletions(-) diff --git a/tests/dummy/app/templates/addons.hbs b/tests/dummy/app/templates/addons.hbs index 0e11c3d75..c9365c424 100644 --- a/tests/dummy/app/templates/addons.hbs +++ b/tests/dummy/app/templates/addons.hbs @@ -148,7 +148,7 @@

ember-paper-link

- A link-to component with paper-button styling that handles active route state and query params. + A {{""}} component with {{""}} styling that handles active route state and query params.

diff --git a/tests/dummy/app/templates/components/example-item.hbs b/tests/dummy/app/templates/components/example-item.hbs index 930b3e879..21d2b0074 100644 --- a/tests/dummy/app/templates/components/example-item.hbs +++ b/tests/dummy/app/templates/components/example-item.hbs @@ -2,7 +2,7 @@ {{! BEGIN-SNIPPET autocomplete.example-item }} {{! app/templates/components/example-item.hbs }} - {{paper-icon "star"}} + (index {{index}} ) {{! END-SNIPPET }} diff --git a/tests/dummy/app/templates/components/menu-item.hbs b/tests/dummy/app/templates/components/menu-item.hbs index a05c510c8..e2f85c1cc 100644 --- a/tests/dummy/app/templates/components/menu-item.hbs +++ b/tests/dummy/app/templates/components/menu-item.hbs @@ -2,6 +2,6 @@ {{yield}} {{#if canExpand}} - {{paper-icon "expand-more" class="expand-icon"}} + {{/if}} \ No newline at end of file diff --git a/tests/dummy/app/templates/components/page-toolbar.hbs b/tests/dummy/app/templates/components/page-toolbar.hbs index 86f5f6fc7..56ec1117f 100644 --- a/tests/dummy/app/templates/components/page-toolbar.hbs +++ b/tests/dummy/app/templates/components/page-toolbar.hbs @@ -3,19 +3,19 @@ - {{paper-icon "menu"}} +

{{#if isDemo}} - Components {{paper-icon "chevron-right"}} + Components {{else if isLayout}} - Layout {{paper-icon "chevron-right"}} + Layout {{/if}} {{pageTitle}} {{#if isWIP}} - {{paper-icon "warning" title="Not updated yet."}} + {{/if}}

diff --git a/tests/dummy/app/templates/cookbook.hbs b/tests/dummy/app/templates/cookbook.hbs index 6540f8860..973f81613 100644 --- a/tests/dummy/app/templates/cookbook.hbs +++ b/tests/dummy/app/templates/cookbook.hbs @@ -2,7 +2,7 @@
-

Hiding the \{{paper-input}} character counts

+

Hiding the {{""}} character counts

Material Design requires that a character count is displayed for input elements which have a length restriction. However, when forms have many input elements, some may prefer to display the count only when the element is focused or invalid. This CSS achieves this.

diff --git a/tests/dummy/app/templates/demo/autocomplete.hbs b/tests/dummy/app/templates/demo/autocomplete.hbs index ebb57a335..f5cf3af9d 100644 --- a/tests/dummy/app/templates/demo/autocomplete.hbs +++ b/tests/dummy/app/templates/demo/autocomplete.hbs @@ -6,7 +6,7 @@

Basic Usage

-
Use \{{paper-autocomplete}} to search for matches from local or remote data sources.
+
Use {{""}} to search for matches from local or remote data sources.
{{! BEGIN-SNIPPET autocomplete.basic-usage }} @@ -47,27 +47,25 @@

Block Custom template

-
Use \{{paper-autocomplete}} with custom templates to show styled autocomplete results.
+
Use {{""}} with custom templates to show styled autocomplete results.
{{!-- searchText=(readonly templateSeachText) --}} {{! BEGIN-SNIPPET autocomplete.block-custom-template }} - {{#paper-autocomplete - placeholder="Type e.g. ember, paper, one, two etc." - options=arrayOfItems - selected=selectedItem - onSelectionChange=(action (mut selectedItem)) - as |item term|}} + - {{paper-icon "star"}} + - {{else}} - Whoops! could not find! - {{/paper-autocomplete}} + {{! END-SNIPPET }} diff --git a/tests/dummy/app/templates/demo/button.hbs b/tests/dummy/app/templates/demo/button.hbs index 25109b48d..3907e9833 100644 --- a/tests/dummy/app/templates/demo/button.hbs +++ b/tests/dummy/app/templates/demo/button.hbs @@ -31,7 +31,7 @@ Fab Mini Mini - {{paper-icon "accessibility"}} +

diff --git a/tests/dummy/app/templates/demo/card.hbs b/tests/dummy/app/templates/demo/card.hbs index 3afe61f46..08bf4e63f 100644 --- a/tests/dummy/app/templates/demo/card.hbs +++ b/tests/dummy/app/templates/demo/card.hbs @@ -31,9 +31,9 @@

- {{paper-icon "favorite"}} - {{paper-icon "settings"}} - {{paper-icon "share"}} + + +
@@ -141,18 +141,18 @@

- {{paper-icon "favorite"}} - {{paper-icon "settings"}} - {{paper-icon "share"}} + + +
- {{paper-icon "favorite"}} - {{paper-icon "settings"}} - {{paper-icon "share"}} + + + @@ -199,8 +199,8 @@ - {{paper-icon "favorite"}} - {{paper-icon "share"}} + + Action 1 Action 2 @@ -234,7 +234,7 @@ Action 1 Action 2 - {{paper-icon "expand-less"}} + diff --git a/tests/dummy/app/templates/demo/chips.hbs b/tests/dummy/app/templates/demo/chips.hbs index 7c0f60a22..dc96cab60 100644 --- a/tests/dummy/app/templates/demo/chips.hbs +++ b/tests/dummy/app/templates/demo/chips.hbs @@ -52,7 +52,7 @@
- paper-contact-chips expects the name, email address and image + {{""}} expects the name, email address and image to be supplied as name, email and image respectively. If your field names differ from these, specify them using the nameField, emailField and imageField diff --git a/tests/dummy/app/templates/demo/dialog.hbs b/tests/dummy/app/templates/demo/dialog.hbs index e05cd42c7..01d7360da 100644 --- a/tests/dummy/app/templates/demo/dialog.hbs +++ b/tests/dummy/app/templates/demo/dialog.hbs @@ -51,7 +51,7 @@ (p-row "fullscreen" "boolean" "Causes the dialog to become fullscreen at smaller breakpoints.") (p-row "opaque" "boolean" "Causes the backdrop to become opaque. Defaults to `true`.") (p-row "clickOutsideToClose" "boolean" "Causes clicking on the backdrop to trigger the `onClose` handler. Defaults to `false`.") - (p-row "focusOnOpen" "boolean" "Causes the initial focus to be on an inner element with the autofocus attribute, rather than the last button inside `{{paper-dialog-actions}}`. Defaults to `true`.") + (p-row "focusOnOpen" "boolean" "Causes the initial focus to be on an inner element with the autofocus attribute, rather than the last button inside ``. Defaults to `true`.") (p-row "escapeToClose" "boolean" "Causes pressing escape to close the dialog. Defaults to `true`.") ) (p-section diff --git a/tests/dummy/app/templates/demo/icons.hbs b/tests/dummy/app/templates/demo/icons.hbs index 13f98777f..f101d022d 100644 --- a/tests/dummy/app/templates/demo/icons.hbs +++ b/tests/dummy/app/templates/demo/icons.hbs @@ -14,7 +14,7 @@

Basic Icons

{{! BEGIN-SNIPPET icons.basic-usage }} - {{paper-icon "check-circle"}} + {{! END-SNIPPET }}
@@ -22,11 +22,11 @@

Changing Sizes

{{! BEGIN-SNIPPET icons.sizes }} - {{paper-icon "check-circle" size=12}} - {{paper-icon "check-circle" size=18}} - {{paper-icon "check-circle" size=24}} - {{paper-icon "check-circle" size=36}} - {{paper-icon "check-circle" size=48}} + + + + + {{! END-SNIPPET }}
@@ -34,8 +34,8 @@

Spinners

{{! BEGIN-SNIPPET icons.spinners }} - {{paper-icon "rotate-right" spin=true}} - {{paper-icon "rotate-left" reverseSpin=true}} + + {{! END-SNIPPET }}
diff --git a/tests/dummy/app/templates/demo/input.hbs b/tests/dummy/app/templates/demo/input.hbs index 10478abc5..ba42cf824 100644 --- a/tests/dummy/app/templates/demo/input.hbs +++ b/tests/dummy/app/templates/demo/input.hbs @@ -202,13 +202,13 @@

Setting validation messages from external validations

- While \{{paper-input}} supplies four + While {{""}} supplies four built-in validation rules and the ability to specify programmed custom validations, some projects need more complicated and elaborate validations, such as are provided by ember-cp-validations or another validation add-on. In this case, the code to validate the user input is outside of - paper-input, and only the resulting messages need be provided to the - \{{paper-input}} helper. + {{""}}, and only the resulting messages need be provided to the + {{""}} helper.

{{! BEGIN-SNIPPET input.external-validations }} diff --git a/tests/dummy/app/templates/demo/list.hbs b/tests/dummy/app/templates/demo/list.hbs index 87a122835..ed476e513 100644 --- a/tests/dummy/app/templates/demo/list.hbs +++ b/tests/dummy/app/templates/demo/list.hbs @@ -59,7 +59,7 @@ Icons {{#each phoneNumbers as |phone|}} - {{paper-icon "phone" class="md-avatar-icon"}} +

{{phone.number}}

{{phone.type}}

@@ -119,21 +119,21 @@ Clickable Items with Secondary Controls - {{paper-icon "network-wifi"}} +

Wi-Fi

- {{paper-icon "bluetooth"}} +

Bluetooth

- {{paper-icon "data-usage"}} +

Data Usage

@@ -146,7 +146,7 @@

{{item.message}}

- {{paper-icon "message"}} +
@@ -162,10 +162,10 @@
- {{paper-icon "email"}} + - {{paper-icon "message"}} +
@@ -197,7 +197,7 @@

Some notes here.

- {{paper-icon "phone"}} +
{{/each}} diff --git a/tests/dummy/app/templates/demo/menu.hbs b/tests/dummy/app/templates/demo/menu.hbs index 5777c34c5..56b9d2f82 100644 --- a/tests/dummy/app/templates/demo/menu.hbs +++ b/tests/dummy/app/templates/demo/menu.hbs @@ -24,20 +24,20 @@ - {{paper-icon "local_phone"}} + {{#each items as |item|}} - {{paper-icon item.icon}} + {{item.title}} {{/each}} - {{paper-icon "adb"}} + This is disabled. @@ -45,7 +45,7 @@ {{#each items as |item|}} - {{paper-icon item.icon}} {{item.title}} + {{item.title}} {{/each}} @@ -77,14 +77,14 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + {{#each items as |item|}} - {{paper-icon item.icon class="md-menu-align-target"}} + {{item.title}} {{/each}} @@ -98,14 +98,14 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + {{#each items as |item|}} - {{paper-icon item.icon class="md-menu-align-target"}} + {{item.title}} {{/each}} @@ -118,7 +118,7 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + @@ -126,19 +126,19 @@ {{#each items as |item|}}

{{item.title}}

- {{paper-icon item.icon class="md-menu-align-target"}} +
{{/each}} {{#each items as |item|}}

{{item.title}}

- {{paper-icon item.icon class="md-menu-align-target"}} +
{{/each}} {{#each items as |item|}}

{{item.title}}

- {{paper-icon item.icon class="md-menu-align-target"}} +
{{/each}}
@@ -181,7 +181,7 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + @@ -200,7 +200,7 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + @@ -219,7 +219,7 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + @@ -260,7 +260,7 @@ - {{paper-icon "local_phone" class="md-menu-origin"}} + diff --git a/tests/dummy/app/templates/demo/sidenav.hbs b/tests/dummy/app/templates/demo/sidenav.hbs index 8a3e9de9b..ba41023d6 100644 --- a/tests/dummy/app/templates/demo/sidenav.hbs +++ b/tests/dummy/app/templates/demo/sidenav.hbs @@ -35,7 +35,7 @@

The left sidenav will "lock open" on a medium (>=960px wide) device. - The right sidenav never "locks open" because we set lockedOpen=false. + The right sidenav never "locks open" because we set @lockedOpen={{false}}.

Left sidenav is {{if leftSideBarOpen "opened" "closed"}}. @@ -80,7 +80,7 @@

Persistent Sidenav

- {{paper-icon "code"}} + @@ -105,7 +105,7 @@

- Another way of using the sidenav is to toggle the lockedOpen state. + Another way of using the sidenav is to toggle the @lockedOpen state. This corresponds to the "persistent sidenav" pattern in the material spec.

diff --git a/tests/dummy/app/templates/demo/speed-dial.hbs b/tests/dummy/app/templates/demo/speed-dial.hbs index 3d35d7f25..9075e5d66 100644 --- a/tests/dummy/app/templates/demo/speed-dial.hbs +++ b/tests/dummy/app/templates/demo/speed-dial.hbs @@ -9,7 +9,7 @@

Basic Usage

- {{paper-icon "code"}} + @@ -25,26 +25,26 @@ - {{paper-icon "menu"}} + - {{paper-icon "people"}} + - {{paper-icon "accessibility"}} + - {{paper-icon "check-circle"}} + @@ -97,7 +97,7 @@

The component can also take a open attribute and an onToggle pair, much like - paper-sidenav. Use the pair to control the open status of the speed dial. + {{""}}. Use the pair to control the open status of the speed dial.

@@ -110,7 +110,7 @@

Advanced Usage

- {{paper-icon "code"}} + @@ -126,26 +126,26 @@ - {{paper-icon "menu"}} + - {{paper-icon "people"}} + - {{paper-icon "accessibility"}} + - {{paper-icon "check-circle"}} + diff --git a/tests/dummy/app/templates/demo/tabs.hbs b/tests/dummy/app/templates/demo/tabs.hbs index a9296ab55..39312ee76 100644 --- a/tests/dummy/app/templates/demo/tabs.hbs +++ b/tests/dummy/app/templates/demo/tabs.hbs @@ -80,7 +80,7 @@

To reinforce this idea, each of the tabs optionally accepts a value - property which needs to match the paper-tabs selected + property which needs to match the {{""}} selected property (see API table below for more info). You don't need to use the value property, though. Each tab is automatically given a value equal to its index. So, your onChange action will start getting integer values if you don't specify any value on the tabs. @@ -106,7 +106,7 @@

Dynamic Usage

- {{paper-icon "code"}} + @@ -212,13 +212,13 @@

Hint: use ember-href-to addon to easily generate - urls for your routes. It plays really well with paper-tabs, - paper-buttons and even paper-items. + urls for your routes. It plays really well with {{""}}, + {{""}}s and even {{""}}s.

Hint: for Ember versions less than 2.15, use the ember-router-service-polyfill addon to easily retrieve - the current route name and use it as the selected value to paper-tabs. + the current route name and use it as the selected value to {{""}}.

diff --git a/tests/dummy/app/templates/demo/toast.hbs b/tests/dummy/app/templates/demo/toast.hbs index b8dedef6e..4f43fea9e 100644 --- a/tests/dummy/app/templates/demo/toast.hbs +++ b/tests/dummy/app/templates/demo/toast.hbs @@ -62,7 +62,7 @@

duration

- {{paper-icon "watch later"}} +
@@ -105,7 +105,7 @@
-

Open a toast via paperToaster service and \{{paper-toaster}} component.

+

Open a toast via paperToaster service and {{""}} component.

Options

diff --git a/tests/dummy/app/templates/demo/toolbar.hbs b/tests/dummy/app/templates/demo/toolbar.hbs index ff186d0e8..f6d4b8d95 100644 --- a/tests/dummy/app/templates/demo/toolbar.hbs +++ b/tests/dummy/app/templates/demo/toolbar.hbs @@ -6,17 +6,17 @@ - {{paper-icon "menu"}} +

Toolbar with Icon Buttons

- {{paper-icon "favorite"}} + - {{paper-icon "more_vert"}} +
@@ -34,7 +34,7 @@ Learn More - {{paper-icon "favorite"}} + diff --git a/tests/dummy/app/templates/demo/tooltip.hbs b/tests/dummy/app/templates/demo/tooltip.hbs index 6c33588f8..55fe69dd6 100644 --- a/tests/dummy/app/templates/demo/tooltip.hbs +++ b/tests/dummy/app/templates/demo/tooltip.hbs @@ -45,25 +45,25 @@ - {{paper-icon "create"}} + Create - {{paper-icon "delete"}} + Delete
- {{#paper-icon "info"}} + Icon tooltip - {{/paper-icon}} +
{{! END-SNIPPET tooltip }}
diff --git a/tests/dummy/app/templates/forms.hbs b/tests/dummy/app/templates/forms.hbs index b95f89fdd..862ddb016 100644 --- a/tests/dummy/app/templates/forms.hbs +++ b/tests/dummy/app/templates/forms.hbs @@ -12,14 +12,14 @@

- ember-paper provides a paper-form to help you build forms + ember-paper provides a {{""}} to help you build forms and keep track of the form's global validity state. This component uses the html form tag by default, so expected form behavior will occur. (For example, pressing the enter key from within one of the form's inputs will submit the form.) - paper-form yields paper-input, - paper-select - and paper-autocomplete controls. + {{""}} yields {{""}}, + {{""}} + and {{""}} controls. In the following example you can see how we use the yielded form controls:

@@ -61,7 +61,7 @@

A typical use case for the global validity state is to toggle the submit button between a disabled and enabled state. Here is how you would do that with - paper-form: + {{""}}:

{{! BEGIN-SNIPPET form.disabled-submit }} @@ -94,7 +94,7 @@

If you prefer, you can trigger the submit action without using a submit button. - paper-form also yields an onSubmit action you + {{""}} also yields an onSubmit action you can use wherever you like, e.g:

           <button onclick=\{{action form.onSubmit}}>