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

HTMX Integration #735

Merged
merged 18 commits into from
Mar 22, 2024
Merged

HTMX Integration #735

merged 18 commits into from
Mar 22, 2024

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Mar 12, 2024

Close: #660

  • Defines constants for HTMX Request Header and HTMX Response Headers
  • Defines HTMXResponse for out of band swaps.
  • Defines HtmxRequestUtils

Allows to bind a HttpRequestHeaders to a controller method.

@sdelamo sdelamo added the type: enhancement New feature or request label Mar 12, 2024
Close: #660

- Defines constants for HTMX Request Header and HTMX Response Headers
- Defines HTMXResponse for out of band swaps.
- Defines HtmxRequestUtils

Allows to bind a HttpRequestHeaders to a controller method.
@sdelamo sdelamo requested a review from timyates March 13, 2024 10:09
@sdelamo sdelamo marked this pull request as ready for review March 13, 2024 10:09
@sdelamo sdelamo changed the title HTMX WIP HTMX Integration Mar 13, 2024
sdelamo and others added 9 commits March 14, 2024 07:49
…tionProperties.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…tionProperties.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…tionProperties.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…tionProperties.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…tionProperties.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…tionTest.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…estHeadersTypedRequestArgumentBinderTest.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…Mapper.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…estUtils.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
@sdelamo sdelamo requested a review from timyates March 14, 2024 06:52
sdelamo and others added 3 commits March 14, 2024 07:54
…tionTest.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
…tionTest.java

Co-authored-by: Tim Yates <tim.yates@gmail.com>
* @param <T> The model type
*/
@Experimental
public final class HtmxResponse<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the plan to enable more builder methods to set common HTMX response headers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about that. However, I am not sure if it is necessary since you can do:

HttpResponse.ok(HttpResponse.builder()
    .modelAndView()
    .modelAndView()
    .build())
     .header(HtmxResponseHeaders.HX_REFRESH, StringUtils.TRUE);

@timyates
Copy link
Member

@sdelamo This should target the 5.2.x branch if it's for 4.4.0?

Copy link

sonarcloud bot commented Mar 21, 2024

@sdelamo sdelamo merged commit 18161e7 into master Mar 22, 2024
25 checks passed
@sdelamo sdelamo deleted the htmx branch March 22, 2024 10:58
sdelamo added a commit that referenced this pull request Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Integrate with HTMX
3 participants