starfederation / datastar-restructure-interim

MIT License
9 stars 4 forks source link

datastar-remove event does not handle useViewTransition or settleDuration. #13

Closed SpiralOSS closed 1 week ago

SpiralOSS commented 2 weeks ago

The datastar-remove event does not handle useViewTransition or settleDuration.

If neither is provided then it works properly. If one or both are provided then Datastar will repeat the request every second over and over, receiving the same response.

(It appears like the variables are swept up into the selector or paths.)

bencroker commented 2 weeks ago

@delaneyj the datastar-remove event never supported settling and view transitions. Should it, or does the spec need to be adjusted?

bencroker commented 2 weeks ago

I’ll take a shot at this tomorrow.

bencroker commented 1 week ago

@SpiralOSS I’ve cheated a bit and added the cases with TODO comments, so settleDuration and useViewTransition will have no effect but won’t break your tests. https://github.com/starfederation/datastar/blob/650107ddeb8c20d5a30e35da3f1dee175ce18b29/code/ts/library/src/plugins/actions/backend/sse.ts#L289-L294