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): update featuresEnabled when switching projects #5787

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

pedrobonamin
Copy link
Contributor

Description

useFeaturesEnabled is using a cache to have a singleton of the features, this is to avoid fetching the features every time we do a request for them.
Once this is fetched, switching workspaces won't update the features, you need to reload the studio.

With this change, the projectId of the workspace id will be added to the Map so the features will be fetched for each projectId.

What to review

Testing

Notes for release

@pedrobonamin pedrobonamin requested a review from a team as a code owner February 19, 2024 11:41
@pedrobonamin pedrobonamin requested review from jtpetty and sjelfull and removed request for a team February 19, 2024 11:41
Copy link

vercel bot commented Feb 19, 2024

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

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Feb 19, 2024 11:48am
studio-workshop 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 11:48am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 11:48am

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Feb 19, 2024

Component Testing Report Updated Feb 19, 2024 11:50 AM (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) 12s 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) 34s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 17s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 3s 18 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

Copy link
Member

@sjelfull sjelfull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pedrobonamin pedrobonamin added this pull request to the merge queue Feb 19, 2024
Merged via the queue into next with commit 32d79a2 Feb 19, 2024
40 checks passed
@pedrobonamin pedrobonamin deleted the edx-1113 branch February 19, 2024 12:20
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.

2 participants