-
Notifications
You must be signed in to change notification settings - Fork 159
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
[draw.io] Deployment config + .vsdx support #4337
Conversation
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. |
be3456c
to
a4a138f
Compare
I have a couple of questions regarding the implementation of these functionalities.
|
You could do a call via our sdk -
This will be possible after merging #4380. Applications array is only for displaying the app in the app switcher. The config shouldn't be used for settings outside of that. Otherwise, there's also settings service which enables you to create a settings bundle for extension https://owncloud.github.io/extensions/settings/bundles For this basic config it might be too much effort though. |
enabled: true | ||
} | ||
}) | ||
fetch(url, { headers }) |
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.
Wouldn't this method work here? https://github.com/owncloud/owncloud-sdk/blob/c4b96e0b50bf989e792899913fe3a70fd1698b43/src/fileManagement.js#L76
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 tried with getFileContent
, but it looks like we cannot specify the responsetype. Drawio is able to handle the vsdx file as base64, so we need the file itself insted of its content. Also tried to re-create the file from its binary content, but I could not find a way to do so, the resultant file was always different.
1ce8591
to
7b750a1
Compare
Sorry for the delay, I've been quite busy and wanted to test as much as possible before comming back to you
I am trying to show diagrams in chromeless mode when they are read-only.
By this I understand that the |
Is the delay okay or does it cause some issues? AFAICT the delay shouldn't take too long so from users POV it shouldn't be a big problem.
Correct. Nice! |
Can you try to rebase the PR? It might solve the failing tests. |
As no locales are being used, is not necessary to load them This and the moment.js usage can be removed if the creation of the new .drawio file is managed with a modal instead of adding a timestamp to the filename
7b750a1
to
8bc0e3b
Compare
Rebasing fixed the issue with the tests, thanks!
It is not a problem in my local instance, but I was not sure how long could it take for other people with different/more complex setups. If you think it is OK then is perfect! :) |
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.
Nice 🚀
@VirtualEvan Let me pls know if there's something left you would like to commit here or if I can hit the merge button 😉 |
No, I think that's all. Please merge :) Do you want me to add some documentation somewhere mentioning the options that can be configured for the app? "external_apps": [
{
"id": "draw-io",
"path": "this_should_exist_and_cannot_be_empty",
"config": {
"url": "https://drawio.web.cern.ch",
"autosave": true,
"theme": "atlas"
}
}
] By the way, I noticed that for external apps, |
That would be awesome to have it documented. Maybe you could put it in the sample config.json files? If you want to add it here, I'll wait with the merging 😉 Thank you!
Yep, both |
OK, I think I got it. Let me know if there is something else I can add that could be helpful |
Thank you! I think that this is now in a perfect shape for merging! I'll hit the button when CI is green 😉 |
Description
<filename>_<timestamp>.drawio
file is created with the modifications. (This avoids overwriting the original file with XML content). A message informing this should be shown ( [Bug] Messages not shown in fullscreen apps #4335 )https://embed.diagrams.net
(The official embed-specific draw.io server)config.json
will be used for the connections to draw.io (server url, autosave and theme)Related Issue
Motivation and Context
How Has This Been Tested?
Docker OC 10 + local Phoenix: following this docs
Use custom draw.io server, enable autosave, use the 'atlas' theme
Open a .vsdx file by clicking on it
Types of changes
Checklist:
Open tasks: