News for hackers. Stuff that matters.
Re:Htmx is part of the GitHub Accelerator by zarzavat on Thursday August 17, 2023 @11:47AM (#37163482)
So you only do input validation on submit? Isn’t that user hostile?

This is what I don’t get about HTMX, you can’t give a good experience without client-side JS, sure some developers might love it, but that shouldn’t be the yardstick.

Re:Htmx is part of the GitHub Accelerator by andy800 on Thursday August 17, 2023 @05:24PM (#37168310)
Not at all. With HTMX you can do real-time validation on each input element on the server and provide instant visual cues to the user anytime one fails. https://htmx.org/examples/inline-validation/

Moreover, HTMX makes it incredibly easy to change the whole paradigm of submitting data. You can eliminate some forms entirely and just enable a series of individual questions/inputs/selects one at a time, especially useful when a single static form isn't always appropriate (multiple pathways, questions/options that are contingent on the response to a previous question, etc).

In my experience the UI flow and degree of detail for avoiding common errors is greatly improved.

Re:Htmx is part of the GitHub Accelerator by zarzavat on Thursday August 17, 2023 @11:59PM (#37171255)
Disagree that it’s good UX. Now the user only gets feedback when they lose focus on the field, forcing them to go back and refocus it. In conventional React they get feedback on each keystroke allowing errors to be fixed while the field is still focused.
Re:Htmx is part of the GitHub Accelerator by andy800 on Friday August 18, 2023 @01:40AM (#37171707)
So when the person is starting to enter an email address, the page goes red until he enters the .com at the end? He gets an error for the first 9 digits of a phone number? Do you implement debouncing?

There isn't one thing called "conventional React", there are all kinds of validation libraries on npm and many strategies laid out on Stack Overflow. https://stackoverflow.com/questions/41296668/how-do-i-add-va...

I think it's fair to say we have different opinions on good UX, no need to debate it any further