forgejo/templates/base
Gusted 14d9c386fd
[UI] Fix HTMX support for profile card
- There were two issues with the profile card since the introduction of
HTMX in 3e8414179c. If an HTMX request
resulted in a flash message, it wasn't being shown and HTMX was
replacing all the HTML content instead of morphing it into the existing
DOM which caused event listeners to be lost for buttons.
- Flash messages are now properly being shown by using `hx-swap-oob`
and sending the alerts on a HTMX request, this does mean it requires
server-side changes in order to support HTMX requests like this, but
it's luckily not a big change either.
- Morphing is now enabled for the profile card by setting
`hx-swap="morph"`, and weirdly, the morphing library was already
installed and included as a dependency. This solves the issue of buttons
losing their event listeners.
- This patch also adds HTMX support to the modals feature, which means
that the blocking feature on the profile card now takes advantage of
HTMX.
- Added a E2E test.
2024-07-17 01:41:32 +02:00
..
alert.tmpl [UI] Fix HTMX support for profile card 2024-07-17 01:41:32 +02:00
alert_details.tmpl Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-06 12:10:45 +08:00
disable_form_autofill.tmpl
footer.tmpl Remove DataRaceCheck (#29258) 2024-02-19 22:58:33 +01:00
footer_content.tmpl Add [other].SHOW_FOOTER_POWERED_BY setting to hide Powered by (#30253) 2024-04-07 15:40:31 +02:00
head.tmpl Add slogan config (#3752) 2024-06-07 17:12:48 +00:00
head_navbar.tmpl Migrate gt-hidden to tw-hidden (#30046) 2024-03-30 07:17:29 +01:00
head_opengraph.tmpl Fix opengraph meta for wiki pages (#4427) 2024-07-10 18:29:35 +00:00
head_script.tmpl Add <overflow-menu>, rename webcomponents (#29400) 2024-03-20 08:46:29 +01:00
head_style.tmpl
modal_actions_confirm.tmpl
paginate.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00