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
Post Terms: Refactor the usePostTerms hook #43503
Conversation
Size Change: -48 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
Thanks for the PR George! What do we gain from this refactor? The sync update is not a big deal I think, but still is something less than here 🤔 |
@ntsekouras, technically this is the right way for fetching terms assigned to a post. We'll also avoid issues like #41847. Unfortunately, I can’t use this method in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks!
284bbac
to
711a19d
Compare
What?
PR refactors the
usePostTerms
hook to usepost
query argument for fetching terms assigned to the post.A minor downside: Since terms are actually assigned after post save, if a block is used in the post editor and terms are assigned via the Document sidebar, they aren't immediately visible in the block.
I don't consider this to be a big issue in this case since the block is meant to be used by templates.
Testing Instructions
The block should work as before.