-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add post author selector enhanced with ComboboxControl #23237
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 <[email protected]>
Noticed a weird glitch here (I'm testing on safari), When I click on one of the select options (and before releasing the button), the panel chevron icons on the sidebar move to the right. |
…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=12
Regular dropdown shows.
wp user generate --role=editor --count=10100
Enhanced 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=2
Screenshots
Types of changes
Checklist: