-
Notifications
You must be signed in to change notification settings - Fork 109
Decompose SyncService #7381
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
Decompose SyncService #7381
Conversation
b612877 to
8fff080
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7381 +/- ##
==========================================
- Coverage 59.51% 59.43% -0.09%
==========================================
Files 486 492 +6
Lines 37382 37347 -35
Branches 1097 1087 -10
==========================================
- Hits 22247 22196 -51
- Misses 15029 15045 +16
Partials 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
881eb9b to
639b1f4
Compare
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
abf037d to
9556db5
Compare
Signed-off-by: Max <[email protected]>
6d006cf to
538d9ad
Compare
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
538d9ad to
c3230d3
Compare
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
Signed-off-by: Max <[email protected]>
13fa2af to
9ea9857
Compare
mejo-
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice work 🎉
|
Commit 94f7619 seems to break mounting the text editor, for example, editing cards in Deck with links in it. Related error messages: ProblemFor some reason, provide is not working despite Refactoring the code to just use a variable makes it work again. Temporary fixdiff --git a/src/composables/useEditor.ts b/src/composables/useEditor.ts
index e9d3fe439..28b2932d3 100644
--- a/src/composables/useEditor.ts
+++ b/src/composables/useEditor.ts
@@ -6,14 +6,15 @@
import { Editor } from '@tiptap/core'
import { inject, type InjectionKey, provide } from 'vue'
+let globalEditor: Editor | undefined
+
export const editorKey = Symbol('tiptap:editor') as InjectionKey<Editor>
export const provideEditor = (editor: Editor) => {
- provide(editorKey, editor)
+ globalEditor = editor
}
export const useEditor = () => {
- const editor = inject(editorKey)
- if (!editor) {
+ if (!globalEditor) {
throw new Error('Failed to inject Editor')
}
- return { editor: editor as Editor }
+ return { editor: globalEditor! }
} |
|
@st3iny Thanks a lot for investigating! I'd prefer to explicitly provide editor in the component that uses the composable instead - do you think that would work as well? |
I tried inlining the There is something wrong inside Vue. |
SyncService does way too many things.
Split it until we only have a minimal sync service for the provider left.
Preparation for moving to y-http provider.