Skip to content
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

Tags field #6

Open
5 tasks
stancl opened this issue Jan 2, 2021 · 2 comments
Open
5 tasks

Tags field #6

stancl opened this issue Jan 2, 2021 · 2 comments

Comments

@stancl
Copy link
Member

stancl commented Jan 2, 2021

Styled approximately like this:

Screen Shot 2021-01-02 at 1 59 07

https://play.tailwindcss.com/h18rQ9KCzY

You'd have a selection of tags to add and each tag can be removed by clicking the X button.

This could have some nice integrations with HasMany and JSON field (#5). Sometimes HasMany is used for simple things like these which makes it excessive. If HasMany were used, it would be a good idea to also have an input for adding tags, rather than just having a pre-determined selection of tags.

Also, there should be a good method for customizing how the values are stored. This would allow BelongsToMany support as well as many other things (= any other things).


So, the requirements I see:

  • UI that shows tags and lets you remove them by clicking an X icon on write views
  • Having pre-defined values to select from (using a <select>, or by clicking the fields and making them go from gray to e.g. purple?)
  • An input for adding custom values
  • A method for customizing how it's stored
  • Supporting JSON-encoded arrays and some relations out of the box
@molcsab
Copy link

molcsab commented Jan 5, 2021

This is a must for me

@viezel
Copy link

viezel commented Jan 7, 2021

Tags field are typically divided into 2 categories:

  1. input field to add tags to a model by typing multiple tags (what you are showing)
  2. a search field to find existing tags and apply (without creating new ones)

I would say both could be beneficial for Lean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants