Open koolamusic opened 4 years ago
I'm trying to figure out how this can be implemented.
For now, I found two ways to achieve the goal:
A first minor release that adds a multiple: boolean
prop.
A second major release that ships two components (imported like this: import {CUIAutocomplete, CUIMultipleAutocomplete} from 'chakra-ui-autocomplete'
).
I think that we can implement the minor release splitting the index.tsx
in three different files:
useCombobox()
hook.Autocomplete
component that add the multiple
prop used to switch between the two components.Pro: no breaking changes at first. Cons: complicate typings in minor release.
Like the "incrementally adopted implementation" but without the "minor release step", so just a new major version that ships two components instead of one.
Pro: Simpler to implement. Cons: complete breaking changes.
What do you think?
I'll go for a breaking change, as long as we can provide comprehensive documentation, the other versions of the app provide the compatibility required, because from here on moving forward, this will create the opportunity add features that are relevant to both workflows
Hi everyone, I started working on the CUIAutoComplete
+CUIMultipleAutoComplete
components.
Right now I have a working example that I'm already using in one application.
It's still a big WIP full of copied code and other ugly things, I'll try to fix everything in the next few days.
The branch is here: feat-single-select-combobox
Thanks @it-nalon for taking this up, much appreciated. I reckon when you do get the chance to send a PR we can take a look at it.
Hi everyone, we have done some changes to the CUIAutoComplete
component and we've tested everything all the week.
We need some time to document the new props and add some use cases in the README.
I have also some suggestions: upgrade tsdx to the latest version, add Storybook, change the naming from: "AutoComplete" to "Autocomplete", etc.
Maybe we can make a new branch with a npm package (with also a "next" Github label for iusses) where we can work togheter on this new version of the library. @koolamusic what do you think?
Yeah, you beat me to storybook 😆 . let's create the next
branch and work from there. these changes are welcome. Thanks for all the hard work on this. Much appreciated 🤝
@it-nalon any updates on this. let me know if you need some assistance
@it-nalon any updates on this. let me know if you need some assistance
Hi @koolamusic, sorry for the delay. I'll restart working on this project this weekend. You can check the progress on my branch (or we can merge it here in this repository).
I correctly added Storybook and it works like a charm, just missing the documentation, the tests and the "Example" project in which I found some difficulties to make it run correctly.
We're already using this version in production since 1 month and it works perfectly for now.
Sorry again for the delay!
sure, sounds good to me. What I think we might do is eliminate the examples project in favour of storybook and use that as demo for now until we figure out documentation. I'd prefer codesandbox sample projects and some decent docs atm.
Storybook is important right now as I wrote this for a project I was working on, however to start adding more features in isolation, I think it would be extremely beneficial to adopt storybook from now on-wards.
Meanwhile thanks for all the hard work on this one. Much appreciated
Great!
Should I make a PR on dev
branch o similiar?
I can make it before the weekend with some instructions in the README.md
to run everything, but as I have already said without documentation and tests.
sure. feel free
This will be a wrapper around https://downshift.netlify.app/use-combobox Will document thoughts while at it