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

Update dependency io.github.wimdeblauwe:htmx-spring-boot-thymeleaf to v4 #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 30, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
io.github.wimdeblauwe:htmx-spring-boot-thymeleaf (source) 3.5.1 -> 4.0.1 age adoption passing confidence

Release Notes

wimdeblauwe/htmx-spring-boot (io.github.wimdeblauwe:htmx-spring-boot-thymeleaf)

v4.0.1

Compare Source

What's Changed
  • fix: Htmx response headers are now working again (#​157)

Full Changelog: wimdeblauwe/htmx-spring-boot@4.0.0...4.0.1

v4.0.0

Compare Source

What's Changed
Upgrade notes
Spring Boot 3.4.0 baseline

This version uses Spring Boot 3.4.0 as the baseline to work with. Be sure to first update your Spring Boot version before updating this library.

HtmxView is deprecated

HtmxView was introduced in this library to make it possible to support Out of Band Swaps. However, in Spring Framework 6.2 (Which is part of Spring Boot 3.4.0) there is now support for HTML Fragments.

As an example, this kind of code:

@​HxRequest
@​GetMapping("/users")
public HtmxResponse getMainAndPartial(Model model){
    model.addAttribute("users", userRepository.findAll());
    model.addAttribute("count", userRepository.count());
    return HtmxResponse.builder()
        .view("users/list")
        .view("users/count")
        .build();
}

Should be replaced with:

@​HxRequest
@​GetMapping("/users")
public View users(Model model) {
    model.addAttribute("users", userRepository.findAll());
    model.addAttribute("count", userRepository.count());

    return FragmentsRendering
            .with("users/list")
            .fragment("users/count")
            .build();
}

or

@​HxRequest
@​GetMapping("/users")
public Collection<ModelAndView> users() {
    return List.of(
            new ModelAndView("users/list", Map.of("users", userRepository.findAll())),
            new ModelAndView("users/count", Map.of("count", userRepository.count()))
    );
}

Full Changelog: wimdeblauwe/htmx-spring-boot@3.6.2...4.0.0

v3.6.3

Compare Source

What's Changed
  • fix: Htmx response headers are now working again

Full Changelog: wimdeblauwe/htmx-spring-boot@3.6.2...3.6.3

v3.6.2

Compare Source

This release adds support for annotations on exception handlers. It allows to do something like this:

@&#8203;ExceptionHandler(Exception.class)
@&#8203;HxReswap(HxSwapType.NONE)
public String handleException(Exception ex) {
  return "error";
}

If there are annotations on the controller methods as well, then annotations on the exception handler take precedence if there is an exception.

Full Changelog: wimdeblauwe/htmx-spring-boot@3.6.1...3.6.2

v3.6.1

Compare Source

What's Changed

Full Changelog: wimdeblauwe/htmx-spring-boot@3.6.0...3.6.1

v3.6.0

Compare Source

What's Changed

Full Changelog: wimdeblauwe/htmx-spring-boot@3.5.1...3.6.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/io.github.wimdeblauwe-htmx-spring-boot-thymeleaf-4.x branch from f3dbd2a to 20a7fb4 Compare December 5, 2024 22:03
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.

0 participants