Skip to content

Conversation

@silverkszlo
Copy link

@silverkszlo silverkszlo commented Oct 2, 2025

  • Resolves: This PR addresses at least those two support issues

  • Target version: main

Summary

When the user exports a document as PDF or EPUB from Collabora Online, the new exported file did not appear automatically in their files list. Only after a manual page reload was the file displayed.

This PR handles the export event by detecting when a user initiates an export (UI_SaveAs) and automatically refreshing the Files app when the Collabora editor closes (UI_Close). The page reloads automatically with a clean URL to show the exported file without opening it.

The page reload feels a bit clunky—I wonder if there’s a smoother way to handle this.

TODO

  • ...

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

@silverkszlo silverkszlo force-pushed the refresh-filelist-after-export branch from 1e94b84 to 62afe5f Compare October 2, 2025 12:32
@silverkszlo silverkszlo force-pushed the refresh-filelist-after-export branch from 62afe5f to 340677b Compare October 2, 2025 13:01
@elzody
Copy link
Contributor

elzody commented Oct 6, 2025

I think there is probably a better way to handle this, like via post message. Clicking on the Save As or Export As buttons in Collabora sends the UI_SaveAs post message to us, which we then handle by displaying the Save As dialog on our side. In response, we send the Action_SaveAs post message, which has a Notify argument that tells Collabora whether or not we want to know when the operation has finished and what the result is.

My idea was to use this to then trigger a rebuild of the files list (probably via some event bus message), but we only get the Action_Save_Resp post message back from Collabora when the user carries out the task from the Save As button -- not from the Export As button.

This doesn't make sense to me because if it's following the same flow under the hood, 1) why have two separate buttons for it and 2) why does doing this via the Export As button not also notify us when the operation is complete

I will clarify this behavior with them before we proceed

@juliusknorr
Copy link
Member

Yes, I think we should rather rely on existing files app methods to add the new file or update it through events. Reload was possible and used in the past but had quite some performance impact to always refetch the full file list.

@elzody
Copy link
Contributor

elzody commented Oct 7, 2025

Collabora has confirmed that the Export As button not sending back an Action_Save_Resp is a bug, so I think we should wait for that to be fixed and then implement better handling for this using the methods Julius highlighted.

@juliusknorr
Copy link
Member

CollaboraOnline/online#13309 as upstream fix to be tested with

@juliusknorr
Copy link
Member

@elzody I rememeber you wanted to give the collabora fix a try? Could you give an update on that part?

@juliusknorr juliusknorr added bug Something isn't working 2. developing Work in progress labels Nov 13, 2025
@elzody
Copy link
Contributor

elzody commented Nov 13, 2025

@juliusknorr @silverkszlo Indeed, the fix on Collabora's side works. It seems to send the correct PostMessage now, so we should be able to proceed with our fix. I am happy to help any way that I can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants