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(core): move ToastProvider inside LocaleProvider #6145

Draft
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

juice49
Copy link
Contributor

@juice49 juice49 commented Mar 28, 2024

Description

This change fixes a bug that occurs when a Toast component contains a Translate component, because the Translate component now depends on LocaleContext.

Notably, this occurs when some document operations (e.g. publication) succeed.

This is caused by the order of the providers. ToastProvider is a parent of LocaleProvider, but it needs to be a descendant of it. This branch adjusts the order of the providers in order to fix the problem.

What to review

  • We've moved ToastProvider down the tree. It doesn't appear anything further up the tree depends on it. Is that correct?
  • We've moved ErrorLogger down the tree (because it depends on ToastProvider); notably, it is now inside StudioErrorBoundary. Are there any concerns with that?

Testing

  • Existing Studio e2e tests.
  • Manually testing Studio.

Notes for release

  • Fixes a bug that caused Studio to crash if a Translate component appeared inside a Toast component.

Copy link

vercel bot commented Mar 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Mar 28, 2024 5:47pm
test-studio ✅ Ready (Inspect) Visit Preview Mar 28, 2024 5:47pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Mar 28, 2024 5:47pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

Component Testing Report Updated Mar 28, 2024 5:55 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 31s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 13s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 58s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 1s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 20s 9 0 0

@juice49 juice49 marked this pull request as ready for review March 28, 2024 18:47
@juice49 juice49 requested a review from a team as a code owner March 28, 2024 18:47
@juice49 juice49 requested review from rexxars and cngonzalez and removed request for a team March 28, 2024 18:47
@juice49 juice49 marked this pull request as draft March 28, 2024 18:58
@rexxars rexxars removed their request for review December 4, 2024 23:23
@juice49 juice49 force-pushed the next branch 2 times, most recently from 9caf5d8 to 691aad1 Compare January 23, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant