Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsIf 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. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +91 B (0%) Total Size: 8.68 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. a navigation superseded by the traversal discharges to idle in
|
See #80412.
What?
Migrate the Order by field in
QueryControls, used by the Latest Posts block, toSelectControlfrom@wordpress/ui.Why?
This gives Latest Posts the same dropdown as the other migrated block settings. The field shows the Select placeholder when the current sort is missing or unavailable. See the discussion about missing options.
How?
Match the current sort against the supplied options. Hide the field when the options list is empty and call each sort callback only when its value changes.
Testing Instructions
orderByOptionsto[{"label":"Menu order","value":"menu_order/asc"}]. The field shows Select until you choose Menu order. SetorderByOptionsto[]and check that the field disappears.Testing Instructions for Keyboard
Screenshots
The Latest Posts block's Sorting and filtering settings in Chrome on macOS.
Use of AI Tools
Codex drafted the implementation, browser tests, and PR description.