Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Change casing on SwapStyle (and other htmx enums) for correct serialization #54

Merged
merged 4 commits into from
May 15, 2024

Conversation

tanczosm
Copy link
Collaborator

@tanczosm tanczosm commented May 15, 2024

Fixes #53

Also alters other htmx enums to match style:
ScrollBehavior (Smooth/Auto to smooth/auto)
ScrollDirection (Top/Bottom to top/bottom)
TriggerQueueOption (First/Last/All/None to first/last/all/none)
TriggerTiming (left as is - this is technically not an htmx value but used only by Htmxor)

Updated the naming convention of the SwapStyle enum to match htmx attribute casing. This change affects several files where this enum is used, including HtmxConfig.cs, SwapStyleEnumConverter.cs, and various test files. The refactor allows correct serialization if used in blazor markup.
Updated the reference to ScrollBehavior.smooth in the HtmxConfig class.
@egil
Copy link
Owner

egil commented May 15, 2024

I think git would like you to sign your commits. Probably way merging is blocked.

Added remarks to the ScrollBehavior, ScrollDirection, SwapStyle, and TriggerQueueOption enums. These remarks clarify that the casing of these values matches htmx attributes for direct use in markup. Also added a specific remark for Default SwapStyle indicating it cannot be used directly in markup.
@egil egil merged commit b7b83d0 into main May 15, 2024
12 checks passed
@egil egil deleted the refactor-rename-enum branch May 15, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update renderer to correctly convert SwapStyle enum
2 participants