-
Notifications
You must be signed in to change notification settings - Fork 330
feat(plugins): introduce Tags plugin #645
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(plugins): introduce Tags plugin #645
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 08b761d:
|
99905c3
to
201d626
Compare
1f11dc7
to
5ef61ba
Compare
I've enabled the UMD build on prepare so we can import the CodeSandbox artifact as UMD in environments that don't support ESM in Node modules (e.g., Next.js) until the plugin is live. We can revert 2499a5c once we release. |
Reverted the UMD commit now that CodeSandbox has generated one artifact for it. |
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.
In the plugins that extend the AutocompleteContext
, we extend the type this way. We could do the same here? (not entirely related but sometimes I think this strategy doesn't work, and I'm not sure why)
Yes, I tested it with one of the examples and it works 👍 See d434332 |
893d847
to
f6aad73
Compare
This reverts commit 2499a5c.
dc7528b
to
01404f7
Compare
Co-authored-by: François Chalifour <[email protected]>
Globally extending the context has repercussions on the entire project because it applies globally, so an extended context in one package becomes expected in others. Possibly this would cause type issues for users who have several instances of Autocompletre with different plugins. Let's solve this problem in another PR. |
The Autocomplete Tags Plugin allows you to apply and manage a list of tags in your autocomplete.
Tagging is a generic way of representing the concept of refinements for a wide variety of use cases. It ranges from filtering items to navigating in sections, indicating a special state, etc. Users can use them to simply indicate something visually, or derive a new state from them.
Use cases
languages
) and derive Algolia filters from themuiState
, and show them as tags in the Autocomplete UIThe sandbox and tests are in separate PRs:
I've also set up a session with @Shipow this week to take care of the default rendering.