redux-autoform / redux-autoform Goto Github PK
View Code? Open in Web Editor NEWCreate Redux-Forms dynamically out of metadata
License: MIT License
Create Redux-Forms dynamically out of metadata
License: MIT License
In redux-form there are some examples of types of forms, and one of them is the wizard form, I want to add support for this.
Hi @andrerpena!, we were thinking of another type of form that we can add ๐ , these forms will have a rollover and will show a percentage of advance while the user fills the fields, does it makes sense for you ??
Hi @andrerpena, first for all thank you for including me in the organization! ๐
I was thinking to allow the developer to include in each field a callback for an event. For example,
{
fields: {
name: {
type: "string",
component: "Input",
change : (event) => { console.log("Hey!, i'm changing! :P ";)}
}
}
}
And do this for each type of event, this way each field will be more cutomizable.
What do you think??
When merge @danigomez refactor, we now that it was a trouble with MetadataProvider test when running with Karma on PhantomJS. It seems to be a trouble of phantomJS, needs a little bit of investigation.
first of all, thank you for your awesome work on this project! ๐ฏ
since redux form v6 release is right around the corner, it probably makes sense to consider the impact of these api changes sooner than later... https://github.com/erikras/redux-form/releases/tag/v6.0.0-alpha.15
http://redux-form.com/6.0.0-alpha.15/docs/MigrationGuide.md:
In v5, only the outer form component was connected to the Redux state, and the props for each field were passed in via the form component. The problem with this is that the entire form component had to rerender on every single keypress that changed a form value. This was fine for small login forms, but lead to extremely slow performance on larger forms with dozens or hundreds of fields.
In v6, every single field is connected to the Redux store. The outer form component is also connected, but is connected in such a manner that does not require it to refresh every time a value changes.
Because of this inversion of control, there is no incremental upgrade path. I would love to provide new API and provide deprecation warnings on the old API, but there is just no path from here to there that allows for such a transition.
without digging too deep into both APIs, i wanted to ask if you had considered these changes and plan on supporting the new api/optimizations?
@andrerpena one of my co-workers @danigomez wants to collaborate to this project. He will be helping me with the material-ui-addon.
Can I add him as an organization member? :)
I will explain why I think this should be better:
In this way we get everything more clean..
Would supporting nested and repeated entities be considered in-scope for this project?
@JonatanSalas , I'm trying to follow your suggestion of using Carte Blanche but when I set up it exactly like the docs say, it gives me this error:
Steps to reproduce:
npm start
Do you know what would be the problem, thank you!
Hi, first of all, thanks for your project! I'm currently working with it, and it's a cool stuff.
I have been looking a little bit at your code, and some parts could be upgraded to ES6 sintax.. I would like to make a PR with this, and even more, I want to create a MaterialUIComponentFactory, for those who use material-ui in their projects.
Let me know what do you think about this.
The following files are using functions provided by underscore and clone which can be replaced by native ES6 code.
What do you think??, is there a reason to not change unsderscore to native ES6??
redux-autoform's schema syntax is somewhat complex. There's need for this complexity but may be it should support a simpler alternative syntax that abstracts the concept of entities
and layouts
.
For instance, this would be enough for running a simple form:
[
{ name: 'name', type: 'string' },
{ name: 'dateOfBirth', type: 'date' },
]
This would also work:
{
name: {
type: 'string'
},
dateOfBirth: {
type: 'string'
}
}
The only problem with the above approach is that I favored arrays
over objects
and I did that because arrays are easier to merge. I mean, adding a field in the position 3 and removing the one on position 1 is kind of easier using arrays. But I'm open to alternatives anyway.
What do you guys think?
@JonatanSalas ?
Hi @andrerpena !!, We were trying to figure out how to get the form values from the Wizard in order to pass that values to the transition function, that will handle the steps transitions in case that you want to make it conditional. So we come to the idea to simply connect the group to the redux store and read the "form" (We can assume that the reducer is combined with that value, because that's what the RF doc says! ๐ ) state value.
Does it make sense to connect a group to the store?? or it should be handled in a parent component and passed to the group??
What do you think??
Hi! when setting destroyOnUnmount false (default is true in redux-form) it does not get updated. Seems redux-auto-form is not taking in account this prop.
Thanks.
Hi! I have seen a lot of libs using this project to update it's package.json dependencies, you could take a look at it:
It manages updates through individual PRs per dependency updated!
Hope it helps to you
Helloo @andrerpena, are you merging the layout and field data in this code??
let groupField = layout.fields[i];
let existingEntityProperty = entity.fields.find(field => field.name == groupField.name);
let field = {...existingEntityProperty || {}, ...groupField};
If yes, why is the field and layout data in two different json?? is possible to configure the layout info in each field inside fields??
PS: I have an Squirtle xD
styles-defaultfactories.less content is as below, but lib/less/defaultFactories includes DateTimePicker.less with capital D.
// third party
@import './defaultFactories/Lookup';
@import './defaultFactories/dateTimePicker';
@import './defaultFactories/Checkbox';
Seems to be already fixed at source-code but npm install redux-autoform brings old version.
Hello @andrerpena , in task #46 i'm using the demo to check my changes, but it will be awesome if we can have tests for this code in order to make sure that we are not breaking anything! ๐
Hi guys! Can you pls evaluate supporting objects inside the form?
e.g.:
{
a: String,
foo: {
x: String,
y: String
}
}
Then in autoform I should be able in my fields to do something like below:
{
"displayName": "This x from foo",
"name": "foo.x"
}
Thank you!
We could add url metadata option to the select field, and the responsability for the select to fetch it's own resources.
This will be good in cases where you need to generate the select from data in a web service
Current error: Object doesn't support property or method 'assign'
I want to create this issue to be used as a thread for discussions about features or improvements over the redux-autoform API.
About a lot of exchanges we got the following list:
TODO:
DONE:
Well, if I forget something else please add it! :)
Hi! Just wondering if you are planning to add any support for files upload.
Btw, the library is great.
Thanks in advace.
@andrerpena In AutoFormInternal is still imported and used the Form component from react-bootstrap.
So, RAF is an interesting project but it's just one component of the project I envision. What I envision is a platform for creating data-centric business applications, like a CRM or a full-fledged ERP.
Three components that I can think about right now are:
I'm willing to go all the way on creating these components... If you @JonatanSalas and @danigomez would like to help I'd appreciate very much. For that reason, if you want to contribute, I'd like to rename this organization to something more generic and make it encompass these components I mentioned.
Besides, as I talked to @JonatanSalas already, I'm really liking MaterialUI. It seems really solid, so I wouldn't mind creating the Dashboard and the Admin panel using Material.
What do you think?
When performing the code base refactor, I notice that we have a Radio component but it's not present on the demo.
Radio has an issue to solve? Or you forget to add it?
Hi Team, first of all congratulations for your work, the project is awesome.
I was trying to use forms with radio buttons and I have a problem to load initial values for them. Actually, the values are charged successfully, because they are sent into the form after submit, but the problem is in the browser. The radio buttons with initials values aren't being shown "cheked".
I try to use the following initial values in the demo project, included in the repository:
{
'default': 'option1',
'required': 'option3',
'addonBefore': 'option2',
'addonAfter': 'option1',
'help': 'option2'
}
but the referenced Radio Buttons aren't checked in the view. Seems that the property checked="true" is not being used in the component. Or maybe Iยดm doing something wrong.
Thanks for your help!
Juan.
I created the 'formato' project because I didn't know about Numbro. This is now deprecated.
I have to edit karma.config.js file from all git repositories to add support for coverrals and codecov.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.