-
Notifications
You must be signed in to change notification settings - Fork 516
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
fix(instantsearch): update usage errors #3543
Conversation
Deploy preview for instantsearchjs ready! Built with commit 8e4d858 |
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 of comments/questions but looks good 👍
dc95e39
to
fb9b310
Compare
I applied changes and created short links that guide to the documentation. |
src/lib/InstantSearch.js
Outdated
throw new Error('Widget definition missing render or init method'); | ||
throw new Error(`The widget definition expects a \`render\` and/or an \`init\` method. | ||
|
||
See: http://alg.li/isjs-custom-widgets`); |
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 still think this is going to be hard to manage if the page in the doc gets moved or refactored.
Short is good for bandwidth but it's even harder to grep through pages we moved in the docs now that they are shortened.
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.
At some point we need to make a decision. We've discussed many approaches and didn't come to a conclusion yet.
(1) If we start adopting the shorten-URL pattern, we need to educate the team to connect to short.cm and create a shorter URL. We don't need to update the source code if the link changes but only in the short.cm dashboard. Another negligible plus is that the links are shorter and therefore the bundle size get's slightly lighter.
(2) If we inline all the links, we need to update the source code whenever a link breaks (this was the initial solution of this PR).
(3) If we don't include links, errors are completely meaningless for the users.
I don't mind going for either (1) or (2).
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.
agreed with you Francois, and the links are easiest. Maybe later some way to make it more automatic (e.g. generated from some GitHub file or something, but that wouldn't change too much IMO)
9a6141a
to
8e4d858
Compare
I updated the links to their raw origin (not shortened), waiting for a better strategy for storing and detecting broken links (cc @tkrugg). |
### Bug Fixes * **instantsearch:** update usage errors ([#3543](#3543)) ([a2a800b](a2a800b)) * **searchBox:** add reusable SearchBox component ([#3489](#3489)) ([c073a9a](c073a9a)) ### Features * **panel:** implement collapsed feature ([#3575](#3575)) ([e84b02b](e84b02b)) # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Thu Mar 14 13:53:06 2019 +0100 # # On branch master # Your branch is ahead of 'origin/master' by 54 commits. # (use "git push" to publish your local commits) # # Changes to be committed: # modified: CHANGELOG.md # modified: package.json # modified: src/lib/version.js #
## [3.2.1](v3.1.0...v3.2.1) (2019-03-18) ### Bug Fixes * **connectToggleRefinement:** keep user provided, but falsy values ([#3526](#3526)) ([958a151](958a151)) * **instantsearch:** update usage errors ([#3543](#3543)) ([a2a800b](a2a800b)) * **panel:** append panel body as a child element ([#3561](#3561)) ([3de59a3](3de59a3)) * **poweredBy:** remove TypeScript extension in import ([#3530](#3530)) ([99ecc0b](99ecc0b)), closes [#3528](#3528) * **release:** update doctoc script ([e07c654](e07c654)) * **searchbox:** unmount component on dispose ([#3563](#3563)) ([c3f0435](c3f0435)) * **searchBox:** add reusable SearchBox component ([#3489](#3489)) ([c073a9a](c073a9a)) ### Features * **panel:** implement collapsed feature ([#3575](#3575)) ([e84b02b](e84b02b))
This updates the
InstantSearch
errors, links to the new documentation and add tests.