Editor: Try displaying intermediate results for hierarchical terms#71402
Editor: Try displaying intermediate results for hierarchical terms#71402
Conversation
packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js
Show resolved
Hide resolved
|
Size Change: +73 B (0%) Total Size: 1.93 MB
ℹ️ View Unchanged
|
fa4e220 to
2936006
Compare
|
Flaky tests detected in 2936006. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17376205938
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @websupporter, @Widhy980, @ActionCoding, @MartinHlavna, @SuzuKube, @psokolovs, @drawcard, @amrutadotorg, @vijayrnathan, @zaidiseed, @gwwar, @jfdialogs, @bozzmedia, @nickstarkloff, @Blastbeater, @cherrygot-personal, @simonefontana, @apatwary12, @tecnogaming. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
2936006 to
b475aa6
Compare
t-hamano
left a comment
There was a problem hiding this comment.
This approach works very well in my testing:
3cc06f9ad4c0ad2fc9549f779f817e23.mp4
I'm curious to see if this approach can be adopted for other queries with per_page: -1.
packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js
Outdated
Show resolved
Hide resolved
b475aa6 to
2b6b96d
Compare
|
Thanks for the review, @t-hamano! |
|
Okay, let's give this a try. |
…ordPress#71402) Unlinked contributors: designsimply, websupporter, Widhy980, ActionCoding, MartinHlavna, SuzuKube, psokolovs, drawcard, amrutadotorg, vijayrnathan, zaidiseed, gwwar, jfdialogs, bozzmedia, nickstarkloff, Blastbeater, cherrygot-personal, simonefontana, apatwary12, tecnogaming. Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: danielbachhuber <[email protected]> Co-authored-by: oxyc <[email protected]> Co-authored-by: megane9988 <[email protected]> Co-authored-by: torounit <[email protected]> Co-authored-by: T4ngml <[email protected]> Co-authored-by: annezazu <[email protected]> Co-authored-by: jhmonroe <[email protected]> Co-authored-by: swissspidy <[email protected]> Co-authored-by: dmsnell <[email protected]>
|
I think we should paginate all these unbound requests and make it sortable/filterable. Maybe a tiny data views. |
|
That would be great, but I think it's a bit more challenging with hierarchical entities, where data needs to be rendered as a tree. How do you build a correct hierarchy if, for example, children of an item on |
|
This is great @Mamaduka - I feel like we can use a similar approach to improve the loading of Notes, what do you think? |
What?
Closes #10169.
Previous work #29393.
Depends on #71401.
PR updates the query in the
HierarchicalTermSelectorcomponent to start displaying intermediate results as it fetches all terms. The search and "create new term" fields aren't displayed while fetching is still in progress.Why?
Improves the perceived performance of the hierarchical terms panel by starting rendering it early. Waiting for the full, unbound query to finish can take a couple of seconds, depending on the number of terms.
How?
This is possible thanks to the new private
RECEIVE_INTERMEDIATE_RESULTSquery option (#66713).Testing Instructions.
wp term generate category --count=5000 --max_depth=3.Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2025-08-29.at.15.10.27.mp4