-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove "Add New" for shadow taxonomies #45
base: trunk
Are you sure you want to change the base?
Conversation
Tagging @jeremyfelt for visibility. |
@s3rgiosan Thank you for the pull request! I took a look and was having a bit of trouble when a shadow taxonomy had more than somewhere around 5 terms. At that point, the UI shifts in the block editor and adds the search box above the list. Removing the I started poking around at a way to work around it, but then it hit me that we may be able to use capabilities instead. In #46, I've changed the taxonomy registration so that the Can you take a look at that and let me know if it works for your use case? Separately, I'm intrigued by https://github.com/happyprime/shadow-terms/pull/45/files#diff-88cbf32328b8063e81b548feddc5e234b8a1b7593b71560b31dc300f52151284R260-R284 in your PR, which adds a shadow taxonomy identifier in REST responses. Is that something that would be useful as a whole? Thanks! |
Absolutely. I'll test it out asap.
I have a use case where the block editor, with its blocks and term selection panels, doesn't align well with the whole editing experience. In order for this to work, I had to integrate in the block some of the logic we have in PHP. For example, determining if a taxonomy is a shadow taxonomy or not. I believe that exposing some of that logic in the REST responses, would simplify this kind of development. |
Hi @jeremyfelt
I tested out in my local environment and with more than 5 terms I get the search box above the term list, and no "Add New" button, with both my PR and yours #46 For comparison: ![]()
![]()
![]() Your approach feels way less hacky than mine 🚀🙌 Please don't hesitate to close my PR if you don't see a need for https://github.com/happyprime/shadow-terms/pull/45/files#diff-88cbf32328b8063e81b548feddc5e234b8a1b7593b71560b31dc300f52151284R260-R284 |
I actually need some additional information in those REST endpoints to avoid having logic in the blocks that can be provided in PHP. I'm going to work on that and update this PR. |
This pull request addresses this #20