whole-tale / dashboard

Whole Tale Dashboard
http://wholetale.org
MIT License
7 stars 2 forks source link

Update Publish Modal to support both Zenodo and DataONE #576

Closed bodom0015 closed 4 years ago

bodom0015 commented 4 years ago

Problem

The current dashboard can only publish to DataONE, with lots of hard-coded implementation details that are specific to the DataONE case.

Fixes #570 Fixes #571

Approach

Refactor the Publish Modal to use the new GET /repository endpoint to offer the user a choice of repositories, and refactor some things that were DataONE-specific to be more generalized.

Also fixed the erroneous padding: 0 style that has plagued all modals for over a year.

How to Test

NOTE: DataONE auth will likely not work correctly without the changes in #575. Once #575 has been merged, I can update this test case to include the steps for testing DataONE as well. For now, feel free to just test the Zenodo side of things.

Demonstration: https://recordit.co/KeBCMm1cdK

Prerequisite: Disconnect ALL external accounts using the Settings view.

  1. Checkout this branch locally, rebuild the dashboard
  2. Login to the WholeTale Dashboard
  3. Create a Tale, if you haven't already, and navigate to its Run view
  4. At the top-right, expand the dropdown and choose Publish Tale...
    • (#570) A modal dialog should open, notifying you that you'll need to configure an external account before you can publish
  5. Click "Go to Settings" and configure a real API key for sandbox.zenodo.org
  6. Navigate back to the Run view for the Tale (lazy mode: click the Back button a few times)
  7. As before, expand the dropdown and choose Publish Tale... once again
    • (#571) The Publish Modal should open this time, allowing you to choose a repository from your configured External Accounts
  8. Select sandbox.zenodo.org from the dropdown and click "Publish"
    • You should see the familiar progress / status messages appear in the modal
    • The progress bar should indicate that your Tale has published successfully
    • NOTE: The DOI link will not lead anywhere in this case, as sandbox.zenodo.org is simply a test instance that does not produce real DOIs
  9. Log into sandbox.zenodo.org and click "Uploads" to verify that your Tale and its contents were published successfully
bodom0015 commented 4 years ago

@craig-willis thanks for taking a look at this.. I will address the first two shortly:

The last one is open for discussion:

craig-willis commented 4 years ago

Thanks @bodom0015. I'll open a separate issue on girder_wholetale for discussion on that third point and we'll see what xarthisius thinks.

craig-willis commented 4 years ago

That fixed it for me. Thanks @bodom0015