Skip to content

feat(theme): Use React context for <Tabs>, allow custom <TabItem> components#11733

Merged
slorber merged 5 commits intomainfrom
slorber/refactor-tabs-with-context
Feb 12, 2026
Merged

feat(theme): Use React context for <Tabs>, allow custom <TabItem> components#11733
slorber merged 5 commits intomainfrom
slorber/refactor-tabs-with-context

Conversation

@slorber
Copy link
Copy Markdown
Collaborator

@slorber slorber commented Feb 12, 2026

Motivation

The theme <Tabs> component implementation was not very flexible to support many composition patterns, assuming that <TabItem> must be a direct child of <Tabs> to work, relying on element.props.value and cloneElement() clunky APIs.

This PR introduces a context for each <Tabs> so that <TabItem> can be wrapped in more flexible ways.

This required some refactoring that also cleans up a bit of this historically complex component. The component can be further simplified / splitted in follow up PRs.

Fix #11672

Test Plan

CI + unit tests + dogfood + Argos

Test links

https://deploy-preview-11733--docusaurus-2.netlify.app/docs/markdown-features/tabs
https://deploy-preview-11733--docusaurus-2.netlify.app/tests/pages/tabs-tests

@slorber slorber requested a review from Josh-Cena as a code owner February 12, 2026 16:30
@slorber slorber added the pr: new feature This PR adds a new API or behavior. label Feb 12, 2026
@meta-cla meta-cla bot added the CLA Signed Signed Facebook CLA label Feb 12, 2026
@slorber slorber added the Argos Add this label to run UI visual regression tests. See argos.yml GH action. label Feb 12, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 12, 2026

[V2]

Name Link
🔨 Latest commit f330eaf
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/698e04e719188300088b9c76
😎 Deploy Preview https://deploy-preview-11733--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 12, 2026

Size Change: +268 B (0%)

