From 485a6b95219295ebeff6bcf7a16047641ffbc32c Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Fri, 20 Nov 2020 15:51:37 -0500 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20pull=20up=20loading?= =?UTF-8?q?=20and=20route=20action=20helper=20to=20core?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addons/core/README.md | 18 ++++++++++++------ addons/core/package.json | 4 +++- ui/admin/package.json | 2 -- ui/desktop/package.json | 2 -- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/addons/core/README.md b/addons/core/README.md index 3f84d7d03..2822b86f7 100644 --- a/addons/core/README.md +++ b/addons/core/README.md @@ -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 diff --git a/addons/core/package.json b/addons/core/package.json index 48f317151..89a46d94b 100644 --- a/addons/core/package.json +++ b/addons/core/package.json @@ -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", diff --git a/ui/admin/package.json b/ui/admin/package.json index d82c9b05f..f22c4b039 100644 --- a/ui/admin/package.json +++ b/ui/admin/package.json @@ -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", diff --git a/ui/desktop/package.json b/ui/desktop/package.json index e3b102fde..6069c5ed2 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -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",