Live data from Hacker News

FormKit: Form building framework for Vue 3

formkit.com

51–60 of 69 posts

Re: FormKit: Form building framework for Vue 3

#52
post #23
post #18

I love these sorts of frameworks! Makes doing forms a lot nicer, especially the live validation. I feel like the next evolution is automatically generating a whole form from selecting a schema in an OpenAPI spec. In a lot of specs, the type (string, email, phone, int, etc) is present along with any constraints (min/max length). Depending on the language/OpenAPI generator, it even preserves field order. It could massi…

As for me, forms are the single most important aspect of many web apps. Including critical ones for the society (banking, tickets, taxes, etc). Large part of my frustration with the state of web stems from how terrible experience with (creating and using) forms is. Web is almost 30 years old by now, and the announce of a way to make forms relatively easily, still generates an excitement. I mean, how many more years w…

1000% this. The state of native form inputs on the web platform is dismal, truly. Particularly on mobile.

Re: FormKit: Form building framework for Vue 3

#53
post #34

Whenever I see these form frameworks the first thing I do is click the label to ensure it focuses the input field. Aaaand pass, good job!

It does appear to do that for me in their example on the homepage (desktop Firefox), though? Doesn't this happen by default in most cases where a regular is used? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/la... > When a user clicks or touches/taps a label, the browser passes the focus to its associated input (the resulting event is also raised for the input). That increased hit area for focusing the i…

It only occurs when you use the label's for attribute to manually associate the label with the input, or wrap both the label text and the input in the same label.

Re: FormKit: Form building framework for Vue 3

#54
Very impressive. The schema covers everything I need. This library desperately needs "Repeater" component which I assume would handle array of inputs. This would allow FormKit to handle the most complex forms which is where this library would help the most.

Re: FormKit: Form building framework for Vue 3

#56
post #9
post #8

Earlier quoted context omitted.

Why can’t you debug?

Because it doesn’t throw an error, and it hands deep inside the vue code when an even to add one more nested component is triggered.

Why not just debug on component creation? Or maybe on DOM subtree modification [0]? Or maybe modify the compiled JS to add log or trace statements?

It’s all in your browser. You have a debugger at your fingertips.

Why doesn’t Vue stop this from happening? Because it assumes whatever you’re telling it to do is what you want it to do.

0: https://developer.chrome.com/docs/devtools/javascript/breakp...

Re: FormKit: Form building framework for Vue 3

#57
I was just talking about this with a colleague. We really want to join the beta at my company. Would be happy to sign up for the pro plan!

One note though, I want to point out, that I am able to "break" some of the demo components, like changing type="number" doesn't seem to error the form when I input text over it.

In case one of the other maintainers sees this, I have one other question:

Does this in any way use `eval`? I know a lot of JSON schema validators do, and that is a pain when it comes to CSP. If Formkit doesn't use eval (and maybe we can get a commitment on that...) its a no brainer

Re: FormKit: Form building framework for Vue 3

#58

I was just talking about this with a colleague. We really want to join the beta at my company. Would be happy to sign up for the pro plan! One note though, I want to point out, that I am able to "break" some of the demo components, like changing type="number" doesn't seem to error the form when I input text over it. In case one of the other maintainers sees this, I have one other question: Does this in any way use `e…

I didn’t know that a lot of these schema systems use eval. Surprising, why is that?

As far as I can tell, my go-to schema system doesn’t. https://github.com/colinhacks/zod

Re: FormKit: Form building framework for Vue 3

#59
post #23
post #18

I love these sorts of frameworks! Makes doing forms a lot nicer, especially the live validation. I feel like the next evolution is automatically generating a whole form from selecting a schema in an OpenAPI spec. In a lot of specs, the type (string, email, phone, int, etc) is present along with any constraints (min/max length). Depending on the language/OpenAPI generator, it even preserves field order. It could massi…

As for me, forms are the single most important aspect of many web apps. Including critical ones for the society (banking, tickets, taxes, etc). Large part of my frustration with the state of web stems from how terrible experience with (creating and using) forms is. Web is almost 30 years old by now, and the announce of a way to make forms relatively easily, still generates an excitement. I mean, how many more years w…

Well, forms aren't easy on any client toolkit (e.g. iOS/Android).

Forms are hard because they are (1) pure user input—often textual—, thus inheriting all fundamental difficulties with user input, and (2) arbitrarily reactive such that changing one value may arbitrarily impact other values, e.g. bidirectionally, and (3) you are at the mercy of the platform supporting the input UX that you want to build and you quickly find yourself off the rails otherwise.

This means that even though forms seem like they should be trivial, it's just as hard to generalize over forms as any other UI concept. Or rather, it's not a solved problem for the same reason UI in general isn't a solved problem.

Re: FormKit: Form building framework for Vue 3

#60
post #58

I was just talking about this with a colleague. We really want to join the beta at my company. Would be happy to sign up for the pro plan! One note though, I want to point out, that I am able to "break" some of the demo components, like changing type="number" doesn't seem to error the form when I input text over it. In case one of the other maintainers sees this, I have one other question: Does this in any way use `e…

I didn’t know that a lot of these schema systems use eval. Surprising, why is that? As far as I can tell, my go-to schema system doesn’t. https://github.com/colinhacks/zod

Anything that uses `ajv` under the hood and doesn't use their compile schema options. They use `eval`[0] for a number of things.

Quite a lot of schema validators use `ajv` under the hood. Some, like I believe `yup`, `zod` and `superstruct` do not. I'm not sure why one approach is more advantageous than another, to be honest. I'd think eval would also be a performance issue.

[0]: https://ajv.js.org/security.html#content-security-policy

Post reply on HN