Bug description
I know that autosubmit is basically 1 line of code, and i'm not sure what the intentions of this feature are for the next version of unpoly, but I feel like it needs some help or probably to be removed completely and replaced with something like a guide to make features like it.
problems:
- form & input attributes are confusing because they do the same thing. i expect that they would be different. maybe the form attribute should be removed.
- dynamic forms require up-autosubmit on their inputs (form up-autosubmit wont catch new inputs)
- it's easy to end up with dupe event listeners on inputs when using both form and input attributes in the same form
- nested up-autosubmit put dupe event listeners on inputs
- up-autosubmit doesn't seem to have a way for users to deal with poorly behaving components
- example: components that edit inputs but don't always trigger change events. those types of components need to handle form submits on their own and up-autosubmit needs to respect that and maybe give these components a hook for changes.
- up-autosubmit submits the whole form. if i want to have small submits i have to make a form for each input (not sure this is a big deal, but i find this to be the common case)
some of these issues can be solved with documentation, and some of these seem like they would require adding a lot of code to support them which would increase the complexity of autosubmit by a lot.
i run into poorly behaved components a lot and i find myself adding autosubmit code for them, but now i have to be careful about the autosubmit attribute with respect to these components or i get eventlisteners i don't want. it would be really nice if my fixes would work with the autosubmit compiler somehow.
it would also be nice if autosubmit wouldn't add more than 1 eventlistener per input, even when used incorrectly (nesting). this would probably need a global mapping, but that type of structure would probably make it easier to fix the problem i mentioned in the previous paragraph.
also, it may be interesting to add autosubmit to things that aren't inputs (content editable stuff, canvas, mouse). i'm not really sure what that would look like, but i think that would be where documentation/guides would be the approach to take.
Bug description
I know that autosubmit is basically 1 line of code, and i'm not sure what the intentions of this feature are for the next version of unpoly, but I feel like it needs some help or probably to be removed completely and replaced with something like a guide to make features like it.
problems:
some of these issues can be solved with documentation, and some of these seem like they would require adding a lot of code to support them which would increase the complexity of autosubmit by a lot.
i run into poorly behaved components a lot and i find myself adding autosubmit code for them, but now i have to be careful about the autosubmit attribute with respect to these components or i get eventlisteners i don't want. it would be really nice if my fixes would work with the autosubmit compiler somehow.
it would also be nice if autosubmit wouldn't add more than 1 eventlistener per input, even when used incorrectly (nesting). this would probably need a global mapping, but that type of structure would probably make it easier to fix the problem i mentioned in the previous paragraph.
also, it may be interesting to add autosubmit to things that aren't inputs (content editable stuff, canvas, mouse). i'm not really sure what that would look like, but i think that would be where documentation/guides would be the approach to take.