elie222 / inbox-zero

Open source email app to reach inbox zero fast.
https://getinboxzero.com
GNU Affero General Public License v3.0
2.53k stars 258 forks source link

compose: multiselect for recipient field #85

Closed ajmalwashere closed 8 months ago

ajmalwashere commented 9 months ago

Added mutiselect for compose recipient field.

using headless ui as planned because shadcn doesn't support multi select in combobox.

i also noticed headless ui combobox doesn't support editable dropdown. we need that for typing or copy pasting email address :) Refer -> (https://github.com/tailwindlabs/headlessui/discussions/1228)

need to decide how to proceed from here for adding editable field -> try workaround or use another component

Xnapper-2024-01-09-05 00 03

vercel[bot] commented 9 months ago

@ajmalwashere is attempting to deploy a commit to the Inbox Zero Team on Vercel.

A member of the Team first needs to authorize it.

elie222 commented 9 months ago

Allow Custom Values doesn't solve the problem? https://headlessui.com/react/combobox#allowing-custom-values

Okay going with another library if HUI doesn't do everything we need.

elie222 commented 9 months ago

Ah, I see that link is mentioned a few times in the issue you linked to. And it's limiting.

Some features we'd want for an email client:

Worth taking a look at alternative libraries that offer this.

elie222 commented 9 months ago

Two potential libraries: https://www.npmjs.com/package/react-select https://www.npmjs.com/package/downshift

ajmalwashere commented 9 months ago

@elie222 I have used the workaround with invisible Combobox.Option.

You give it a try locally and see if its fits all requirements.

I used zod to validate if its valid email

elie222 commented 9 months ago

Great. Thanks!

When no search result is found we should not show the dropdown:

image

For styling, I think we can try without any border shown. Similar to what you have in other email clients. But also will impact on how much we can style Novel editor. If it's limited right now maybe we just keep the other inputs the same style as Novel.

Styling from two other email editors for inspiration: CleanShot 2024-01-09 at 11 15 53@2x CleanShot 2024-01-09 at 11 16 48@2x