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

6919 Preview Tools and expanded preview options #7369

Merged
merged 5 commits into from
Nov 2, 2020
Merged

Conversation

pdurbin
Copy link
Member

@pdurbin pdurbin commented Oct 28, 2020

NOTE: This pull request replaces pull request #7311 which was merged early and then reverted.

What this PR does / why we need it:

This pull request does two things:

  • The Preview tab is available in more cases, such as...
    • when a guestbook is present and
    • when terms are present.
  • External tools can now be "preview only" in the sense that...
    • when preview only tools appear on the Preview tab (on the file page), a button says "Open in New Window" rather than "Explore on [TOOL NAME]" and
    • preview only tools do not appear under "Explore Options" under the "Access File" dropdown button.

Prior to this pull request, the Preview tab was only available for files that are publicly downloadable.

The way to create a "preview only" tool is to use the new "preview" type.

Note that explore tools can continue to appear under the Preview tab (on the file page) if they have hasPreviewMode set to true, as before. This was removed in 767882b

Which issue(s) this PR closes:

Closes #6919 (Preview Tools - New external tool preview type config setting, icon btn on dataset/file pgs)

Some commits have been added to address #4429 (Revise Explore Tools documentation to reflect modularity )

Special notes for your reviewer:

Stuff to notice:

  • Custom UIInput fields have been removed.
  • We've switched to standard Bean Validation.

Some questions I have:

  • Should we add email validation to the guestbook form?

Suggestions on how to test this:

The code having to do with the terms/guestbook popup was extensively reworked so it would be good to test...

  • validation of the form
  • that the values entered actually go into the database (don't laugh)
  • all the various places that the popup can appear
    • dataset page
    • file page
    • when clicking external tools
    • when clicking package files
    • when clicking worldmap files

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Screenshot 1: preview only example

Below is an example of a "preview only" tool. Note that the button in the Preview tab says "Open in New Window" and the tool is not present under the "Access File" dropdown.

Screen Shot 2020-10-06 at 1 49 03 PM

Screenshot 2: Terms + Guestbook

Below is an example of terms and a guestbook being presented in a Preview tab. The tool happens to be an explore tool and shows up under "Explore Options" under the "Access File" dropdown.

Screen Shot 2020-10-06 at 1 48 07 PM

Is there a release notes update needed for this change?:

Yes, a release note has been included.

Additional documentation:

Doc changes included.

This reverts commit 4deb30e.

Fight fire with fire. Fight revert with revert.
We only run the SQL migration if the "type" column still
exists on the externaltool table.
On a new installation, the logic wasn't running and
haspreviewmode is being added by a previous SQL script.
@pdurbin pdurbin mentioned this pull request Oct 28, 2020
@pdurbin
Copy link
Member Author

pdurbin commented Oct 28, 2020

I went ahead and moved it to QA per discussion in Slack. The code is the same as pull request #7311 which had already gone through code review.

The only differences are:

  • I renamed the Flyway script to have a non-conflicted version.
  • I resolved a problem in the Flyway script. I tested it on both a new installation and an upgrade and it seems to work fine now.

@kcondon kcondon self-assigned this Oct 28, 2020
@coveralls
Copy link

coveralls commented Oct 28, 2020

Coverage Status

Coverage increased (+0.05%) to 19.491% when pulling 505682b on 6919-preview-tools4 into c2dd459 on develop.

@kcondon
Copy link
Contributor

kcondon commented Oct 29, 2020

@pdurbin
-Some inconsistent screen positioning before/after accepting tou,toa,gb and preview diff on ff and chrome

  1. have toa or tou, short. upload small test file with previewer enabled. go to dataset, click eyecon, see toa at bottom but button below screen or in some cases below screen, click accept, screen scrolls with lots of white space below minimal file content at top.
  2. gb, same but gb content longer, positioned at top of screen, same file content scrolling after.
    Thinking more about this, it may just be a result of having a tiny file to preview.

-When a file with preview and tou/gb is restricted, preview button goes to file landing page, no notices.

Otherwise, everything appears to work fine.

@kcondon kcondon assigned pdurbin and unassigned kcondon Oct 29, 2020
@pdurbin pdurbin assigned TaniaSchlatter and unassigned pdurbin Oct 29, 2020
@pdurbin
Copy link
Member Author

pdurbin commented Oct 29, 2020

When a file with preview and tou/gb is restricted, preview button goes to file landing page, no notices.

I addressed this is 505682b by hiding the preview button (the eyeball) for restricted files.

We're giving @TaniaSchlatter time to give feedback on any other UI/UX issues before merging.

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.

Preview Tools - New external tool preview type config setting, icon btn on dataset/file pgs
5 participants