Repository navigation
refactor(theme-common): remove announcement bar id typo retro-compatibility (AI-assisted) - #12706
Merged
Merged
Conversation
…bility (AI-assisted) Site storage keys are namespaced by default since #12619, so the un-namespaced 'annoucement-bar' id stored in 2020 is never read anymore. Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +1.11 kB (+0.01%) Total Size: 12.5 MB 📦 View Changed
ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: +1.11 kB (+0.01%) Total Size: 12.5 MB 📦 View Changed
ℹ️ View Unchanged
|
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.
Motivation
Remove the retro-compatibility code that maps a stored
annoucement-barannouncement bar id toannouncement-bar. It was added in 2020 (#3343) when we fixed a typo in the defaultannouncementBar.id.This code is dead in v4. Since #12619, site storage keys are namespaced by default (
docusaurus.announcement.id-<namespace>), so the old un-namespaced value stored in 2020 is never read.The only edge case is a site with
storage.namespace: falsewhose visitors still have the 2020 typo id stored, and that uses the default id. Those visitors see the announcement bar again once, until they dismiss it. This is negligible.Test Plan
CI. No existing tests covered this code path.
Test links
Deploy preview: https://deploy-preview-12706--docusaurus-2.netlify.app/
Related issues/PRs
(AI-assisted)
🤖 Generated with Claude Code