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

HtmxAjaxHelperContext typedef should have all optional fields #2701

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

anentropic
Copy link
Contributor

Description

The typedef is currently more strict than the code, and prevents IMHO the most useful way to configure ajax requests.

I also added a clarification to the htmx.ajax docs about what specifying source in the context object actually does.

See discussion here:
#2698

Testing

Please explain how you tested this change manually, and, if applicable, what new tests you added. If
you're making a change to just the website, you can omit this section.

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
    ...oh, do the docs and code changes need to be in separate PRs?
  • 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

CONTRIBUTING.md Outdated Show resolved Hide resolved
@Telroshan Telroshan added the documentation Improvements or additions to documentation label Jul 7, 2024
@Telroshan
Copy link
Collaborator

Telroshan commented Jul 7, 2024

do the docs and code changes need to be in separate PRs?

Since the code changes here only affect the JSDoc thus the "code's documentation" + it comes from the same source issue/discussion, I would say it's totally fine.

Though, could you please :

  • remove the changes to the duplicated htmx scripts in www? Those are generated from src or dist when we publish a release
  • remove the change to CONTRIBUTING.md? I think we'll do that in another PR as it's not directly related to the problem here

@anentropic
Copy link
Contributor Author

do the docs and code changes need to be in separate PRs?

Since the code changes here only affect the JSDoc thus the "code's documentation" + it comes from the same source issue/discussion, I would say it's totally fine.

Though, could you please :

  • remove the changes to the duplicated htmx scripts in www? Those are generated from src or dist when we publish a release
  • remove the change to CONTRIBUTING.md? I think we'll do that in another PR as it's not directly related to the problem here

Thanks, have made those changes.

@1cg 1cg merged commit d9eb6d7 into bigskysoftware:dev Jul 8, 2024
1 check passed
kubeden pushed a commit to kubeden/htmx that referenced this pull request Jul 11, 2024
…software#2701)

* all fields of HtmxAjaxHelperContext should be optional

* update docs for htmx.ajax to describe purpose of source field in context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants