-
Notifications
You must be signed in to change notification settings - Fork 15
Description
It would be nice to have the ability to see the tool UI rendered beside the code as you made some tweaks with the parameters, the help, etc. as @hexylena proposed way back in 2015. Maybe not as the core part of the development but as a refining final step to make sure the UI is consistent and all your parameters are well documented and render correctly in the UI.
The initial prototype could be something like this (Disclaimer: the following image is fake 😝):
Feature planning
Use case
- The tool developer has a tool that passes
planemo lintand can be loaded into Galaxy without structural errors. - The tool developer executes a vscode command (or press a button in the planemo explorer to
runthe tool). - The extension runs
planemo serveunder the hood and opens a Webview panel beside the current tool document in the editor. - After the tool is served by planemo, the tool UI is displayed in the panel.
- Whenever the developer makes changes in the tool document and saves them, the tool UI is updated.
Possible difficulties
Using an iframe in the Webview to contain the Galaxy tool UI seems like a reasonable solution, however, after exploring a bit this path I found some obstacles, probably more because of my lack of knowledge in the matter than the problem itself:
- The Galaxy used by
planemo servemust deactivatex_frame_optionsor allow something different thanSAMEORIGINin the config to be able to display the Galaxy UI inside the vscode panel. - Even if the Galaxy
x_frame_optionsis disabled... when trying to display the inneriframecontaining the tool UI still similar problems occur this time in the vscode end:[Embedded Page] Uncaught SecurityError: Blocked a frame with origin "http://127.0.0.1:9090" from accessing a frame with origin "vscode-webview://cc4610ec-582e-44f9-98d5-c5c97cdcf6cd". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "vscode-webview". Protocols must match. - Is there a way to display only the Galaxy central panel containing the tool UI instead of the whole Galaxy interface with the tools and history panels? Looks like there is some kind of redirection to the main Galaxy frame every time you try to show a tool.
Maybe just opening the Galaxy web served by planemo in the default browser will be just enough, but I think this way we lose the option to auto-refresh the tool when it changes since we are now not in control. Maybe there is another solution for this?
