Skip to content

[docs] Allow reopening cookie preferences from a URL hash - #49124

Draft
brijeshb42 wants to merge 4 commits into
mui:masterfrom
brijeshb42:docs/reopen-cookie-preferences
Draft

[docs] Allow reopening cookie preferences from a URL hash#49124
brijeshb42 wants to merge 4 commits into
mui:masterfrom
brijeshb42:docs/reopen-cookie-preferences

Conversation

@brijeshb42

@brijeshb42 brijeshb42 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Users currently cannot revisit their cookie choice after dismissing the consent banner. Add support for #cookie-preferences on docs URLs to reopen it on page load, native hash navigation, and Next.js navigation.

The dialog displays the saved preference as “Analytics allowed” or “Essential only,” including it in the accessible description. First-time visitors see no current preference. The saved consent remains active until a choice is made. Selecting either option updates consent and removes the hash while preserving the path, query, and history state, allowing the same link to reopen the banner again. Existing Do Not Track behavior is preserved.

Validation: all 8 focused tests pass, along with ESLint and Prettier checks for the changed files and the core-docs TypeScript check.

@code-infra-dashboard

code-infra-dashboard Bot commented Sep 11, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49124--material-ui.netlify.app/
QR code for https://deploy-preview-49124--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@brijeshb42 brijeshb42 added the scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305). label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: docs-infra Involves the docs-infra product (https://www.notion.so/mui-org/b9f676062eb94747b6768209f7751305).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant