IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
882 stars 494 forks source link

rename Private URL to Preview URL and other changes #10961

Closed sekmiller closed 1 day ago

sekmiller commented 1 month ago

What this PR does / why we need it: Updates the Private URL to Preview URL in Edit Dataset Popup and native api calls. The request was due to confusion over the use of Private URLs. Also hides Collection info when there is an Anonymous Preview

Which issue(s) this PR closes:

Special notes for your reviewer: the native api references to privateurl remain and have been marked as deprecated. The classes and service beans, etc. remain with the private url nomenclature. With respect to 10950 I ran into some jsf weirdness for hiding the breadcrumbs. there may be a better way to handle it.

Suggestions on how to test this: This is the doc I used to guide the update to the Edit Dataset Popup: https://user-images.githubusercontent.com/18374574/151025261-ed70e998-9341-4013-9e0f-3c1d4d2c83e4.jpg

I did make one change to the popup to show the resulting url on create. Julian signed off on showing the URL in the popup. He is also reviewing the UI/UX for acceptance testing.

Creation of the "general" preview url will always be available to those that have manage Dataset permission permissions via the "Preview URL" option under the Edit Dataset menu. "Anonymous Preview" is only available if the AnonymizedFieldTypeNames setting has been added to the installation. (Use curl -X PUT -d 'author, datasetContact, contributor, depositor, grantNumber, publication' http://localhost:8080/api/admin/settings/:AnonymizedFieldTypeNames to add the setting)

Verify that the newly created preview url works and indicates to the user that they are viewing an unpublished dataset. Also if the "Anonymous Preview" is used that the Anonymized metadata are displayed as "withheld". Also in the anonymous preview you should not be able to determine the Dataverse Collection that hosts the dataset. (That is, the "breadcrumbs" that indicate the Collections in the ownership tree should not be visible, nor should the header showing the immediate owner of the dataset.)

In the native api verify that previewUrl and privateUrl may be used interchangeably.(curl -H "X-Dataverse-key:35f79221-0fc4-433b-956c-cf20f7f13d87" -X POST "http://localhost:8080/api/datasets/:persistentId/privateUrl?anonymizedAccess=true&persistentId=doi:10.5072/FK2/GNJY26")

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

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

Additional documentation: The app documentation has been updated for this change

coveralls commented 4 weeks ago

Coverage Status

coverage: 22.301% (+0.4%) from 21.852% when pulling 18db323ab6ac8c11390d306536dcd723861da354 on 8184-preview-url-changes into 42d00d1befe73cd8fa4a29cc7507ba8b6e34ffe2 on develop.

github-actions[bot] commented 4 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

jggautier commented 4 weeks ago

Hey @sekmiller. I haven't seen what you've done but from your comments in this PR, shouldn't this PR close the GitHub issue Some researchers unsure of difference between "Private URL" and "Anonymous Private URL" #8185, instead of the GitHub issue it's set to close now, Reviewers using anonymous private URL might learn dataset author's identity from information about the Dataverse installation or collection #8184?

sekmiller commented 4 weeks ago

Hey @jggautier, the reason that I marked it with 8184 was because that is the one that was in the queue- and it has the references to changing the name to "Preview URL". 8185 has "no status", but I can add it to the "Closes" above.

github-actions[bot] commented 4 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 4 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 4 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 4 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

jggautier commented 4 weeks ago

Ah thanks, sorry for the confusion. So this PR is about more than changes to the preview URL. It's also addressing how reviewers using the anonymous private URL might learn about the dataset author's identity, by following the approach that I summarized in that image at https://user-images.githubusercontent.com/18374574/151025261-ed70e998-9341-4013-9e0f-3c1d4d2c83e4.jpg.

Thanks for including #8184 like you did.

But I think there's an issue with how things were moved to the queue. I helped propose and test the redesign that's described in https://github.com/IQSS/dataverse/issues/8184 before @sbarbosadataverse opened https://github.com/IQSS/dataverse/issues/10950. And both of these GitHub issues have the v6.5 milestone on them.

Does this PR account for what's being planned in https://github.com/IQSS/dataverse/issues/10950? For example, does the popup still make sense when the breadcrumbs that the dataset reviewer can see on the dataset page "anonymized".

github-actions[bot] commented 3 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 3 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 3 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

sekmiller commented 3 weeks ago

@jggautier I incorporated the functionality of #10950 into this PR. I modified the note on the popup to say "Users of the preview URL will be able to see the name of the repository but not the name of the collection that this dataset is in."

I also deviated from the design of the popup that you proposed by including the preview url when it is created/exists. Let me know if you think that's OK. See attached example:

Screen Shot 2024-10-29 at 10 52 58 AM
jggautier commented 3 weeks ago

Thanks! Okay, I'm checking it out today.

I'll ignore the typos but just want to acknowledge here that there are some. I didn't say anything when I saw the "tumbstone" typo in a different PR a while back and I regretted not saying something after it made it through the board and into a release.

sekmiller commented 3 weeks ago

Please fire when ready with typos. Thanks for reviewing it

jggautier commented 3 weeks ago

Cool okay. I'll point out the typos last.

I wrote about other things in a list format so hopefully it's clear.

sekmiller commented 3 weeks ago

Here is what the popup looks like before the dataset owner creates the preview url and this is the mockup I was working from. I used "Create General Preview URL" and "Create Anonymous Preview URL" as the labels from the mockup:

Screen Shot 2024-10-30 at 9 39 16 AM Screen Shot 2024-10-30 at 9 38 47 AM
sekmiller commented 3 weeks ago

this is what the popup looks like if there's no Anonymous Preview option (There's no setting for :AnonymizedFieldTypeNames):

