wimdeblauwe / htmx-spring-boot

Spring Boot and Thymeleaf helpers for working with htmx
Apache License 2.0
497 stars 48 forks source link

Preserve the order of templates inside HtmxResponse #48

Closed klu2 closed 1 year ago

klu2 commented 1 year ago

The HtmxResponse currently stores its templates inside a Set, so the order is not preserved. Although stated differently in the docs of HTMX, the order might be relevant in some edge-cases, see https://github.com/bigskysoftware/htmx/issues/1198.

I'd therefore suggest to change the implementeion to use a LinkedHashSet instead of a HashSet, it seems also more intuitive when debugging the generated responses.

wimdeblauwe commented 1 year ago

https://github.com/wimdeblauwe/htmx-spring-boot-thymeleaf/releases/tag/2.1.0 released with this change. Thank you for your contribution!