Repository navigation
fix: preserve focus across heartbeat re-renders in dashboard widgets - #271
Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
▶ Preview in WordPress PlaygroundBoots a fresh WordPress with this PR's presence-api build, seeds 5 demo users, and drops you on the dashboard. Stress-test variant: 40 demo users · Built from |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
=========================================
Coverage 75.87% 75.87%
Complexity 176 176
=========================================
Files 14 14
Lines 1832 1832
=========================================
Hits 1390 1390
Misses 442 442
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Description
container.html()swaps in Active Posts and Who's Online, restore it after - falling back to the container if the focused item no longer exists.data-post-idto Active Posts rows (Who's Online already haddata-user-id); both containers gettabindex="-1"as the fallback focus target.Fixes #265.
Test plan
npx playwright test --config tests/e2e/playwright.config.js tests/e2e/presence-widgets.test.jsUse of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Investigating the focus-loss cause and writing the e2e tests