-
Notifications
You must be signed in to change notification settings - Fork 16
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
Set up the boilerplate for the Create Dataset Form #231
Comments
@MellyGray, can you assign this to me? |
@M27Mangan you should have permissions to do it by yourself. Please contact Ceilyn so she can add you to the dataverse-dev team on Github Then, please follow this workflow to assign yourself to the issue:
I could do all the steps myself but I think is better if we ensure that you have the permissions to do it by yourself. Let me know if you have any questions! |
I have no idea if this will be helpful or not but 7 (!) years ago @raprasad came up with a proof of concept at https://github.com/IQSS/json-schema-test ... "JSON Editor takes a JSON Schema and uses it to generate an HTML form" according to the tool he used. We now have an (unmerged) PR where we are adding a JSON Schema for a dataset: Please ignore me if this is all just crazy talk! 😜 |
@MellyGray - Is there any business logic for what a "Valid" title should be? Or simply that the Title field contains a value? Do you know what file fragment on the original dataverse repo I should look at? |
Unfortunately HTML isn't really applicable for the SPA, but I appreciate you thinking of me :) |
Hi @M27Mangan, this is the first issue in the SPA for migrating a form. As part of the scope, we need to figure out the best way to migrate validations from the original dataverse repo. To understand how the title is validated, please check the dataverse repo's original JSF code and its interaction with the backend. If you discover that the validation in the JSF code is tied to the backend without a corresponding API endpoint for the logic, please make a note of it. Feel free to comment in Slack if you believe extending the API might be necessary to implement this feature. That's why we typically mock API calls. Occasionally, the API might not yet have the endpoint for a feature, but it will be integrated with the frontend in the future. |
If you pass an empty string for a title, you get this error: { (Yes, what a weird error.) It seems like a single character is allowed. I tried "z". I ran this:
after editing this file:
Generally speaking we use Bean Validation: https://www.youtube.com/watch?v=xg9A3q-fRyo Update: D'oh! This was one of the first videos on DataverseTV! It's Gustavo and Stephen talking at JavaOne. Did Oracle take it down?!? 😢 Update 2: here are the slides, at least: https://dataverse.org/presentations/bean-validation-practical-examples-real-world-java-ee-7-application |
Must be they took it down. I will figure something out! |
Some more details from the frontend meeting this morning:
|
@johannes-darms just pointed us at an interesting React tool over at https://dataverse.zulipchat.com/#narrow/stream/379673-dev/topic/JSON.20Schema.20for.20datasets/near/405354814 "One use case would be the SPA that uses something like this (https://rjsf-team.github.io/react-jsonschema-form/) to auto generate a form based on the schema," he says. |
@pdurbin I think this is a pretty interesting use case and could work quite nicely. To me, setting up this interface would be outside the scope of this issue and would fall within one of the spikes created from the last frontend meeting. What do you think? |
@M27Mangan we are using https://react-hook-form.com/ for our dataverse SPA forms. It has a rather nice approach to form validation and error msg handling. Maybe that is also a suitable tooling for your development. |
@M27Mangan yes, as we discussed in person yesterday, out of scope for now but I still think it's a neat idea we should consider in the future. A little for from the conversation with Johannes: "Phil: are you actually using react-jsonschema-form or is it just a dream? Johannes: "We wanted to use it but our designers and users requested a complex stepper for the input forms. The effort to adapt the lib for the use case was more complex than writing a form by hand, so we are not using it in this project. In a different project I used the library and was happy with the lib:)" This is my fear, that the library would work great for simple stuff but not go far enough. Of course, we can't know unless we try (some day). |
Overview of the Feature Request
Set up the boilerplate for the Create Dataset Form. This is only the UI, so no API connected
Features:
Mock
What kind of user is the feature intended for?
Logged in users
What inspired the request?
Frontend meeting discussion about the next user workflows that could extend the SPA to cover more features horizontally without too much detail.
What existing behavior do you want changed?
None
Any brand new behavior do you want to add to Dataverse?
No
Any open or closed issues related to this feature request?
The text was updated successfully, but these errors were encountered: