-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
move context methods into hooks #2450
move context methods into hooks #2450
Conversation
🦋 Changeset detectedLatest commit: f60b0c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
f35d370
to
eaa9160
Compare
Codecov Report
@@ Coverage Diff @@
## main #2450 +/- ##
==========================================
+ Coverage 65.70% 69.60% +3.89%
==========================================
Files 85 71 -14
Lines 5106 4392 -714
Branches 1631 1455 -176
==========================================
- Hits 3355 3057 -298
+ Misses 1747 1330 -417
- Partials 4 5 +1
Continue to review full report at Codecov.
|
eaa9160
to
f60b0c8
Compare
The latest changes of this PR are not available as canary, since there are no linked |
This came up through #2442. Using contexts in other context providers restricts us to render context providers in a specific order and could cause conflicts if everything is put into context values. It's much more flexible to have individual hooks that consume all the necessary contexts themselves and use these in the components.
This PR extracts the methods we currently moved to the editor context into hooks, namely
copy
,merge
,prettify
, andautoCompleteLeads
. This removes the dependency of theEditorContext
on theSchemaContext
, i.e. we don't need to calluseSchemaContext
in theEditorContextProvider
anymore.