-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for wildcard events #299
Conversation
package.json
Outdated
@@ -29,6 +29,7 @@ | |||
"js-cookie": "^2.1.4", | |||
"lunr": "^2.3.6", | |||
"moment": "^2.24.0", | |||
"mqtt": "^3.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests failed because mqtt dependency is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the effort and checked: that module is indeed used by the Javascript IoT guide.
- this change should appear in your PR description: without it, it's impossible for reviewers to get why this module has been added
- the package-lock.json file must also be updated (with an up-to-date version of the npm CLI).
- since this is only used to test the documentation, then that module must be installed in the
devDependencies
part of the package.json file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should already be fixed without needing to include the module: https://github.com/kuzzleio/documentation/pull/304/files#diff-594d211f65655f937e62cb7d0f75fb99R16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it should be removed from this project's package.json file.
src/.vuepress/util.js
Outdated
@@ -148,10 +148,10 @@ function sortPagesByOrderAndTitle(p1, p2) { | |||
const o1 = get(p1, 'frontmatter.order', null); | |||
const o2 = get(p2, 'frontmatter.order', null); | |||
|
|||
if ((o1 === null || typeof o1 === 'undefined') && o2) { | |||
if ((o1 === null || typeof o1 === 'undefined') && !isNaN(o2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if o1 or o2 is NaN, then that function returns 1 (because any comparison operation on a NaN value ends up returning false
)
also, I don't get the purpose of that test, what does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both if
serve to check if o1
and o2
are valids. I added !isNaN()
because without that, if o1
or o2
equals to zero, the sorting is broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it, because NaN is not 0
(and what do you mean by broken?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When o2
is equal to zero, the condition consider that o2
is not a valid number. This produce broken sorting of pages because a page with order
set to zero wasn't the first page in the list
…o/documentation into KZL-291-wildcarded-event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, just one sentence to clarify
…o/documentation into KZL-291-wildcarded-event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The package-lock.json
file must be unstaged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple wording issues but apart from that, this looks good to me.
|
||
```javascript | ||
this.pipes = | ||
// listener function will trigger at each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// the listener function is executed every time an
// event is triggered by the "document" controller
|
||
```javascript | ||
this.pipes = | ||
// listener function will trigger after each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beware copy/pasted examples:
// the listener function is executed after every successful
// API action performed by the "document" controller
Co-Authored-By: Yoann-Abbes <[email protected]>
…o/documentation into KZL-291-wildcarded-event
I've restored the package-lock.json to its consistent state after the migration. |
# [3.0.0](https://github.com/kuzzleio/documentation/releases/tag/3.0.0) (2019-06-12) #### Bug fixes - [ [#298](#298) ] Fix bulk import return ([Aschen](https://github.com/Aschen)) - [ [#325](#325) ] Adapt legacy redirection ([Aschen](https://github.com/Aschen)) - [ [#322](#322) ] Fix remaining dead links and add check_link to CI ([Aschen](https://github.com/Aschen)) - [ [#304](#304) ] Fix sdk js tests ([benoitvidis](https://github.com/benoitvidis)) #### New features - [ [#299](#299) ] Documentation for wildcard events ([thomasarbona](https://github.com/thomasarbona)) - [ [#321](#321) ] Add guide about secrets management with the Vault ([Aschen](https://github.com/Aschen)) - [ [#300](#300) ] Add page about bulk:write and bulk:mwrite ([Aschen](https://github.com/Aschen)) #### Enhancements - [ [#327](#327) ] SPA mode ([xbill82](https://github.com/xbill82)) - [ [#324](#324) ] Update Redis version ([Aschen](https://github.com/Aschen)) - [ [#316](#316) ] Sdks authenticated connected props ([Aschen](https://github.com/Aschen)) - [ [#317](#317) ] Add new way for updateSpecifications & validateSpecifications ([thomasarbona](https://github.com/thomasarbona)) - [ [#296](#296) ] Rewrite the Realtime guide ([Aschen](https://github.com/Aschen)) - [ [#301](#301) ] Deprecate realtime join ([Aschen](https://github.com/Aschen)) - [ [#291](#291) ] Getting started React + improve snippetManager ([thomasarbona](https://github.com/thomasarbona)) - [ [#294](#294) ] Add s3 plugin ([Aschen](https://github.com/Aschen)) - [ [#292](#292) ] Add since ([Aschen](https://github.com/Aschen)) - [ [#276](#276) ] [KZL-907] Getting started dev plugin ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#284](#284) ] Extending the JS SDK with controllers ([Aschen](https://github.com/Aschen)) - [ [#271](#271) ] Add documentation page about mappings ([Aschen](https://github.com/Aschen)) #### Others - [ [#314](#314) ] Add a clustering guide ([scottinet](https://github.com/scottinet)) - [ [#319](#319) ] Getting-started-sdk-JS6-architecture ([berthieresteban](https://github.com/berthieresteban)) - [ [#311](#311) ] Add PDF sending example for Request.setResult ([Aschen](https://github.com/Aschen)) - [ [#315](#315) ] Normalize directories and generate redirections ([Aschen](https://github.com/Aschen)) - [ [#309](#309) ] Port #284 to 3-dev ([berthieresteban](https://github.com/berthieresteban)) - [ [#308](#308) ] Port #283 to 3-dev ([berthieresteban](https://github.com/berthieresteban)) - [ [#307](#307) ] Port #282 to 3-dev ([berthieresteban](https://github.com/berthieresteban)) - [ [#306](#306) ] Port #280 to 3-dev ([berthieresteban](https://github.com/berthieresteban)) - [ [#312](#312) ] Port 278 to 3-dev ([Aschen](https://github.com/Aschen)) - [ [#310](#310) ] Port #277 to 3-dev ([Aschen](https://github.com/Aschen)) - [ [#305](#305) ] Port #275 to 3-dev ([Aschen](https://github.com/Aschen)) - [ [#303](#303) ] Port #274 to 3-dev ([Aschen](https://github.com/Aschen)) - [ [#302](#302) ] Port #271 to 3-dev ([Aschen](https://github.com/Aschen)) - [ [#313](#313) ] Port #266 to 3-dev ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#290](#290) ] [KZL-1050] Role template example in the documentation ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#293](#293) ] [KZL-1036] Add available plugins ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#286](#286) ] Embedded protocols ([benoitvidis](https://github.com/benoitvidis)) ---
What does this PR do?
How should this be manually tested?
npm install && npm run dev
Boyscout