Skip to content
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/combobox loading spinner author part #68991

Open
wants to merge 12 commits into
base: trunk
Choose a base branch
from

Conversation

adamsilverstein
Copy link
Member

@adamsilverstein adamsilverstein commented Jan 31, 2025

What?

Add a loading indicator to the author dropdown. Fix a bug where it was impossible to tell a search was occuring, leating to poor UX especially over slower connections.

Follow up to #68990

Post author part of #68927

Testing instructions

  1. Create a large number of editors (see below for command).
  2. Load a page in the editor
  3. Open DevTools and throttle network connections to a 3G speed to slow down the rest API responses
  4. Click the author to edit, then try typing in part of a user name

Expected results:

  • A spinner is shown while the search callback executes
  • the "No items found' string only shows when the search completes (and no items are found)

Helpful wp-cli commands for testing:

Generate many users to test searching: wp user generate --role=editor --count=100
Delete test users: wp user delete $(wp user list --role=editor --field=ID) --reassign=2

Screencasts

Before changes (trunk)

before2.mp4

Add spinner

(note message "No items found" shows during search callback)

spinner-only.mp4

Final PR

(including removal of "No items found" during load)

after.mp4

Copy link

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: adamsilverstein <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@adamsilverstein adamsilverstein added [Type] Bug An existing feature does not function as intended Needs Design Feedback Needs general design feedback. [Package] Components /packages/components labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant