Code Monkey home page Code Monkey logo

Comments (2)

janhesters avatar janhesters commented on May 28, 2024 2

Wow thanks a ton! I'm going to finish a PR over the coming days. Just worked on it for an hour, but its much to learn in this codebase haha.

I hope I didn't take away the fun by giving you the (probably) precise places to change.

No, you honestly enable me be able to write the PR in the first place! Thanks again, will post here when the PR is ready again, or if I have more questions 🙏

from remix-forms.

danielweinmann avatar danielweinmann commented on May 28, 2024

@janhesters, thank you also for offering to create a PR for this one. I will share what I'd do if I were to implement it at a high level, but please bring as many follow-on questions as you need:

First, I'd create three examples on our test-examples folder. The first one would include a few Fields receiving different autoComplete props each, but without Field receiving children.

The second would include similar Field's receiving the autoComplete prop, but they would all receive children and render inputs like Input, SmartInput, etc. This will make sure that Field passes its own autoComplete prop along to inputs when the inputs don't receive it directly.

The third would do the same with SmartInputs receiving the autoComplete prop directly.

Then I'd write failing E2E tests, allowing me to TDD my way to implementation.

Only then I'd start implementation. For the Field, I'd add the autoComplete prop here, destructure it here, and then pass it to all appropriate inputs inside this long if/else mapping, which is used for when Field receives children.

For the SmartInput, I'd first add the prop here and then make sure it receives the one passed to Field here, which is used for when Field does not receive children.

Then I'd destructure it here and pass it to the appropriate inputs inside this chain of ternaries.

I probably missed something, and I hope I didn't take away the fun by giving you the (probably) precise places to change. But I know this code is complex, and I thought this would be an incentive for a good first PR :D

Let me know if you have any doubts!

from remix-forms.

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.