Use HTMX to inject a loading spinner #42
Labels
No labels
Agent/Chrome-Android
Agent/Chrome-Desktop
Agent/Chrome-iOS
Agent/Firefox-Android
Agent/Firefox-Desktop
Agent/Firefox-iOS
Agent/Safari-Desktop
Agent/Safari-iOS
Code/Backend
Code/DevOps
Code/Frontend
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aniram/cidadon#42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://htmx.org/attributes/hx-indicator/
HTMX is sexy but it is not the right tool for this job. The request that needs a loading spinner triggers a full rerender of the page and HTMX is made for partial replacement of HTML. I managed to show the loading spinner by listening on the submit of the form and toggling a CSS class that shows the spinner while initially the spinner is hidden, so when the request's response arrives with a full HTML page the spinner will be hidden again.