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

feat: implement HTMX plugin using litestar-htmx #3837

Merged
merged 7 commits into from
Oct 24, 2024
Merged

feat: implement HTMX plugin using litestar-htmx #3837

merged 7 commits into from
Oct 24, 2024

Conversation

cofin
Copy link
Member

@cofin cofin commented Oct 20, 2024

Description

This plugin migrates the HTMX integration to litestar.plugins.htmx.

This logic has been moved to it's own repository named litestar-htmx

This is in preparation for 3.0 release where contrib will be deprecated.

Closes

@cofin cofin requested review from a team as code owners October 20, 2024 22:02
@github-actions github-actions bot added area/datastructures area/dependencies This PR involves changes to the dependencies area/plugins This PR involves changes to the plugins size: medium type/feat pr/internal labels Oct 20, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.42%. Comparing base (ffcecb1) to head (527cef6).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3837      +/-   ##
==========================================
+ Coverage   98.41%   98.42%   +0.01%     
==========================================
  Files         332      333       +1     
  Lines       15500    15346     -154     
  Branches     1703     1694       -9     
==========================================
- Hits        15254    15105     -149     
+ Misses        113      111       -2     
+ Partials      133      130       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the area/docs This PR involves changes to the documentation label Oct 21, 2024
@cofin cofin enabled auto-merge (squash) October 21, 2024 20:52
tests/unit/test_template/test_template.py Outdated Show resolved Hide resolved
tests/unit/test_testing/test_test_client.py Outdated Show resolved Hide resolved
Copy link
Member

@provinzkraut provinzkraut left a comment

Choose a reason for hiding this comment

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

Right now this is a breaking change though, due to the fact that this line here sets the request class of the application to HTMXRequest.

https://github.com/litestar-org/litestar-htmx/blob/4f5fc871ee5011bcb4b3b422c476db09770bf574/litestar_htmx/plugin.py#L42

@cofin
Copy link
Member Author

cofin commented Oct 22, 2024

Right now this is a breaking change though, due to the fact that this line here sets the request class of the application to HTMXRequest.

https://github.com/litestar-org/litestar-htmx/blob/4f5fc871ee5011bcb4b3b422c476db09770bf574/litestar_htmx/plugin.py#L42

There is no HTMXPlugin currently. This is actually new functionality that I've implemented with the move from contrib.

It looks like `.xml` file extensions are read as `text/xml` instead of `application/xml`.

Trio backend has some flaky tests on for the Server Side Sesssion backends.
Copy link

sonarcloud bot commented Oct 24, 2024

@cofin cofin disabled auto-merge October 24, 2024 14:54
Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3837

@cofin cofin merged commit 017464f into main Oct 24, 2024
26 checks passed
@cofin cofin deleted the htmx-contrib branch October 24, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datastructures area/dependencies This PR involves changes to the dependencies area/docs This PR involves changes to the documentation area/plugins This PR involves changes to the plugins pr/internal size: medium type/feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants