forgejo/web_src/js/features
Yarden Shoham 14f6fcf448
Don't do a full page load when clicking the subscribe button (#28871)
- Refactor the form around the subscribe button into its own template
- Use htmx to perform the form submission
- `hx-boost="true"` to prevent the default form submission behavior of a
full page load
- `hx-sync="this:replace"` to replace the current request (in case the
button is clicked again before the response is returned)
  - `hx-target="this"` to replace the form tag with the new form tag
  - `hx-push-url="false"` to disable a change to the URL
  - `hx-swap="show:no-scroll"` to preserve the scroll position
- Change the backend response to return a `<form>` tag instead of a
redirect to the issue page
- Include `htmx.org` in javascript imports

This change introduces htmx with the hope we could use it to make Gitea
more reactive while keeping our "HTML rendered on the server" approach.

# Before


![before](https://github.com/go-gitea/gitea/assets/20454870/4ec3e81e-4dbf-4338-9968-b0655c276d4c)

# After


![after](https://github.com/go-gitea/gitea/assets/20454870/8c8841af-9bfe-40b2-b1cd-cd1f3c90ba4d)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
2024-01-20 20:44:51 +01:00
..
admin Use appSubUrl for OAuth2 callback URL tip (#28266) 2023-11-29 01:37:12 +00:00
comp Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
captcha.js
citation.js Don't show unnecessary citation JS error on UI (#28433) 2023-12-12 11:31:11 +00:00
clipboard.js
codeeditor.js Update JS dependencies (#28537) 2023-12-30 05:29:03 +00:00
colorpicker.js
common-global.js Don't do a full page load when clicking the subscribe button (#28871) 2024-01-20 20:44:51 +01:00
common-issue-list.js Polyfill SubmitEvent for PaleMoon (#28441) 2023-12-15 07:26:36 +08:00
common-issue-list.test.js
common-organization.js
contextpopup.js
copycontent.js
dropzone.js
emoji.js
eventsource.sharedworker.js
file-fold.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
heatmap.js
imagediff.js
install.js
notification.js
org-team.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
pull-view-file.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
repo-branch.js
repo-code.js
repo-code.test.js
repo-commit.js
repo-common.js
repo-diff-commit.js
repo-diff-commitselect.js
repo-diff-filetree.js
repo-diff.js Polyfill SubmitEvent for PaleMoon (#28441) 2023-12-15 07:26:36 +08:00
repo-editor.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
repo-findfile.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
repo-findfile.test.js
repo-graph.js
repo-home.js Fix edit topic UI (#27925) 2023-11-06 09:23:50 +00:00
repo-issue-content.js
repo-issue-list.js
repo-issue-pr-form.js
repo-issue-pr-status.js Fix the overflow style for "Hide all checks" (#27932) 2023-11-07 18:53:35 +00:00
repo-issue.js Fix incorrect URL for "Reference in New Issue" (#28716) 2024-01-07 10:50:03 +00:00
repo-legacy.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
repo-migrate.js
repo-migration.js
repo-projects.js
repo-release.js
repo-settings.js Add branch protection setting for ignoring stale approvals (#28498) 2024-01-15 07:20:01 +00:00
repo-template.js
repo-unicode-escape.js
repo-wiki.js
sshkey-helper.js
stopwatch.js
tablesort.js
tribute.js
user-auth-webauthn.js
user-auth.js
user-settings.js