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

Mint custom datapublications #1529 #1531 #1537

Merged

Conversation

louise-davies
Copy link
Member

@louise-davies louise-davies commented Jun 14, 2023

Description

Adds a button to the cart page which lets the user mint their selection if they have permission, and once clicked it takes them to an "accept data policy page", which then accepting takes them to the generate DOI form. Once the user has filled out the required fields, they can generate a DOI, which once it is minted will cause a popup to appear with the DOI and a button to take the user to the landing page. See screenshots of the generate DOI page (names and emails redacted in the screenshots since it's based on real users)

generate_doi_page

generate_doi_page_confirmation

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage
  • Deploy with other PR & Alex's minting backend to test the DOI minting workflow

Agile board tracking

Closes #1529, Closes #1531

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (4a7132f) 96.21% compared to head (ae1fb81) 96.16%.
Report is 6 commits behind head on develop.

Files Patch % Lines
packages/datagateway-download/src/downloadApi.ts 93.82% 5 Missing ⚠️
...ad/src/DOIGenerationForm/relatedDOIs.component.tsx 94.00% 2 Missing and 1 partial ⚠️
.../DOIGenerationForm/DOIGenerationForm.component.tsx 97.10% 1 Missing and 1 partial ⚠️
...nerationForm/creatorsAndContributors.component.tsx 96.96% 2 Missing ⚠️
...kages/datagateway-download/src/downloadApiHooks.ts 97.26% 2 Missing ⚠️
packages/datagateway-download/src/App.tsx 0.00% 1 Missing ⚠️
...c/DOIGenerationForm/DOIConfirmDialog.component.tsx 97.14% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1537      +/-   ##
===========================================
- Coverage    96.21%   96.16%   -0.06%     
===========================================
  Files          165      170       +5     
  Lines         7089     7485     +396     
  Branches      2218     2378     +160     
===========================================
+ Hits          6821     7198     +377     
- Misses         247      266      +19     
  Partials        21       21              
Flag Coverage Δ
common 95.61% <100.00%> (-0.01%) ⬇️
dataview 96.95% <ø> (ø)
download 95.83% <96.02%> (-0.21%) ⬇️
search 96.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@louise-davies
Copy link
Member Author

@patrick-austin I have added the functionality for Contributors & Related DOIs based off our previous conversation & the wireframes I mocked up:

image

image

@louise-davies louise-davies removed the WIP This PR is still being worked on and should not merged label Jan 15, 2024
@louise-davies
Copy link
Member Author

@kaperoo For testing, you will need to add the following new urls to the download settings json

"doiMinterUrl": "https://scigateway-preprod.esc.rl.ac.uk/doi-minter",
"dataCiteUrl": "https://api.test.datacite.org",

@@ -109,7 +109,7 @@ describe('DLS - Datasets Cards', () => {
cy.get('[data-testid="card"]').first().contains('DATASET 61');
});

it('should be able to filter by multiple fields', () => {
it.only('should be able to filter by multiple fields', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove .only

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't there be const settings = React.useContext(DownloadSettingsContext); somewhere in DownloadCartTable component?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I think it got obliterated in the merge resolution

Copy link
Contributor

@kaperoo kaperoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I think settings need to be defined in the DownloadCartTable component to fix testing errors.

@louise-davies louise-davies merged commit 10bb7d1 into develop Jan 18, 2024
10 checks passed
@louise-davies louise-davies deleted the feature/mint-custom-datapublications-#1529-#1531 branch January 18, 2024 09:44
@louise-davies louise-davies added enhancement New feature or request datagateway-download Issues relating to the download plugin user feedback Issues that were raised by users labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datagateway-download Issues relating to the download plugin enhancement New feature or request user feedback Issues that were raised by users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Generate DOI form User can click a button to mint a DOI for their selection
2 participants