Repository navigation
Fix Site Information plugin list flicker during REST load - #7
Merged
Merged
Conversation
Defer rendering DOM-detected plugin counts until the lazy site-info fetch completes, so the panel shows a stable loading state instead of jumping from partial to final counts. Extract merge helpers to lib/site-info.js and add smoke coverage. Fixes WordPress#5
Use a synchronous ref guard so Collapsible cannot start overlapping GET_SITE_INFO requests before setLoading(true) applies. Snapshot DOM context at fetch start, hide theme/plugins until the request settles, and show one panel-level loading state to stop count and layout flicker. Fixes WordPress#5
# Conflicts: # dist/popup.css # dist/popup.js
jakemgold
previously approved these changes
Jun 6, 2026
jakemgold
left a comment
Collaborator
There was a problem hiding this comment.
Verified end-to-end:
- Local merge with current main (post PR #14 + #16) — only conflict was dist/ artifacts, resolved by taking main's version (rebuilt anyway)
npm run build— cleannpm test --prefix test— all green, including the new mergePlugins / mergeTheme scenariosnpm run package:chromeandnpm run build:safari— both succeed, layouts correct
The synchronous fetchStartedRef guard plus the snapshot-at-fetch-time is the right shape for the race that caused the flicker. Empty pluginRows during loading also prevents the partial-data flash. Thanks @itzmekhokan.
jakemgold
approved these changes
Jun 6, 2026
jakemgold
left a comment
Collaborator
There was a problem hiding this comment.
Re-approving after pushing the main-merge conflict resolution (dist/ artifacts). Verification still stands: build clean, all tests pass, packaging works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5 — the Site Information tab showed partial DOM-detected plugin counts (e.g.
4 plugins) while REST data was still loading, then jumped to the final count (e.g.18 plugins) and caused visible UI flicker.GET_SITE_INFOfetch completes.Pluginslabel with aLoading…hint during fetch; only show the count once data is final.mergePlugins/mergeThemeintolib/site-info.jswith smoke tests.Test plan
cd test && npm install && npm test(smoke + site-info merge tests)npm run build