This makes a lot of sense
For sliders and color grids, It would be great if the onChangeComplete was only fired when the user released the mouse, not when they stopped moving the mouse. For an undo system, i want to undo when the user releases the mouse, not when they stop dragging
There is an event missing. Most controls have onScroll, onChange, onChangeComplete. Here we have only two, and debouncing won't solve all issues. As we need to keep backward compatibility, I would suggest adding another event onColorSelected when the mouse button is released.
onChangeComplete is definitely named wrong, as nothing, ever, is complete while the user is still holding the mouse button down.
I did not understand the purpose of onChangeComplete. As it was mentioned, it doesn't make sense for this to fire at all while i'm still dragging some slider. Once i release the button, and am done dragging, only then should the change be complete.
It makes sense. We need one event which fires while dragging (imagine you want to reflect the current color in an outside element while still dragging), and one when released (for example for permanently saving the result).
onChangeComplete should probably be onChangeCommitted or something along those lines. Yes, one is needed to fire as we are moving, eg. using requestAnimationFrame the other once we commit the change eg. mouseup.
Most helpful comment
There is an event missing. Most controls have
onScroll,onChange,onChangeComplete. Here we have only two, and debouncing won't solve all issues. As we need to keep backward compatibility, I would suggest adding another eventonColorSelectedwhen the mouse button is released.onChangeCompleteis definitely named wrong, as nothing, ever, is complete while the user is still holding the mouse button down.