Skip to content

Dismiss the style-change snackbar after updating citations - #261

Merged
dknauss merged 2 commits into
mainfrom
fix/citation-notice
Nov 7, 2026
Merged

dknauss merged 2 commits into
mainfrom
fix/citation-notice

Conversation

@dknauss

@dknauss dknauss commented Nov 7, 2026

Copy link
Copy Markdown
Owner

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() in src/hooks/use-citation-updates.js now 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

  • New unit test in use-citation-updates.test.js: the notice is removed, and removed before the result notice is created.
  • npm test for src/hooks and src/edit: 181 tests pass. ESLint and Prettier are clean on the changed files.
  • CHANGELOG: an entry under Unreleased > Fixed.

Generated by Claude Code

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

dknauss commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

@codex review


Generated by Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T00:49:38.016973Z a5c5c05 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a5c5c05f3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.68%. Comparing base (898d5e4) to head (fa74b12).

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.
📢 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.

@dknauss
dknauss merged commit ac79453 into main Nov 7, 2026
22 checks passed
@dknauss
dknauss deleted the fix/citation-notice branch November 7, 2026 16:32
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.

2 participants