-
Notifications
You must be signed in to change notification settings - Fork 532
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
feat(ts): convert RefinementList component to TypeScript #4702
Conversation
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 90dc9b9:
|
e40a200
to
837dc73
Compare
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.
very impressive!
src/components/RefinementList/__tests__/RefinementListItem-test.tsx
Outdated
Show resolved
Hide resolved
src/components/RefinementList/__tests__/RefinementListItem-test.tsx
Outdated
Show resolved
Hide resolved
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 looks good, but since it's a big pr, let's make sure it's reviewed by someone else too
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.
Massive work. Looks good to me. Thanks Yannick!
something here broke the RatingMenu component, will investigate! edit: unrelated after all #4728 |
Handle the clicks in the RefinementList component (used by RatingMenu) when the clicked element isn't a `HTMLElement`. The fixed behaviour is fairly finicky to reproduce, you need to click exactly on the "star image", if you click between them or on the text, no issue existed before this PR either. The removed check was introduced in #4702, when translating the component to TypeScript. This implements a barebones CTS for RatingMenu, including being fully skipped for React InstantSearch, as the widget doesn't exist.
* fix(RatingMenu): handle clicks in svg Handle the clicks in the RefinementList component (used by RatingMenu) when the clicked element isn't a `HTMLElement`. The fixed behaviour is fairly finicky to reproduce, you need to click exactly on the "star image", if you click between them or on the text, no issue existed before this PR either. The removed check was introduced in #4702, when translating the component to TypeScript. This implements a barebones CTS for RatingMenu, including being fully skipped for React InstantSearch, as the widget doesn't exist. * lint
Summary
Converts the
RefinementList
component to TypeScript