-
Notifications
You must be signed in to change notification settings - Fork 222
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(ts): don't require every attribute to be highlighted #1234
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Haroenv
added a commit
to algolia/instantsearch
that referenced
this pull request
Nov 25, 2020
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0a2581e:
|
francoischalifour
approved these changes
Nov 25, 2020
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
Haroenv
added a commit
to algolia/instantsearch
that referenced
this pull request
Nov 30, 2020
Basically we had two methods to turn a number (or string) into a precision: 1. Math.floor(min * pow) / pow 2. Number(Number(v).toFixed(precision)) these behave different for precision 0 & a number over .5, let's say 1.5 turns into 1 for method 1, and into 2 for method 2. This is a bug (not caught by most of our tests, notably the ones i had to change) and causes the range to change to a number it's not supposed to be. Pay special attention to the new `toPrecision` utility, and the places it was used. At the same time I also converted to TypeScript, but not the components themselves, since that was too much work. typescript for tests is expected to fail until algolia/algoliasearch-client-javascript#1229 is released (since now certain parts aren't random objects, but rather search responses) The version for the helper is bumped for better typescript support as well. update types requires algolia/algoliasearch-client-javascript#1234 update client for fix in typing for tests update assertions in changed tests clarify why behaviour is like it is
Haroenv
added a commit
to algolia/instantsearch
that referenced
this pull request
Dec 2, 2020
* fix(range): consistently convert min & max to numbers Basically we had two methods to turn a number (or string) into a precision: 1. Math.floor(min * pow) / pow 2. Number(Number(v).toFixed(precision)) these behave different for precision 0 & a number over .5, let's say 1.5 turns into 1 for method 1, and into 2 for method 2. This is a bug (not caught by most of our tests, notably the ones i had to change) and causes the range to change to a number it's not supposed to be. Pay special attention to the new `toPrecision` utility, and the places it was used. At the same time I also converted to TypeScript, but not the components themselves, since that was too much work. typescript for tests is expected to fail until algolia/algoliasearch-client-javascript#1229 is released (since now certain parts aren't random objects, but rather search responses) The version for the helper is bumped for better typescript support as well. update types requires algolia/algoliasearch-client-javascript#1234 update client for fix in typing for tests update assertions in changed tests clarify why behaviour is like it is * address feedback * integrate fix from the helper avoiding workaround here
This was referenced Mar 10, 2021
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
we didn't notice this earlier, since in InstantSearch.js we didn't yet update to the version of algoliasearch including the highlighting. The type in algoliasearch is better than the one in InstantSearch though, so we can find a way to switch in the future