Total Size: 11.8 MB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 29 kB 0 B
website/.docusaurus/globalData.json 38.5 kB 0 B
website/.docusaurus/i18n.json 1.36 kB 0 B
website/.docusaurus/registry.js 177 kB 0 B
website/.docusaurus/routes.js 88.2 kB 0 B
website/.docusaurus/routesChunkNames.json 92.2 kB 0 B
website/.docusaurus/site-metadata.json 2.54 kB 0 B
website/build/assets/css/styles.********.css 145 kB 0 B
website/build/assets/js/main.********.js 747 kB 0 B
website/build/assets/js/runtime~main.********.js 39.1 kB 0 B
website/build/blog.html 77.1 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 65.5 kB 0 B
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 44.8 kB +12 B (+0.03%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 49.2 kB 0 B
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 29 kB 0 B
website/build/blog/2019/12/30/docusaurus-2019-recap.html 40 kB -1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 32.6 kB 0 B
website/build/blog/2021/01/19/docusaurus-2020-recap.html 51.4 kB 0 B
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 47.4 kB -1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 48 kB 0 B
website/build/blog/2021/11/21/algolia-docsearch-migration.html 54.2 kB +12 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 43.3 kB 0 B
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 133 kB 0 B
website/build/blog/2022/09/01/docusaurus-2.1.html 50.1 kB -1 B (0%)
website/build/blog/archive.html 23.5 kB 0 B
website/build/blog/authors.html 50.3 kB 0 B
website/build/blog/authors/j-marcey.html 70.2 kB 0 B
website/build/blog/authors/josh-cena.html 46.7 kB 0 B
website/build/blog/authors/lex-111.html 55.5 kB 0 B
website/build/blog/authors/slorber.html 80.6 kB 0 B
website/build/blog/authors/slorber/page/2.html 80.7 kB 0 B
website/build/blog/authors/slorber/page/3.html 82.9 kB 0 B
website/build/blog/authors/slorber/page/4.html 97.4 kB 0 B
website/build/blog/authors/slorber/page/5.html 42.2 kB 0 B
website/build/blog/authors/yangshun.html 66.1 kB 0 B
website/build/blog/authors/zpao.html 47.2 kB 0 B
website/build/blog/page/2.html 77.2 kB 0 B
website/build/blog/page/3.html 80.2 kB 0 B
website/build/blog/page/4.html 87.5 kB 0 B
website/build/blog/page/5.html 62.4 kB 0 B
website/build/blog/page/6.html 38 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 125 kB +4 B (0%)
website/build/blog/releases/2.2.html 50.3 kB 0 B
website/build/blog/releases/2.3.html 60.6 kB 0 B
website/build/blog/releases/2.4.html 64.1 kB 0 B
website/build/blog/releases/3.0.html 105 kB 0 B
website/build/blog/releases/3.1.html 53.1 kB +1 B (0%)
website/build/blog/releases/3.2.html 48.9 kB 0 B
website/build/blog/releases/3.3.html 55.9 kB 0 B
website/build/blog/releases/3.4.html 55.1 kB +7 B (+0.01%)
website/build/blog/releases/3.5.html 57.8 kB +1 B (0%)
website/build/blog/releases/3.6.html 76.1 kB +1 B (0%)
website/build/blog/releases/3.7.html 50.6 kB +1 B (0%)
website/build/blog/releases/3.8.html 85.4 kB 0 B
website/build/blog/releases/3.9.html 60.4 kB 0 B
website/build/blog/tags.html 27.2 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 123 kB 0 B
website/build/docs.html 48.4 kB 0 B
website/build/docs/advanced.html 30 kB 0 B
website/build/docs/advanced/architecture.html 29.5 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 68.5 kB 0 B
website/build/docs/advanced/plugins.html 54 kB 0 B
website/build/docs/advanced/routing.html 69 kB +8 B (+0.01%)
website/build/docs/advanced/ssg.html 73.1 kB 0 B
website/build/docs/api/docusaurus-config.html 227 kB +10 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 44 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 35.5 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 34.6 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 35.8 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 39.4 kB 0 B
website/build/docs/api/misc/@docusaurus/logger.html 38 kB 0 B
website/build/docs/api/misc/create-docusaurus.html 33.1 kB 0 B
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 64 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 58 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 56.4 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 157 kB 0 B
website/build/docs/api/plugin-methods/static-methods.html 43.9 kB +4 B (+0.01%)
website/build/docs/api/plugins.html 32.4 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 58.9 kB +13 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 182 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 188 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 73.3 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 46.7 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 47.3 kB +12 B (+0.03%)
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 48.8 kB +3 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 48.3 kB -4 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 47.2 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 51 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 115 kB +4 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 40 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 64.7 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 45 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 40.3 kB +12 B (+0.03%)
website/build/docs/api/themes.html 29.3 kB 0 B
website/build/docs/api/themes/@docusaurus/theme-classic.html 42.6 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 35.8 kB +2 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 34.6 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 32.4 kB 0 B
website/build/docs/api/themes/configuration.html 246 kB 0 B
website/build/docs/blog.html 198 kB 0 B
website/build/docs/browser-support.html 46.8 kB 0 B
website/build/docs/category/getting-started.html 26.9 kB 0 B
website/build/docs/category/guides.html 35.6 kB 0 B
website/build/docs/cli.html 58.8 kB 0 B
website/build/docs/configuration.html 90.1 kB +7 B (+0.01%)
website/build/docs/create-doc.html 60.3 kB +3 B (0%)
website/build/docs/creating-pages.html 56 kB +1 B (0%)
website/build/docs/deployment.html 210 kB -1 B (0%)
website/build/docs/docs-introduction.html 49.6 kB 0 B
website/build/docs/docs-multi-instance.html 72 kB +4 B (+0.01%)
website/build/docs/docusaurus-core.html 219 kB 0 B
website/build/docs/guides/whats-next.html 32.2 kB 0 B
website/build/docs/i18n/crowdin.html 141 kB +12 B (+0.01%)
website/build/docs/i18n/git.html 75.4 kB +4 B (+0.01%)
website/build/docs/i18n/introduction.html 48.4 kB 0 B
website/build/docs/i18n/tutorial.html 161 kB +4 B (0%)
website/build/docs/installation.html 63.3 kB -2 B (0%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 78.5 kB 0 B
website/build/docs/markdown-features/admonitions.html 115 kB +3 B (0%)
website/build/docs/markdown-features/assets.html 84.9 kB +2 B (0%)
website/build/docs/markdown-features/code-blocks.html 215 kB +7 B (0%)
website/build/docs/markdown-features/diagrams.html 53.8 kB +9 B (+0.02%)
website/build/docs/markdown-features/head-metadata.html 50.2 kB 0 B
website/build/docs/markdown-features/links.html 40.3 kB +1 B (0%)
website/build/docs/markdown-features/math-equations.html 88 kB +4 B (0%)
website/build/docs/markdown-features/plugins.html 93.8 kB +8 B (+0.01%)
website/build/docs/markdown-features/react.html 130 kB 0 B
website/build/docs/markdown-features/tabs.html 137 kB 0 B
website/build/docs/markdown-features/toc.html 81.7 kB +4 B (0%)
website/build/docs/migration.html 38.2 kB +4 B (+0.01%)
website/build/docs/migration/v2.html 38.9 kB 0 B
website/build/docs/migration/v2/automated.html 39.3 kB 0 B
website/build/docs/migration/v2/manual.html 185 kB 0 B
website/build/docs/migration/v2/translated-sites.html 50.1 kB 0 B
website/build/docs/migration/v2/versioned-sites.html 58.9 kB +8 B (+0.01%)
website/build/docs/migration/v3.html 187 kB +2 B (0%)
website/build/docs/playground.html 31.1 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 121 kB +2 B (0%)
website/build/docs/seo.html 86.3 kB +13 B (+0.02%)
website/build/docs/sidebar.html 133 kB +1 B (0%)
website/build/docs/sidebar/autogenerated.html 143 kB 0 B
website/build/docs/sidebar/items.html 170 kB +1 B (0%)
website/build/docs/sidebar/multiple-sidebars.html 60.8 kB +4 B (+0.01%)
website/build/docs/static-assets.html 50.9 kB +4 B (+0.01%)
website/build/docs/styling-layout.html 133 kB +1 B (0%)
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 109 kB +14 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 58.9 kB +4 B (+0.01%)
website/build/docs/using-plugins.html 104 kB 0 B
website/build/docs/versioning.html 89.8 kB -2 B (0%)
website/build/index.html 35.5 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_FASTER

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 12, 2026

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO Report
/ 🔴 42 🟢 98 🟢 100 🟢 100 Report
/docs/installation 🔴 49 🟢 97 🟢 100 🟢 100 Report
/docs/category/getting-started 🟠 71 🟢 100 🟢 100 🟠 86 Report
/blog 🟠 65 🟢 96 🟢 100 🟠 86 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 66 🟢 92 🟢 100 🟢 100 Report
/blog/tags/release 🟠 67 🟢 96 🟢 100 🟠 86 Report
/blog/tags 🟠 66 🟢 100 🟢 100 🟠 86 Report

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 2 changed Feb 12, 2026, 4:59 PM

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 12, 2026

Size Change: +258 B (0%)

Total Size: 12.3 MB

ℹ️ View Unchanged
Filename Size Change
website/.docusaurus/codeTranslations.json 2 B 0 B
website/.docusaurus/docusaurus.config.mjs 29 kB 0 B
website/.docusaurus/globalData.json 38.5 kB 0 B
website/.docusaurus/i18n.json 1.36 kB 0 B
website/.docusaurus/registry.js 177 kB 0 B
website/.docusaurus/routes.js 88.2 kB 0 B
website/.docusaurus/routesChunkNames.json 92.2 kB 0 B
website/.docusaurus/site-metadata.json 2.38 kB 0 B
website/build/assets/css/styles.********.css 137 kB 0 B
website/build/assets/js/main.********.js 749 kB 0 B
website/build/assets/js/runtime~main.********.js 38.8 kB 0 B
website/build/blog.html 79.8 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus.html 67.6 kB 0 B
website/build/blog/2018/04/30/How-I-Converted-Profilo-To-Docusaurus.html 46.7 kB +12 B (+0.03%)
website/build/blog/2018/09/11/Towards-Docusaurus-2.html 51.2 kB 0 B
website/build/blog/2018/12/14/Happy-First-Birthday-Slash.html 30.6 kB 0 B
website/build/blog/2019/12/30/docusaurus-2019-recap.html 41.9 kB -1 B (0%)
website/build/blog/2020/01/07/tribute-to-endi.html 34.2 kB 0 B
website/build/blog/2021/01/19/docusaurus-2020-recap.html 53.5 kB 0 B
website/build/blog/2021/03/09/releasing-docusaurus-i18n.html 49.4 kB -1 B (0%)
website/build/blog/2021/05/12/announcing-docusaurus-two-beta.html 50.1 kB 0 B
website/build/blog/2021/11/21/algolia-docsearch-migration.html 56.5 kB +12 B (+0.02%)
website/build/blog/2022/01/24/docusaurus-2021-recap.html 45.3 kB 0 B
website/build/blog/2022/08/01/announcing-docusaurus-2.0.html 137 kB 0 B
website/build/blog/2022/09/01/docusaurus-2.1.html 52.4 kB -1 B (0%)
website/build/blog/archive.html 24.9 kB 0 B
website/build/blog/authors.html 52.5 kB 0 B
website/build/blog/authors/j-marcey.html 72.8 kB 0 B
website/build/blog/authors/josh-cena.html 48.8 kB 0 B
website/build/blog/authors/lex-111.html 57.9 kB 0 B
website/build/blog/authors/slorber.html 83.5 kB 0 B
website/build/blog/authors/slorber/page/2.html 83.6 kB 0 B
website/build/blog/authors/slorber/page/3.html 85.9 kB 0 B
website/build/blog/authors/slorber/page/4.html 101 kB 0 B
website/build/blog/authors/slorber/page/5.html 44.2 kB 0 B
website/build/blog/authors/yangshun.html 68.8 kB 0 B
website/build/blog/authors/zpao.html 49.3 kB 0 B
website/build/blog/page/2.html 80 kB 0 B
website/build/blog/page/3.html 82.9 kB 0 B
website/build/blog/page/4.html 90.5 kB 0 B
website/build/blog/page/5.html 64.8 kB 0 B
website/build/blog/page/6.html 39.7 kB 0 B
website/build/blog/preparing-your-site-for-docusaurus-v3.html 130 kB -1 B (0%)
website/build/blog/releases/2.2.html 52.5 kB 0 B
website/build/blog/releases/2.3.html 63.1 kB 0 B
website/build/blog/releases/2.4.html 66.8 kB 0 B
website/build/blog/releases/3.0.html 109 kB 0 B
website/build/blog/releases/3.1.html 55.2 kB +1 B (0%)
website/build/blog/releases/3.2.html 51 kB 0 B
website/build/blog/releases/3.3.html 58.3 kB 0 B
website/build/blog/releases/3.4.html 57.4 kB +7 B (+0.01%)
website/build/blog/releases/3.5.html 60.2 kB +1 B (0%)
website/build/blog/releases/3.6.html 79.1 kB +1 B (0%)
website/build/blog/releases/3.7.html 52.9 kB +1 B (0%)
website/build/blog/releases/3.8.html 88.6 kB 0 B
website/build/blog/releases/3.9.html 62.9 kB 0 B
website/build/blog/tags.html 28.9 kB 0 B
website/build/blog/upgrading-frontend-dependencies-with-confidence-using-visual-regression-testing.html 127 kB 0 B
website/build/docs.html 50.3 kB 0 B
website/build/docs/advanced.html 31.5 kB 0 B
website/build/docs/advanced/architecture.html 31 kB +4 B (+0.01%)
website/build/docs/advanced/client.html 71.2 kB 0 B
website/build/docs/advanced/plugins.html 56.2 kB 0 B
website/build/docs/advanced/routing.html 71.6 kB +8 B (+0.01%)
website/build/docs/advanced/ssg.html 76.2 kB 0 B
website/build/docs/api/docusaurus-config.html 235 kB +10 B (0%)
website/build/docs/api/misc/@docusaurus/eslint-plugin.html 46.3 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-html-links.html 37.4 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/no-untranslated-text.html 36.4 kB 0 B
website/build/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading.html 37.6 kB +4 B (+0.01%)
website/build/docs/api/misc/@docusaurus/eslint-plugin/string-literal-i18n-messages.html 41.3 kB 0 B
website/build/docs/api/misc/@docusaurus/logger.html 39.7 kB 0 B
website/build/docs/api/misc/create-docusaurus.html 34.7 kB 0 B
website/build/docs/api/misc/docusaurus-init/index.html 361 B 0 B
website/build/docs/api/plugin-methods.html 66.5 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/extend-infrastructure.html 60.4 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/i18n-lifecycles.html 58.6 kB +4 B (+0.01%)
website/build/docs/api/plugin-methods/lifecycle-apis.html 162 kB 0 B
website/build/docs/api/plugin-methods/static-methods.html 45.8 kB +4 B (+0.01%)
website/build/docs/api/plugins.html 34 kB +4 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-client-redirects.html 61.6 kB +13 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-content-blog.html 190 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-docs.html 196 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-content-pages.html 77 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-css-cascade-layers.html 48.9 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-debug.html 49.5 kB +12 B (+0.02%)
website/build/docs/api/plugins/@docusaurus/plugin-google-analytics.html 51.1 kB +3 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-gtag.html 50.6 kB -4 B (-0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-google-tag-manager.html 49.4 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-ideal-image.html 53.5 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-pwa.html 120 kB +4 B (0%)
website/build/docs/api/plugins/@docusaurus/plugin-rsdoctor.html 42 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-sitemap.html 67.5 kB +6 B (+0.01%)
website/build/docs/api/plugins/@docusaurus/plugin-svgr.html 47.1 kB 0 B
website/build/docs/api/plugins/@docusaurus/plugin-vercel-analytics.html 42.4 kB +12 B (+0.03%)
website/build/docs/api/themes.html 30.8 kB 0 B
website/build/docs/api/themes/@docusaurus/theme-classic.html 44.6 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-live-codeblock.html 37.5 kB +2 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-mermaid.html 36.3 kB +4 B (+0.01%)
website/build/docs/api/themes/@docusaurus/theme-search-algolia.html 34.1 kB 0 B
website/build/docs/api/themes/configuration.html 258 kB 0 B
website/build/docs/blog.html 204 kB 0 B
website/build/docs/browser-support.html 49.1 kB 0 B
website/build/docs/category/getting-started.html 28.4 kB 0 B
website/build/docs/category/guides.html 37.4 kB 0 B
website/build/docs/cli.html 62.2 kB 0 B
website/build/docs/configuration.html 93.6 kB +7 B (+0.01%)
website/build/docs/create-doc.html 62.8 kB +3 B (0%)
website/build/docs/creating-pages.html 58.4 kB +1 B (0%)
website/build/docs/deployment.html 218 kB -1 B (0%)
website/build/docs/docs-introduction.html 51.9 kB 0 B
website/build/docs/docs-multi-instance.html 75.2 kB +4 B (+0.01%)
website/build/docs/docusaurus-core.html 227 kB 0 B
website/build/docs/guides/whats-next.html 34 kB 0 B
website/build/docs/i18n/crowdin.html 146 kB +12 B (+0.01%)
website/build/docs/i18n/git.html 78.6 kB +4 B (+0.01%)
website/build/docs/i18n/introduction.html 50.6 kB 0 B
website/build/docs/i18n/tutorial.html 168 kB +4 B (0%)
website/build/docs/installation.html 66 kB -2 B (0%)
website/build/docs/introduction/index.html 280 B 0 B
website/build/docs/markdown-features.html 81.5 kB 0 B
website/build/docs/markdown-features/admonitions.html 119 kB +3 B (0%)
website/build/docs/markdown-features/assets.html 88.8 kB +2 B (0%)
website/build/docs/markdown-features/code-blocks.html 223 kB +7 B (0%)
website/build/docs/markdown-features/diagrams.html 56.3 kB +9 B (+0.02%)
website/build/docs/markdown-features/head-metadata.html 52.5 kB 0 B
website/build/docs/markdown-features/links.html 42.3 kB +1 B (0%)
website/build/docs/markdown-features/math-equations.html 91.9 kB +4 B (0%)
website/build/docs/markdown-features/plugins.html 97.5 kB +8 B (+0.01%)
website/build/docs/markdown-features/react.html 136 kB 0 B
website/build/docs/markdown-features/tabs.html 143 kB 0 B
website/build/docs/markdown-features/toc.html 85.2 kB +4 B (0%)
website/build/docs/migration.html 40.1 kB -1 B (0%)
website/build/docs/migration/v2.html 40.7 kB 0 B
website/build/docs/migration/v2/automated.html 41.2 kB 0 B
website/build/docs/migration/v2/manual.html 192 kB 0 B
website/build/docs/migration/v2/translated-sites.html 52.3 kB 0 B
website/build/docs/migration/v2/versioned-sites.html 61.3 kB +8 B (+0.01%)
website/build/docs/migration/v3.html 194 kB +2 B (0%)
website/build/docs/playground.html 32.6 kB 0 B
website/build/docs/resources/index.html 325 B 0 B
website/build/docs/search.html 125 kB +2 B (0%)
website/build/docs/seo.html 90.1 kB +13 B (+0.01%)
website/build/docs/sidebar.html 138 kB +1 B (0%)
website/build/docs/sidebar/autogenerated.html 148 kB 0 B
website/build/docs/sidebar/items.html 177 kB +1 B (0%)
website/build/docs/sidebar/multiple-sidebars.html 63.7 kB +4 B (+0.01%)
website/build/docs/static-assets.html 53.3 kB +4 B (+0.01%)
website/build/docs/styling-layout.html 139 kB +1 B (0%)
website/build/docs/support/index.html 319 B 0 B
website/build/docs/swizzling.html 113 kB +14 B (+0.01%)
website/build/docs/team/index.html 310 B 0 B
website/build/docs/typescript-support.html 61.4 kB +4 B (+0.01%)
website/build/docs/using-plugins.html 108 kB 0 B
website/build/docs/versioning.html 93.6 kB -2 B (0%)
website/build/index.html 37.1 kB 0 B

compressed-size-action::DOCUSAURUS_INFRA_SLOWER

@slorber slorber merged commit 2c6b920 into main Feb 12, 2026
46 checks passed
@slorber slorber deleted the slorber/refactor-tabs-with-context branch February 12, 2026 17:28
@akshatsinha0
Copy link
Copy Markdown
Contributor

akshatsinha0 commented Feb 13, 2026

@slorber
I noticed the Details component has a similar compound pattern where collapse state is trapped inside the parent and children can't access it. Would it make sense to apply the same Context + Provider treatment there (useDetails hook, DetailsProvider, etc.)? Potential pr? Do not wanna overenginner it :), coz the browser's native

Details element might already handles show/hide
automatically

@slorber
Copy link
Copy Markdown
Collaborator Author

slorber commented Feb 13, 2026

@akshatsinha0 I'm not sure I understand what you mean exactly, but I'd rather not refactor this Details component at this point because we want to re-implement this later and get closer to the native details behavior.

Our current implementation has issues, and new browser capabilities are deployed to support collapsing animations without JS.

See also #10055

@akshatsinha0
Copy link
Copy Markdown
Contributor

@akshatsinha0 I'm not sure I understand what you mean exactly, but I'd rather not refactor this Details component at this point because we want to re-implement this later and get closer to the native details behavior.

Our current implementation has issues, and new browser capabilities are deployed to support collapsing animations without JS.

See also #10055

Got it, makes sense ; I was thinking about it from the wrong angle. Checked it out, the CSS only approach using ::details-content transitions is different direction.

@juanitosvq
Copy link
Copy Markdown

It looks like this change broke docusaurus-openapi-docs: PaloAltoNetworks/docusaurus-openapi-docs#1395

sserrata added a commit to PaloAltoNetworks/docusaurus-openapi-docs that referenced this pull request Apr 8, 2026
Docusaurus 3.10.0 refactored the internal Tabs system to use React
context (facebook/docusaurus#11733), breaking all custom tab components.

- Replace useTabs(props) with useTabsContextValue(props) + TabsProvider
- Remove cloneElement hidden prop injection (TabItem self-manages via context)
- Consolidate imports to @docusaurus/theme-common/internal (deep lib/ paths
  are now restricted by the package exports field)
- Update ambient type declarations in theme-classic.d.ts
- Bump Docusaurus peerDeps/devDeps to ^3.10.0

Closes #1395

Co-Authored-By: Claude Opus 4.6 <[email protected]>
sserrata added a commit to PaloAltoNetworks/docusaurus-openapi-docs that referenced this pull request Apr 8, 2026
* fix: update Tabs API for Docusaurus 3.10.0 compatibility

Docusaurus 3.10.0 refactored the internal Tabs system to use React
context (facebook/docusaurus#11733), breaking all custom tab components.

- Replace useTabs(props) with useTabsContextValue(props) + TabsProvider
- Remove cloneElement hidden prop injection (TabItem self-manages via context)
- Consolidate imports to @docusaurus/theme-common/internal (deep lib/ paths
  are now restricted by the package exports field)
- Update ambient type declarations in theme-classic.d.ts
- Bump Docusaurus peerDeps/devDeps to ^3.10.0

Closes #1395

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: remove unnecessary cloneElement in non-lazy TabContent

With TabItem now self-managing visibility via context, the
cloneElement call that only injected key was dead weight. Render
children directly instead.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
clementnero added a commit to camunda/camunda-docs that referenced this pull request Apr 12, 2026
…cusaurus 3.10.0 upgrade

@camunda8/docusaurus-theme-openapi-docs 4.6.4 pulls in @docusaurus/* 3.10.0
as transitive dependencies, which introduces a breaking React Context change
in Tabs (facebook/docusaurus#11733) causing SSG failures across all versioned
docs pages (ReactContextError at useDocsPreferredVersionContext).

Additionally, Docusaurus 3.10.0 renamed 'experimental_faster' to 'faster'
in the site config, which is incompatible with 3.9.x.

Pin the OpenAPI packages to exact 4.6.3 and keep Docusaurus at 3.9.2 until
the OpenAPI theme is updated for Docusaurus 3.10.0 compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argos Add this label to run UI visual regression tests. See argos.yml GH action. CLA Signed Signed Facebook CLA pr: new feature This PR adds a new API or behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot extend Tabs and TabItem components

3 participants