Screen Shot 2024-10-30 at 9 49 11 AM
sekmiller commented 3 weeks ago

the tooltip on the disabled Anonymous button will still appear then there's a published version of the dataset.

github-actions[bot] commented 3 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

sekmiller commented 3 weeks ago

Here's what the popup looks like if there's already a published version and the owner has created a General Preview (non-anonymous) I removed the redundant explanation of the URL

Screen Shot 2024-10-30 at 10 26 50 AM
jggautier commented 3 weeks ago

Ah, thanks for the screenshots!

I wondered what the button labels looked like because in the redesign we changed the name of the "Disable Preview URL" button to "Disable Anonymous Preview URL". And we meant for the name of the button for disabling the General Preview URL to be "Disable General Preview URL", although the mockups don't show this.

It looks like the disabled button is always named "Disable Preview URL". Is that right? And is that because it's part of a component that includes the box that shows the URL, and that component is being reused?

jggautier commented 3 weeks ago

About the text itself, I copied it below and I bolded the text I changed only so that it's easier to see what changes I'm suggesting. Most of it is just typos but I tried to explain the non-typo change I made.

I was also going to ask if I could just suggest the changes myself in your branch, but then I saw that the text seems to be in a .properties file and it might take me a while to understand how to make changes there. So it seemed better to just post the changes in this comment.

You can create a Preview URL to copy and share with others who will not need a repository account to review this unpublished dataset version. Once the dataset is published or if the URL is disabled, the URL will no longer work and will point to a "Page not found" page.

To cite this data in publications, use the dataset's persistent ID instead of this URL. For more information about the Preview URL feature, please refer to the User Guide.

Only one Preview URL can be active for a single dataset.

General Preview

Create a URL that others can use to review this dataset version before it is published. They will be able to access all files in the dataset and see all metadata, including metadata that may identify the dataset's authors.

Anonymous Preview

Create a URL that others can use to access an anonymized view of this unpublished dataset version. Metadata that could identify the dataset author will not be displayed. Non-identifying metadata will be visible.

The dataset's files are not changed and will be accessible if they're not restricted. Users of the Anonymous Preview URL will not be able to see the name of the Dataverse that this dataset is in but will be able to see the name of the repository, which might expose the dataset authors' identities.

You won't be able to create an Anonymous Preview URL once a version of this dataset has been published.

I changed that second to last sentence to be more explicit that the name of the repository might expose the identities of the dataset authors. Probably less likely to happen when using a repository like Harvard Dataverse, but others in the community mentioned that it might be possible with smaller or more focused Dataverse repositories.

I added a paragraph break before the last sentence since it's mentioning something different than what's in the paragraph above it.

I also changed "collection" to "Dataverse". I know that at least in the core team, there's consensus to use the term collection or Dataverse collection, but many other parts of the UI and the User Guides still refer to it as Dataverse. And last I heard, this switch from "Dataverse" to "collection" would happen with the SPA.

sekmiller commented 3 weeks ago

@jggautier I can change the label of the disable buttons to correspond to the type of preview. There's also a confirmation popup that you have to accept in order to actually disable it. Right now it is the same for both. (see below). Should I customize it as well?

Screen Shot 2024-10-30 at 2 56 37 PM
jggautier commented 3 weeks ago

Thanks! Yeah we want to make sure users know which URL they're creating and disabling, so it should help to have the disable buttons and the buttons in the confirmation popups also correspond to the type of preview.

I'll assume that I'm way off with my question about those disabled buttons being part of a component that's being reused 😂

github-actions[bot] commented 3 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 weeks ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 week ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

pdurbin commented 1 week ago

I'm ready to approve this but API tests didn't run. I'm kicking of another attempt manually: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-10961/22/

github-actions[bot] commented 1 week ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 week ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 week ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

ofahimIQSS commented 1 week ago

Hey @sekmiller: Found a typo: published ot if the URL image

ofahimIQSS commented 1 week ago

@sekmiller Another observation I had during testing: "Disable General Preview URL" button isn't working as expected when I modify an existing unpublished dataset file.

I compared the 2 behaviors in Internal with the PR and Demo with previous code.

To test this, open up an existing dataset thats unpublished and go to Preview URL and click on disable general preview url button. Then from dataset page, go back to Preview URL screen. Here is where the issue lies: "Preview URL has not been created". should be displayed instead of showing a URL as it is doing now.

Also noticed that the green success disabling message wasn't displayed either: image

https://github.com/user-attachments/assets/ecdfb42b-5d5c-4376-8fec-15e5ae67d241

github-actions[bot] commented 4 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

ofahimIQSS commented 4 days ago

@sekmiller Found a similar issue for Anonymous Preview. Create a new dataset and save it without publishing. Edit the dataset > Preview URL. Under Anonymous Preview, generate a URL then disable it. Disable button not working as expected.

Additionally, I noticed that the typo is still there. https://github.com/IQSS/dataverse/pull/10961#issuecomment-2479470294

https://github.com/user-attachments/assets/8f7e1e29-284a-43a1-8da4-3de06036a05d

github-actions[bot] commented 3 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

sekmiller commented 2 days ago

@ofahimIQSS I fixed the typo "ot". I also modified the refresh on the delete url popup so that it won't appear until the refresh completes. that should fix most of the timing issues we've seen with the delete processing

github-actions[bot] commented 2 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 2 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:8184-preview-url-changes
ghcr.io/gdcc/configbaker:8184-preview-url-changes

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.