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

Add: TermPicker Component #81

Closed
fabiankaegy opened this issue Jan 18, 2022 · 4 comments
Closed

Add: TermPicker Component #81

fabiankaegy opened this issue Jan 18, 2022 · 4 comments
Assignees

Comments

@fabiankaegy
Copy link
Member

A common pattern that I'm coming across again and again is that we need to override the core UI for a term picker. By default core allows you to choose multiple categories / tags and that is the same for custom post types. However there are many cases where we need to be able to add a term which should be displayed in a radio control so you can only select one item.

This currently is rather cumbersome and not very straightforward. I'd love for us to come up with a nicer developer experience that leads to a better UX across all projects.

@xavortm
Copy link
Member

xavortm commented Mar 3, 2022

I was browsing for some solutions and found this -https://github.com/WordPress/gutenberg/blob/trunk/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js which we can technically copy-paste, add a filter on top, and replace the checkboxes to the radio.

I saw this existing project that does that but with an old codebase: https://github.com/5ally/my-term-selector

Is this close to the idea here?

@fabiankaegy
Copy link
Member Author

@xavortm yes that is exactly what I was thinking. We want the same functionality as the core hierarchical-term-selector just as radio controls

@xavortm
Copy link
Member

xavortm commented Mar 4, 2022

Awesome ^^ I will look into this ticket then 👍 Assigning to myself for now and if there is no update I will comment again here

@xavortm xavortm self-assigned this Mar 4, 2022
@xavortm xavortm mentioned this issue Jul 4, 2022
6 tasks
@xavortm
Copy link
Member

xavortm commented Jul 4, 2022

Maybe that took more than expected but I got to it in the end :D I have opened a draft PR where I am working on a proof of concept that we can tweak later (mainly on how to render visually child categories).

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

Successfully merging a pull request may close this issue.

2 participants