egil / Htmxor

Supercharges Blazor static server side rendering (SSR) by seamlessly integrating the Htmx.org frontend library.
MIT License
109 stars 12 forks source link

refactor: Remove dictionary creation from SwapStyleBuilder #55

Closed tanczosm closed 2 months ago

tanczosm commented 2 months ago

I went back and looked through the htmx source and it appears as though your original comment about whether ordering mattered for the SwapStyleBuilder was on the money. Every part of the swap specification is parsed into a single SwapSpec object so I created an object that would at least hold the values for the commands. This would ensure that no command would be repeated. The builder then just produces the final string result from the HtmxSwapSpecification record. The tests were updated accordingly to use SwapStyle.Default which equates to the empty string.