Git Product home page Git Product logo

Comments (7)

jflayhart avatar jflayhart commented on June 18, 2024

Interesting... so how would this work, like: redux g form SignUp --fields=firstName lastName email password? Would this only be for the field names or how would it know that the input types should be of attribute "email" or "password" or "text"?

from redux-cli.

SpencerCDixon avatar SpencerCDixon commented on June 18, 2024

Yeah something along those lines would be nice. Maybe you would separte field names with their types like in a rails migration.

firstName:text email:email lastName:text age:number etc.

from redux-cli.

jflayhart avatar jflayhart commented on June 18, 2024

Ok, seems pretty straight forward then; so a complete command for this would include an optional --fields flag with any number of <field name>:<input type> arguments. In theory, this could look like:

redux g form <form name> --fields=<field name>:<input type> where multiple fields are separated by spaces. Unless there's a cleaner way...

This might be a separate issue, but I think redux-cli needs to have some sort of validation for this in that if a form or component already exists, complain about it in the CLI instead of overwriting it (as well as making sure the syntax is correct for the including the field arguments). The overwriting of existing components has been a cumbersome issue I've experienced using this library. Nothing a revert of the local repo couldn't fix, but still...

from redux-cli.

SpencerCDixon avatar SpencerCDixon commented on June 18, 2024

Yeah I totally agree with the overwrite issues. If you want to try and tackle that I'd be open to a PR. I just started a new job though and need to learn Go and Angular at the moment so not sure how much free time I'll have to work on that for at least a few weeks.

from redux-cli.

jflayhart avatar jflayhart commented on June 18, 2024

Cool. I just wanted to create some ideas here for reference whenever I might have time to work on this...

Another idea, however, is to allow another flag for --validation=true or something, which would create some simple validation logic around the user-defined fields during the generation process. That would be pretty cool... I would love to work on this when I have time, which isn't now unfortunately. But will leave these notes behind for future reference.

from redux-cli.

anithri avatar anithri commented on June 18, 2024

#110 will address this. And this issue will be closed when it is accepted

data will be able to be passed to blueprints that can use to do things like generate form fields for each attribute.

from redux-cli.

anithri avatar anithri commented on June 18, 2024

Merged #110 into the 2.0 master.

from redux-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.