formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
119 stars 4 forks source link

Autocomplete API Enhancements #321

Open its-monotype opened 1 month ago

its-monotype commented 1 month ago

In our Electron-based desktop app, I need to implement an autocomplete picker menu that opens when the user presses a button inside a small floating window. Since the window is too small to fit the menu, it should open in a separate window next to the trigger. That's why I want the menu to be open by default, not positioned absolutely. It should either fill the available space or allow for custom size limits.

Additionally, in another part of the app where space is limited, I’m considering a similar approach with a button as a trigger showing the total number of selected items (since multiple selection is required here), clicking the button would open a popup with an autocomplete input and a list of items. I believe this approach would save space compared to using an input field with tags. However, I’m open to other solutions that might be better suited for this scenario.

I'm unsure if Reshaped should support this functionality, or if I should explore using the headless cmdk library (you can see an ex. of how it can be used here) or other custom solutions.

blvdmitry commented 1 month ago

While it might take some time to fully support this, I would probably start with cmdk in case this might block what you plan to build. I will explore the potential api's meanwhile. Do you also have any screenshots or wireframes of what you're building so I can better understand the UI context you're working in?

its-monotype commented 1 month ago

Thank you for your feedback! I’ve attached a rough sketch of the UI. Hopefully, this gives a clearer idea of what I'm aiming for. Let me know if anything needs further explanation. image