From df88aaff3e2a34638f7002134e35cd99d5349f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bryxi=CC=81?= Date: Sun, 2 Jan 2022 09:35:01 +0100 Subject: [PATCH 1/5] chore(readme): explain role of ember-could-get-used-to-this better - Sections should be complete. If I finish `installation` part of README, I should not need to hunt down for anything that might be missing. - Be explicit: Do X, instead of generic description of what is the idea and leave user wondering. - Explicitly mentioned that it's because of _templates_ code --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d704f61b..9c1eb085 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,23 @@ npm install ember-statechart-component yarn add ember-statechart-component ``` +### Optional + +To be able to use XState [`state.matches`](https://xstate.js.org/api/classes/state.html#matches) +method in our templates, +we will first need a `HelperManager` for +handling vanilla functions. +[ember-could-get-used-to-this](https://github.com/pzuraq/ember-could-get-used-to-this) +provides one: + +```bash +ember install ember-could-get-used-to-this +# or +npm install ember-could-get-used-to-this +# or +yarn add ember-could-get-used-to-this +``` + Usage ------------------------------------------------------------------------------ @@ -104,14 +121,6 @@ Usage: ### Matching States -XState provides its own [`matches`](https://xstate.js.org/api/classes/state.html#matches) -method which is available on the `state` object. -We can utilize this provided there exists a `HelperManager` for -handling vanilla functions, such as what -[ember-could-get-used-to-this](https://github.com/pzuraq/ember-could-get-used-to-this) -provides. - - ```hbs {{#if (state.matches 'inactive')}} From 3b99f9854b73634262c597eb6efed208e7c82e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bryxi=CC=81?= Date: Sun, 2 Jan 2022 09:41:37 +0100 Subject: [PATCH 2/5] chore(readme): docs link instead of API link - The docs link provide nice example of the syntax - Hints the dot notation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c1eb085..bcfcdf58 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ yarn add ember-statechart-component ### Optional -To be able to use XState [`state.matches`](https://xstate.js.org/api/classes/state.html#matches) +To be able to use XState [`state.matches`](https://xstate.js.org/docs/guides/states.html#state-matches-parentstatevalue) method in our templates, we will first need a `HelperManager` for handling vanilla functions. From f7221b57366e7936fe3c927b519904c04c80ce7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bryxi=CC=81?= Date: Sun, 2 Jan 2022 15:27:45 +0100 Subject: [PATCH 3/5] chore(readme): replace could-get-used-to-this with functions polyfill --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bcfcdf58..622d64d6 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,15 @@ To be able to use XState [`state.matches`](https://xstate.js.org/docs/guides/sta method in our templates, we will first need a `HelperManager` for handling vanilla functions. -[ember-could-get-used-to-this](https://github.com/pzuraq/ember-could-get-used-to-this) +[ember-functions-as-helper-polyfill](https://github.com/NullVoxPopuli/ember-functions-as-helper-polyfill) provides one: ```bash -ember install ember-could-get-used-to-this +ember install ember-functions-as-helper-polyfill # or -npm install ember-could-get-used-to-this +npm install ember-functions-as-helper-polyfill # or -yarn add ember-could-get-used-to-this +yarn add ember-functions-as-helper-polyfill ``` Usage From f51133dee0a50c1a94ee56b74dc13da19e8a3a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bryxi=CC=81?= Date: Sun, 2 Jan 2022 15:28:43 +0100 Subject: [PATCH 4/5] chore(readme): add link to HelperManagers --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 622d64d6..e59ebc2a 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ yarn add ember-statechart-component To be able to use XState [`state.matches`](https://xstate.js.org/docs/guides/states.html#state-matches-parentstatevalue) method in our templates, -we will first need a `HelperManager` for +we will first need a [HelperManager](https://github.com/emberjs/rfcs/pull/625) for handling vanilla functions. [ember-functions-as-helper-polyfill](https://github.com/NullVoxPopuli/ember-functions-as-helper-polyfill) provides one: From 7168d4ed17900319a61145719bfda9e418d47002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bryxi=CC=81?= Date: Sun, 2 Jan 2022 15:30:09 +0100 Subject: [PATCH 5/5] chore(readme): remove optional sections --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index e59ebc2a..cf8c2bc1 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,6 @@ npm install ember-statechart-component yarn add ember-statechart-component ``` -### Optional - To be able to use XState [`state.matches`](https://xstate.js.org/docs/guides/states.html#state-matches-parentstatevalue) method in our templates, we will first need a [HelperManager](https://github.com/emberjs/rfcs/pull/625) for