Comments (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.
@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 Field
s 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 SmartInput
s 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)
- pendingButtonLabel should default to the value of buttonLabel HOT 1
- 1.6.3: Uncaught (in promise) Error: Cannot submit element that is not <form>, <button>, or <input type="submit|image"> HOT 1
- Attach errors to Fields that are dynamically generated? HOT 2
- Inconsistent display of selected option in select control HOT 4
- Custom Component typings HOT 2
- Error: Cannot submit element that is not <form>, <button>, or <input type="submit|image"> HOT 1
- Multiple Checkboxes HOT 3
- Define Input type through fieldTypes HOT 5
- Bring `errorMessagesForSchema` from `domain-functions` to this library HOT 1
- form with mode="onChange" button flashes when it hydrates HOT 2
- Could not resolve "@deepkit/type" HOT 3
- Overriding fields HOT 2
- <Field hidden /> is not passing `type="hidden"` to its input
- Validation error not shown when field is an array
- Can't trigger onSubmit from Form-component HOT 6
- Handle `z.object` HOT 1
- Can remix-forms function within a PWA / client side only context? HOT 4
- Zod schema array of objects HOT 1
- Remix forms site example no longer maintained? HOT 1
- [BUG] Field error(s) not showing if using additional component HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remix-forms.