You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(theme): align CodeSnippets outer tab with Docusaurus storage slot (#1464)
* fix(theme): read code-samples tab from Docusaurus storage slot
CodeSnippets used raw localStorage key docusaurus.tab.code-samples, but
Docusaurus Tabs persist groupId with a namespaced key via createStorageSlot.
Align reads and default tab value; prefer curl when no persisted match.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(theme): use useStorageSlot for code-samples tab persistence
Replace createStorageSlot + window guard with Docusaurus useStorageSlot
for SSR-safe reads and storage reactivity. Memoize mergedLangs and sync
language state when persisted tab or language list changes.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(theme): simplify default language selection in CodeSnippets
Update the default language selection logic in CodeSnippets to always return the first language in the list, removing the preference for "curl" when no match is found. This change streamlines the behavior and ensures a consistent fallback.
---------
Co-authored-by: hieu.h.nguyen <hieu.h.nguyen@opswat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments