Skip to content
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

Add a URL Link as output of OMERO.script in Activities tab #233

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

emilroz
Copy link
Member

@emilroz emilroz commented Oct 5, 2020

The changes here add additional output option ("URL") to the OMERO.script engine.

Example script utilizing new feature: https://gist.github.com/emilroz/e82d9b8f53f759c23235e2f38256d413

Expected result:
image

New "Open external link" button should open a new tab with the specified HTTP address.

We utilize this feature when the output of the script creates URLs to OMERO viewers/plugins (PathViewer, Figure, PathViewer Grid, etc.) with settings encoded in the URL based on user input.

@manics
Copy link
Member

manics commented Oct 6, 2020

Functionally this works 👍

Things to consider:

  • It looks like v.type is currently an OMERO type, this adds URL to the supported types
  • Should we document this somewhere?
  • Related to the previous point, the URL is not escaped (not necessarily a problem), but script developers must be aware of this

@emilroz
Copy link
Member Author

emilroz commented Oct 8, 2020

Thanks @manics. I'll add the URL encoding/decoding where appropriate. Where do you think would be the best place to document it?

@manics
Copy link
Member

manics commented Oct 8, 2020

Not sure on where we should document it, maybe wait for @will-moore to take a look? I'd hold off on any encoding/decoding until we have his input as it can be tricky to get right, it may be best to rely on the script developer.

@will-moore
Copy link
Member

I think the place to add to docs is under https://github.com/ome/ome-documentation/blob/develop/omero/developers/scripts/style-guide.rst#script-outputs

I'm not sure that we need to escape the URL. Scripts should be trusted etc. Do we need to support URLs with " etc? I guess it might improve usability for devs to handle this, but at least if this is documented then I don't see it as an essential feature.

@emilroz
Copy link
Member Author

emilroz commented Nov 2, 2020

@will-moore, @manics docs PR opened here: ome/omero-documentation#2165, please let me know if there's anything missing.

@emilroz
Copy link
Member Author

emilroz commented Nov 5, 2020

@will-moore, @manics code updated to remove the id requirement. I have also added changes proposed by @will-moore to the test script here: https://gist.github.com/emilroz/e82d9b8f53f759c23235e2f38256d413

@will-moore
Copy link
Member

Works fine, thanks. LGTM. 👍

@emilroz
Copy link
Member Author

emilroz commented Nov 17, 2020

@will-moore anything else we need to add here before the PR is approved?

@will-moore
Copy link
Member

I think it's good to merge.

@manics manics merged commit 50dfb6c into ome:master Nov 17, 2020
@sbesson
Copy link
Member

sbesson commented Nov 18, 2020

Is it worth scheduling a quick omero-web release including these changes?

@emilroz
Copy link
Member Author

emilroz commented Nov 18, 2020

I'm all for it of course :)

@manics
Copy link
Member

manics commented Nov 18, 2020

If we do it would be nice if we could get #232 in too so we can start linking to vizarr for testing (IDR/deployment#297)

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.

None yet

4 participants