Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: browser storage (localStorage) is unreliable: api should fail-safe #6040

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Dec 2, 2021

Motivation

Storage APIs must be considered as unreliable, and Docusaurus should keep working even if all storage apis throw errors.

See also #6036

Have you read the Contributing Guidelines on pull requests?

yes

Test Plan

only tested locally by making lower-level apis throw => Docusaurus stays accessible

@slorber slorber added the pr: bug fix This PR fixes a bug in a past release. label Dec 2, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 2, 2021
@netlify
Copy link

netlify bot commented Dec 2, 2021

✔️ [V2]

🔨 Explore the source changes: cb46e8d

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61a9013b79c4bc0008672e26

😎 Browse the preview: https://deploy-preview-6040--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Dec 2, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 93
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-6040--docusaurus-2.netlify.app/

@github-actions
Copy link

github-actions bot commented Dec 2, 2021

Size Change: +263 B (0%)

Total Size: 645 kB

Filename Size Change
website/build/assets/js/main.********.js 477 kB +263 B (0%)
ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 38.3 kB
website/build/assets/css/styles.********.css 99.5 kB
website/build/index.html 29.5 kB

compressed-size-action

@slorber slorber merged commit 95f911e into main Dec 2, 2021
@slorber slorber deleted the slorber/fix-announcementBar-storage branch December 2, 2021 18:33
@Josh-Cena Josh-Cena changed the title fix(v2): Browser storage (localStorage) is unreliable: api should fail-safe fix: browser storage (localStorage) is unreliable: api should fail-safe Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants