Add post author selector enhanced with ComboboxControl#23237
Add post author selector enhanced with ComboboxControl#23237youknowriad merged 84 commits intomasterfrom
Conversation
|
Size Change: -179 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
92a876a to
d679caa
Compare
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
packages/editor/src/components/post-author/enhanced-post-author.js
Outdated
Show resolved
Hide resolved
…r.js Co-authored-by: Enrique Piqueras <epiqueras@users.noreply.github.com>
…enberg into add/7385-author-combobox-2
Does it also affect the font size dropdown selector where the combobox is already used? |
|
No, it only affects the author control, that said the font size one is not a ComboboxControl, it's a CustomSelectControl. |
Oh, I see now. I thought previously that the selector used |
|
For a first accessibility feedback, please see this comment on the related PR for the Page parent combobox: #25267 (comment) |
|
@afercia I took a pass at starting implementing the author selector using the same component the tag autocomplete selector uses: It sort of works and illustrates some of the fundamental UX differences here:
Given the fact that this component already has excellent accessibility, does it seem worth trying to extend the underlying component to better fit our use case? |
|
@adamsilverstein thanks for further exploring this issue! Well if you ask me, I see a value in abstracting the Gutenberg combobox (auto-completer) implementation and make it more reusable, not only for internal usage but also for usage by plugins. I think I mentioned this a few times in other issues 🙂 As per the technical side, I'm afraid I don't have the skills to be of help with coding.
Using a native |
|
I updated this to use the new ComboboxControl. |
|
I think we can explore isLoading prop on a separate PR to get it right. |
|
🎉 Thank you @youknowriad for working on this. I'll give this final version a test to see if I notice any issues. I have been working on these selectors for a long time (years?!) so it is really exciting to see this get fixed! |
|
Confirming this works well in my test, excited to see this land! |
@afercia We addressed this in #26426 for the post author selector (and I plan to do the same for the page parent selector soon). Thanks again for all your guidance on this issue. |
Description
Add accessible search with debounced api requests for the post author dropdown.
Built on the ComboBox being added in #19657 which relies on Downshift.
Supersedes #7385.
How has this been tested?
wp user generate --role=editor --count=12Regular dropdown shows.
wp user generate --role=editor --count=10100Enhanced selector shows. Typing will begin searching in the selector.
Note: to clear out generated users, I used
wp user delete $(wp user list --role=editor --field=ID) --reassign=2Screenshots
Types of changes
Checklist: