Repository navigation
feat!: register direct editors for the mobile apps - #115
Open
juliusknorr wants to merge 3 commits into
Open
juliusknorr wants to merge 3 commits into
juliusknorr wants to merge 3 commits into
Conversation
Mobile apps had to special-case every direct editor to close it, and each editor copied its own helper to send messages to the apps. - registerDirectEditor() exposes the editor's optional hooks (close, insertAsset, focus) as OCA.DirectEditing. close() runs the hook, at most 10 s by default, then always sends `close` and resolves, also on failure. A second call returns the same promise - sendMobileMessage() sends typed messages to Android and iOS, with the payloads documented in the developer manual - Replace the unpublished DirectEditEmit and DirectEditListen classes, which used an interface name and a postMessage listener the apps never implemented - Build with tsc, test with vitest, lint with @nextcloud/eslint-config and use the current organization workflows, like @nextcloud/initial-state. Publish as @nextcloud/directediting Refs: nextcloud/files-clients#137 Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Signed-off-by: Julius Knorr <jus@bitgrid.net> No-test: docs only Assisted-by: ClaudeCode:claude-opus-5-5
juliusknorr
marked this pull request as ready for review
December 2, 2026 08:30
juliusknorr
requested review from
benjaminfrueh,
elzody,
max-nextcloud and
mejo-
December 2, 2026 08:30
The contract belongs to the server's OCP\DirectEditing, so the global mirrors it. Editors like richdocuments handle messages posted to their own page, so a self-posted close would trigger another close. Signed-off-by: Julius Knorr <jus@bitgrid.net> Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Author
|
Also @moodyjmz for review (invited you to the org as well) |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes this library ready to use and publish as
@nextcloud/directediting1.0.0, so direct editors (Text, Collabora Online, Whiteboard, Nextcloud Office) and the mobile apps share one API instead of a special case per editor (files-clients#137).registerDirectEditor()exposes the editor's optional hooks (close,insertAsset,focus) asOCP.DirectEditingfor the mobile apps.close()always ends with theclosemessage, also if saving fails or takes over 10 ssendMobileMessage()replaces the helper every editor copied, typed per message@nextcloud/initial-stateTests: 23 vitest tests, 100% coverage.