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
Pop-up Variable Editors #73
Comments
I'm wondering how much of this could leverage the form generation for Concerto in https://github.com/accordproject/concerto-ui It would be great to be able to reuse as much of it as possible. |
Here are some relevant mockups. I like @jeromesimeon 's idea of using the existing form generation so we don't have to reinvent anything. Maybe to start we stick the forms into a modal that appears upon clicking the variable, and improve from there? |
Add format option at bottom of monetary amount form, date time form, to choose what format you want the form to render itself as in the template instantiation |
Related to accordproject/cicero-ui#225 |
Hey, I would like to look into this issue. As it is included in GSoC too so it would be a good start |
I have updated the description to include a couple of links to code that could be a useful starting point for investigation. |
@dselman @irmerk @DianaLease Can you assign this to me? |
@Hanaffi this is a very large Issue, I think it be best to agree on an approach in the Issue before assigning to any specific person. |
@irmerk I dont see it very large tbh. Do you have another approach? |
i would like to work on this issue. |
@irmerk Can we use material-ui modal component? |
@irmerk I would like to work on this issue, I have some great designing skills and I know JS or react very well. |
We are already using |
I don't plan on assigning this Issue to someone without a pretty thorough plan. As I've said, it's a very large Issue that requires more preparation. |
@irmerk |
It's the "editing the variable value" part where the complexity lies! :-) Templates contain variables, and each variable has a Concerto type. The primitive types are fairly straightforward (see the list in the description) but there are also complex types, and enumerations etc. We already have technology to build web forms for Concerto types in the Concerto-Ui project, and we are keen not to replicate all that here, so ideally we'd embed (part of?) Concerto-Ui form generation into the variable editing modal. If you can attend one of the Weekly Working Group calls we could schedule some time to discuss. |
@dselman |
@Hanaffi for attending weekly calls join #technology-wg channel in Accords slack |
@jeromesimeon pinging you on this, we should think of another way to display the Tech WG call details so it isn't just in Slack. @K-Kumar-01 yes absolutely. |
It's also in the AP google calendar which you can find in the Tech WG page Ultimately Slack is definitely the main place where things are announced. Did you have some suggestion for what else to do? |
Ah no, I was mainly thinking of something like the Tech WG page, just didn't realize it was there. |
Hi Dan, can you elaborate on "we don't duplicate the logic in the concerto-ui React form component" part? |
@sliu-UIUC yes this is referring to needing to utilize existing |
@dselman as you said that each variable has a Concerto type. Can you please guide me as to where these types are defined or how to access them? |
Providing a modal pop-up to edit variables would be useful as it would constrain users from entering bad data. The variables could be rendered as links in the contract text, and clicking on a variable should open the appropriate pop-up. See designs from @Michael-Grover.
Describe the solution you'd like
We should ensure that we don't duplicate the logic in the
concerto-ui
React form component, which can create React forms for Concerto types. The pop-ups will want to delegate toconcerto-ui
to ensure consistency.Note that the concept of
Variable
is defined by the Contract Editor via a plugin, here:https://github.com/accordproject/web-components/blob/master/packages/ui-contract-editor/src/components/Variable/index.js
When variables are clicked we should open a modal to edit them. Conceptually this is similar to how links are handled in the base markdown editor, so that can be used as a reference. We will want any code that handles variables to be in the contract-editor.
https://github.com/accordproject/web-components/blob/master/packages/ui-markdown-editor/src/FormattingToolbar/index.js#L51
The text was updated successfully, but these errors were encountered: