Let me know where I could improve. Specifically, if you have tips for smoother animation, that would be great as well. When I delete a task, the others just abruptly move and the transition doesn’t seem to work.
Just tested it deleting the first element, and I think is very good from a performance perspective.
From a user experience perspective, I can’t say much, as I’m not an expert. Is the abrupt movement a bad experience for the user? Maybe. But perhaps, if we add an animation to smooth those abrupt movements, it will bring performance problems.
I would like to point out that the
addEventListeners you added here are a very smart way to solve future memory leaks and useless memory usage. You only create one event listener for all the inputs that may be created, and then you choose if you want to manage or not the event. This is the very good. The common solution is to add the event listeners to each element created dynamically. That often comes with the perils of memory leaks when you delete those dynamically created elements. Very good.
However, I would like to suggest using the
template element to really separate responsibilities.
Apart from that, overall I think you’ve done a superb job.
Thank you for taking the time to check out the code and write feedback!
I think that the abrupt movement rather than easing into position kind of makes the project a bit janky, at least in my opinion so I still want to work on it but will consider possible issues.
Also, to be honest, I haven’t really thought of how anything (animation, addEventListeners, and template element) would affect performance or memory issues (I guess I’m still at the visual part of coding). But thank you for bringing them to my attention and I’ll definitely read about them.
Again, thank you!