Skip to content

Add loading indicator for type-ahead suggestions - #1029

Merged
dkotter merged 11 commits into
WordPress:developfrom
prasadkarmalkar:feat/type-ahead-loading-indicator
Sep 18, 2026
Merged

dkotter merged 11 commits into
WordPress:developfrom
prasadkarmalkar:feat/type-ahead-loading-indicator

Conversation

@prasadkarmalkar

@prasadkarmalkar prasadkarmalkar commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What?

Closes #791

Why?

Adds a "breathing dots" loading indicator, next to the text caret, that shows while a type-ahead suggestion request is in progress in the Type Ahead feature.

How?

  • Created a new component TypeAheadLoadingIndicator which renders the three dots breathing indicator in editor iframe using createPortal
  • It uses the same caret DOMRect that the ghost-text overlay already uses, following the existing useCaretData/ownerDocument pattern in this codebase.
  • Added a isLoading indicator in useTypeAheadSuggestion hook, Which is set true for the duration of a request and cleared on success, error, cancellation, and on the existing request timeout.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Creating a POC, comments and reviewing the code. All the code changes are self-reviewed as well.

Testing Instructions

  1. Enable the Type Ahead experiment and open a core/paragraph block.
  2. Type text that triggers a suggestion (auto debounce, or Ctrl/Cmd+Space for manual trigger) and confirm the three dots appear near the caret while the request is pending, then disappear once the ghost text/suggestion renders.
  3. Trigger a request and quickly continue typing/move the caret away. Confirm the indicator disappears and doesn't get stuck.

Screenshots or screencast

Screen.Recording.2026-09-14.at.7.30.49.PM.mov

Changelog Entry

Added - Loading indicator for type-ahead suggestion requests.

Open WordPress Playground Preview

@prasadkarmalkar
prasadkarmalkar requested a review from a team September 14, 2026 14:03
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

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: prasadkarmalkar <prasadkarmalkar@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

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

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.72%. Comparing base (12417cb) to head (fe829e3).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #1029   +/-   ##
==========================================
  Coverage      80.72%   80.72%           
  Complexity      2998     2998           
==========================================
  Files            124      124           
  Lines          11978    11978           
==========================================
  Hits            9669     9669           
  Misses          2309     2309           
Flag Coverage Δ
unit 80.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter dkotter added this to the 1.4.0 milestone Sep 15, 2026
Comment thread src/experiments/type-ahead/components/TypeAheadLoadingIndicator.tsx
Comment thread src/experiments/type-ahead/components/TypeAheadBlock.tsx
Comment thread src/experiments/type-ahead/components/TypeAheadBlock.tsx
Comment thread src/experiments/type-ahead/components/TypeAheadLoadingIndicator.tsx Outdated
Comment thread src/experiments/type-ahead/components/TypeAheadLoadingIndicator.tsx Outdated
@dkotter
dkotter merged commit 5d0efa5 into WordPress:develop Sep 18, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add loading animation/custom cursor for Type Ahead

2 participants