Skip to content

Feature add Send_UNO_Command postMessage#6099

Merged
pedropintosilva merged 1 commit intoCollaboraOnline:masterfrom
pmzi:feature-add-send-uno-command-post-message
Apr 3, 2023
Merged

Feature add Send_UNO_Command postMessage#6099
pedropintosilva merged 1 commit intoCollaboraOnline:masterfrom
pmzi:feature-add-send-uno-command-post-message

Conversation

@pmzi
Copy link
Copy Markdown
Contributor

@pmzi pmzi commented Mar 26, 2023

  • Target version: master

Summary

We needed to execute UNO commands using postMessage from outside of the iframe, in order to add some custom UI and custom functionality. So, because executing UNO commands (especially with arguments like InsertBookMark) was not supported, we decided to add it as a general feature.

I have updated the framed.doc.html file, I don't know if there is any file or documentation I should update for this PR. If any, please mention it and I will update it. framed.doc.html preview:

Screen Shot 2023-03-26 at 9 01 21 AM

This is also our use case that uses .uno:InsertBookMark UNO command:

Screen Shot 2023-03-26 at 8 14 55 AM

Our code is to add a sharing feature inside Collabora using custom-added buttons (using Insert_Button postMessage). We listen to the buttons' clicks and then we want to add a custom bookmark on the text (using UNO commands). (PR: BurnaSmartLab/osjs-office-collabora#4)

I have also run the code and tested it using Gitpod.

Checklist

  • Code is properly formatted
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@welcome
Copy link
Copy Markdown

welcome Bot commented Mar 26, 2023

Thanks for opening this pull request!

Things that will help get your PR across the finish line:

@pmzi pmzi force-pushed the feature-add-send-uno-command-post-message branch from f5981df to 78b36e7 Compare March 26, 2023 05:10
Signed-off-by: Pouya Mozaffar Magham <pouya.mozafar@gmail.com>
Change-Id: I465293b1d2d4bdc25b237a8a7054bf428543464b
@pmzi pmzi force-pushed the feature-add-send-uno-command-post-message branch from 78b36e7 to 271734b Compare March 26, 2023 05:12
@pmzi pmzi marked this pull request as ready for review March 26, 2023 05:39
@pedropintosilva
Copy link
Copy Markdown
Contributor

related to #6099

Copy link
Copy Markdown
Contributor

@eszkadev eszkadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@pedropintosilva
Copy link
Copy Markdown
Contributor

Merging this change doesn't affect ui tests for that matter, thank you so much @pmzi ! 🥳

@pedropintosilva pedropintosilva merged commit 75219b5 into CollaboraOnline:master Apr 3, 2023
@welcome
Copy link
Copy Markdown

welcome Bot commented Apr 3, 2023

Thanks a lot for your contribution, and congrats on your first pull request merged! Welcome aboard! 🎉🎉🎉

If you haven't decided on your next task yet, take a look at our easy-hacks. We're looking forward to your next pull request! :)

@mmeeks
Copy link
Copy Markdown
Contributor

mmeeks commented Apr 3, 2023

Lets get this back-ported to 22.05 as well if we can - thanks for the feature ! useful for Cypress testing too =)

@timar
Copy link
Copy Markdown
Member

timar commented Apr 5, 2023

FWIW I updated https://sdk.collaboraonline.com/docs/postmessage_api.html
I'll do the co-22-05 backport.

@pedropintosilva
Copy link
Copy Markdown
Contributor

Thank you @timar !

@pmzi
Copy link
Copy Markdown
Contributor Author

pmzi commented Apr 18, 2023

When will be this available inside the docker image?
@pedropintosilva

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.

5 participants