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 Clipboard copy enhancements (#27669) 2023-10-18 15:16:06 +00:00
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 Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
common-organization.js
contextpopup.js
copycontent.js
dropzone.js
emoji.js Update JS and PY dependencies (#27501) 2023-10-08 00:16:20 +00:00
eventsource.sharedworker.js
file-fold.js Update JS dependencies (#27922) 2023-11-06 21:14:32 +00:00
heatmap.js
imagediff.js Replace ajax with fetch, improve image diff (#27267) 2023-10-11 12:34:21 +00:00
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 Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
repo-commit.js Add Hide/Show all checks button to commit status check (#26284) 2023-11-02 14:49:02 +00:00
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 Use vitest globals (#27102) 2023-09-27 04:37:13 +00:00
repo-graph.js
repo-home.js Fix edit topic UI (#27925) 2023-11-06 09:23:50 +00:00
repo-issue-content.js Improve issue history dialog and make poster can delete their own history (#27323) 2023-09-28 08:43:20 +00:00
repo-issue-list.js Hide archived labels by default from the suggestions when assigning labels for an issue (#27451) 2023-10-17 16:10:45 +02:00
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 Fix duplicate project board when hitting enter key (#27746) 2023-10-23 12:40:33 +00:00
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