-
Notifications
You must be signed in to change notification settings - Fork 20
Show "New Review" button, when enabled #822
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
Conversation
| const createCollectionRoute = RouteWithParams.CREATE_COLLECTION(collectionId) | ||
| const createDatasetRoute = RouteWithParams.CREATE_DATASET(collectionId) | ||
| // TODO: Enable/disable review creation based on config setting. See also LoggedInHeaderActions.tsx | ||
| // TODO: Longer term, query /api/datasets/datasetTypes and show those |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created this PR to query /api/datasets/datasetTypes
|
@pdurbin Quick scope check: do we need this on develop now, or is it just for the demo? I thought the plan was to let users pick the dataset type on the Create Dataset page. If we add separate entries to Add data dropdown, the menu might get crowded (e.g., New Collection / New Dataset / New Review / New [DatasetType]). Could we keep a single “Create Dataset” entry and handle type selection in the flow, just an idea for a future iteration. Also test are failing due to I believe Keycloak configs, please see this commit and replace with those two files there, that should fix things. |
|
@g-saracca hi! No, we don't need this in develop any time soon. It's just for the demo. I took it off the board. I'm still learning. 😅 As I mentioned at #797 (comment) the plan for the demo is to add separate entries to the "add data" dropdown. You're right, this could get crowded! Keeping type selection in the flow is exactly what Zenodo and OSF do (see the screenshots in #797). So yeah, eventually, post-demo, maybe we'll go that way too. Thanks for the heads up about the failures due to Keycloak. Hopefully, those fixes will be merged soon! |
|
That's ok! |
|
I'm closing this PR in favor of this new one that does more: |
What this PR does / why we need it:
For an upcoming Trusted Data demo, we need to show a "New Review" button. This PR includes a couple booleans that can be flipped to true to show the button and conduct the demo.
Longer term, instead of hard-coding "review", we should be querying https://demo.dataverse.org/api/datasets/datasetTypes (on the target server, of course) to decide which extra dataset types to offer the user. Perhaps that will be in scope for a larger, related issue:
Which issue(s) this PR closes:
-related #797
Special notes for your reviewer:
This PR depends on the following js-dataverse PR:
I tried to add a variable to the .env file but I couldn't get this working. I think this would be preferable to having hard-coded booleans. I added some TODOs to this part of the code.
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Yes, when the creation of reviews are enabled, you'll see a "New Review" button:
Clicking this button will add
datasetType=reviewas a query parameter for the "create dataset" page:Once you click save, you will see the "Dataset Type" facet incremented by the type you chose (note that if you have all one type, the facet is not shown):
There is a related issue about how this Dataset Type facet doesn't work (which might be a backend problem):
Is there a release notes update needed for this change?:
Yes, something like this:
"Experimental support for creating a review as a type of dataset has been added."
Additional documentation:
None.