Repository navigation
Dismiss the style-change snackbar after updating citations - #261
Conversation
After a bibliography's style changes, edit.js shows a snackbar ("Citation
style changed. N citations in this post still use the old style.") with an
Update citations action. Updating from the sidebar panel left that snackbar
on screen next to the result notice, still describing citations that had
just been updated. updateCitations() now removes it by its notice ID before
reporting the result.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPtgA1cnwP9mYKwaWniaFS
|
@codex review Generated by Claude Code |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPtgA1cnwP9mYKwaWniaFS
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #261 +/- ##
=========================================
Coverage 88.68% 88.68%
Complexity 67 67
=========================================
Files 102 102
Lines 10989 10990 +1
Branches 962 962
=========================================
+ Hits 9746 9747 +1
Misses 445 445
Partials 798 798 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What
After a bibliography's citation style changes, the editor shows a snackbar: "Citation style changed. 1 citation in this post still uses the old style." with an Update citations action. If you update from the sidebar's Citations in this post panel instead, that snackbar stayed on screen beside the result ("Updated 1 citation."), still saying the citation used the old style, until it timed out.
updateCitations()insrc/hooks/use-citation-updates.jsnow removes the style-change snackbar (borges-citation-style-{clientId}) before it reports the result, whichever control started the update.Found in
Hands-on QA of the 1.19.0 release zip in WordPress 7.1.4 and Gutenberg 24.3.1: switch a Chicago bibliography to APA, then click Update citations in the panel.
Tests
use-citation-updates.test.js: the notice is removed, and removed before the result notice is created.npm testforsrc/hooksandsrc/edit: 181 tests pass. ESLint and Prettier are clean on the changed files.Generated by Claude Code