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

chore: add missing options to HtmxConfig type #2026

Merged
merged 1 commit into from
Nov 24, 2023
Merged

chore: add missing options to HtmxConfig type #2026

merged 1 commit into from
Nov 24, 2023

Conversation

jonathonadams
Copy link
Contributor

@jonathonadams jonathonadams commented Nov 22, 2023

Description

When playing around with View Transitions, I noticed that the globalViewTransitions property, as well as some other options, were missing from the HtmxConfig type. This PR aligns the HtmkConfig with the options listed on htmx.org.

Corresponding issue:

Testing

None

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@alexpetros
Copy link
Collaborator

Please rebase + retarget against dev, otherwise looks good

@jonathonadams jonathonadams changed the base branch from master to dev November 24, 2023 01:03
@jonathonadams
Copy link
Contributor Author

Done.

Copy link
Collaborator

@alexpetros alexpetros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you!

@alexpetros alexpetros merged commit 264c0f6 into bigskysoftware:dev Nov 24, 2023
1 check passed
* The type of binary data being received over the WebSocket connection
* @default blob
*/
wsBinaryType?: Blob;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the type is wrong here, wsBinaryType should be a string as per the Websocket.binaryType doc as it's a parameter passed to the latter
Its default value is "blob" but not of type blob if I'm not mistaken.
It can also take only 2 values which might be relevant to specify them here to act as an enum?

Value
A string

"blob"
Use Blob objects for binary data. This is the default value.

"arraybuffer"
Use ArrayBuffer objects for binary data.

Copy link
Contributor Author

@jonathonadams jonathonadams Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, I think you're right. I can make another PR to amend.

I also realised after that methodsThatUseUrlParams?: string[]; is probably not strict enough and it should be ('get' | 'post' | ...etc )[]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just cut a new one and reference this one, no problem

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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.

None yet

3 participants