o2r-project/o2r-UI

Add "Preview" link in the creation view

nuest opened this issue · 6 comments

nuest commented

When looking at the current candidate draft, e.g. https://o2r.uni-muenster.de/#/createERC/lnXZx, then I must manually change the URL to get a preview, i.e. https://o2r.uni-muenster.de/#/erc/lnXZx

This way it is hard for authors to test-run their ERC without publishing it first. Should open a new tab.

Related to #149

I modified the Go To ERC Button to display Preview while it is not published. This takes you to desired url in a new tab. View changed code in my fork.

However there are two problems:

  1. If you run an analysis in the preview tab and publish the ERC afterwards that analysis will be listed as run
  2. If change something in the createERC tab like metadata or a binding it will not be displayed in the Preview tab

Should i add the Preview Button anyway?

nuest commented
  1. Yes. Let's keep it that way - I think the most sensible way to handle that would be to allow owners to delete job runs > o2r-project/api#95
  2. Not a problem. Maybe you can add a little frame or overlay that says "PREVIEW (will not be updated)" to make it clear to the user? I think users should not expect that the preview to be automatically updated across tabs.
nuest commented

Also, screenshots please :-)

Ok here are some screenshots of the new buttons

The preview button
Bildschirmfoto von 2020-11-30 14-30-28
And after the Publication
Bildschirmfoto von 2020-11-30 14-31-12

I will work on the iframe next.

I have added a preview notice in the window.
It is triggered when the ERC Overview Site is opened in a new tab.
Not a good solution now it is bound to if the the compedium in question is a candidate. This should only happen through a click on the preview button.
Bildschirmfoto von 2020-11-30 16-41-18

nuest commented

Looks nice. Can you increase the padding around the text please, and either have a margin both left and right, or no margin (though maybe that's just cut of in the screenshot).

Please open a PR so me and @NJaku01 can take a look at the code.