Skip to content

feat(web-app-external): handle Collabora UI_InsertGraphic and UI_InsertFile postMessages#13658

Open
pedropintosilva wants to merge 1 commit intoowncloud:masterfrom
pedropintosilva:feat/collabora-insert-remote-file
Open

feat(web-app-external): handle Collabora UI_InsertGraphic and UI_InsertFile postMessages#13658
pedropintosilva wants to merge 1 commit intoowncloud:masterfrom
pedropintosilva:feat/collabora-insert-remote-file

Conversation

@pedropintosilva
Copy link
Copy Markdown

@pedropintosilva pedropintosilva commented Apr 8, 2026

Add frontend handling for Collabora's remote file insertion and document
comparison features. When oCIS sets EnableInsertRemoteFile and
EnableInsertRemoteImage in the WOPI CheckFileInfo response, Collabora
shows new menu items that send UI_InsertGraphic and UI_InsertFile
postMessages to the parent window.

  • Add Host_PostmessageReady handshake: reply to App_LoadingStatus with
    Host_PostmessageReady so Collabora accepts Action postMessages.

  • Handle UI_InsertGraphic: open a file picker modal filtered to image
    MIME types, resolve the selected file to a signed WebDAV download URL,
    and send Action_InsertGraphic back to the Collabora iframe.

  • Handle UI_InsertFile: read callback and mimeTypeFilter from the
    Collabora message, open the file picker accordingly, and send back
    the appropriate Action (Action_InsertMultimedia or
    Action_CompareDocuments).

  • Create InsertRemoteFileModal.vue: new modal component that embeds the
    oCIS file browser in embed mode, resolves the picked file to a
    download URL via clientService.webdav.getFileUrl(), and calls back
    with { filename, url }.

  • Replace catchClickMicrosoftEdit with a unified handleAppMessage
    listener that handles all app iframe postMessages (UI_Edit,
    App_LoadingStatus, UI_InsertGraphic, UI_InsertFile).

Companion server-side PR: owncloud/ocis#12192

Signed-off-by: Pedro Pinto Silva pedro.silva@collabora.com


  1. pnpm build passes
  2. Manual end-to-end test passed — Compare Document flow worked fully, with tracked changes UI appearing:
ocis-filepicker Screenshot_20260408_134624

and insert images from cloud storage:

image

@update-docs
Copy link
Copy Markdown

update-docs bot commented Apr 8, 2026

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

…rtFile postMessages

Add frontend handling for Collabora's remote file insertion and document
comparison features. When oCIS sets EnableInsertRemoteFile and
EnableInsertRemoteImage in the WOPI CheckFileInfo response, Collabora
shows new menu items that send UI_InsertGraphic and UI_InsertFile
postMessages to the parent window.

- Add Host_PostmessageReady handshake: reply to App_LoadingStatus with
  Host_PostmessageReady so Collabora accepts Action postMessages.

- Handle UI_InsertGraphic: open a file picker modal filtered to image
  MIME types, resolve the selected file to a signed WebDAV download URL,
  and send Action_InsertGraphic back to the Collabora iframe.

- Handle UI_InsertFile: read callback and mimeTypeFilter from the
  Collabora message, open the file picker accordingly, and send back
  the appropriate Action (Action_InsertMultimedia or
  Action_CompareDocuments).

- Create InsertRemoteFileModal.vue: new modal component that embeds the
  oCIS file browser in embed mode, resolves the picked file to a
  download URL via clientService.webdav.getFileUrl(), and calls back
  with { filename, url }.

- Replace catchClickMicrosoftEdit with a unified handleAppMessage
  listener that handles all app iframe postMessages (UI_Edit,
  App_LoadingStatus, UI_InsertGraphic, UI_InsertFile).

Companion server-side PR: owncloud/ocis#12192

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
@pedropintosilva pedropintosilva force-pushed the feat/collabora-insert-remote-file branch from 50f5d95 to 8eeedfc Compare April 8, 2026 12:28
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mmattel mmattel requested review from LukasHirt and mzner April 8, 2026 13:03
@pedropintosilva
Copy link
Copy Markdown
Author

2 workflows awaiting approval

I wonder if the workflow can be approved here

@LukasHirt
Copy link
Copy Markdown
Collaborator

@pedropintosilva thank you for this PR. We're currently in a process of rewriting our CI to GH actions. I would kindly ask you to have a little patience right now. As soon as the E2E tests pipelines are moved to GH action, this PR would need to be rebased and we could then run the workflows. I'll let you know as soon as it is ready.

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.

3 participants