-
Notifications
You must be signed in to change notification settings - Fork 94
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
Fixes and additions to editor API #4780
Conversation
3 failed and 2 flaky tests on run #12080 ↗︎
Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
ac6c23b
to
1527f9a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
src/services/SyncService.js
Outdated
@@ -268,6 +268,7 @@ class SyncService { | |||
this.autosave.clear() | |||
} catch (e) { | |||
logger.error('Failed to save document.', { error: e }) | |||
throw e |
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.
I thought I commented that already, but i feel this might be a risky change if the save fails during other code parts calling this method. Can we safeguard that other callers catch this error then and handle it gracefully?
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.
Good point. On the other hand for the API usage it would be really handy to be able to detect failures when saving 🤔
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.
If we can get this in and backported more quickly without the throw e change, I'm fine with postponing this one 😬
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.
I had a look at all occasions of .save()
, .autosave()
and .forceSave()
. Seems to be mostly places where throwing an error should be save. But maybe it's better to remove this potentially dangerous change from this PR that is supposed to be backported and move it to a seperate PR that doesn't get backported.
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.
Did this now.
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.
Looks good besides the one comment
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
90f71d5
to
fb1f4e0
Compare
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.
reviewed and looks good to me.
Did not investigate julius' comment on the trow in SyncService.js
yet. Is that needed / related?
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Signed-off-by: Jonas <jonas@freesources.org>
Ready for review from my side now. |
/backport to stable27 |
/backport to stable26 |
📝 Summary
This is required for Collectives to migrate to the editor API. Changes are separated by commits.
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)