refactor: 💡 pull up loading and route action helper to core

This commit is contained in:
Randall Morey committed 2020-11-20 15:51:37 -05:00
1 parent be816f38e6
commit 485a6b9521
4 files changed
+15 -11

No files matched your search

+12 -6
View File
@@ -28,17 +28,13 @@ Add this addon to an Ember application's `devDependencies` as:
See monorepo README for installation instructions.
To use internationalization features, install `ember-intl` into your project:
`ember install ember-intl`.
## I18n
To access translations within a template, see `ember-intl` docs.
## Notifications
To use in-app notifications, first install `ember-notify` in your app. Then use
the notificaiton decorators to notify the user when a function or action
Use notificaiton decorators to notify the user when a function or action
succeeds or fails. For example:
```js
@@ -100,7 +96,17 @@ Ember config (see admin). Then reference doc links by keys:
## Loading Helper
To make use of the `is-loading` helper, install `ember-loading` first.
See admin and desktop routes and templates for examples of how to
use the loading subsystem. For example, to annotate that an async action should
present a loading indicator to a user:
```js
@action
@loading
async myAction() {
// ...do potentially time-consuming task
}
```
## Yarn Commands
+3 -1
View File
@@ -32,7 +32,9 @@
"ember-cli-htmlbars": "^5.2.0",
"ember-intl": "^5.5.0",
"ember-notify": "^6.0.0",
"ember-page-title": "^6.0.3"
"ember-page-title": "^6.0.3",
"ember-loading": "^0.4.0",
"ember-route-action-helper": "^2.0.8"
},
"devDependencies": {
"@ember/optional-features": "^1.3.0",
-2
View File
@@ -61,12 +61,10 @@
"ember-export-application-global": "^2.0.1",
"ember-inline-svg": "^1.0.0",
"ember-load-initializers": "^2.1.1",
"ember-loading": "^0.4.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-modifier": "^2.1.1",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-route-action-helper": "^2.0.8",
"ember-source": "~3.20.2",
"ember-template-lint": "^2.14.0",
"eslint": "^7.5.0",
-2
View File
@@ -56,12 +56,10 @@
"ember-export-application-global": "^2.0.1",
"ember-inline-svg": "^1.0.0",
"ember-load-initializers": "^2.1.1",
"ember-loading": "^0.4.0",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-modifier": "^2.1.1",
"ember-qunit": "^4.6.0",
"ember-resolver": "^8.0.0",
"ember-route-action-helper": "^2.0.8",
"ember-source": "~3.20.2",
"ember-template-lint": "^2.14.0",
"eslint": "^7.5.0",