0
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-13 10:00:04 +01:00
gitea/templates/repo
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
..
actions Fix the runs will not be displayed bug when the main branch have no workflows but other branches have (#28359) 2023-12-06 01:13:59 +00:00
branch Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
cite Update JS and PY dependencies (#27501) 2023-10-08 00:16:20 +00:00
code Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
diff Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
editor Revert "Fix EOL handling in web editor" (#28101) 2023-11-22 09:14:16 +00:00
find
graph Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
issue Don't do a full page load when clicking the subscribe button (#28871) 2024-01-20 20:44:51 +01:00
migrate Fix duplicate ID when deleting repo (#28520) 2023-12-19 04:40:05 +00:00
projects Use full width for project boards (#28225) 2023-11-27 17:43:52 +00:00
pulls Add Hide/Show all checks button to commit status check (#26284) 2023-11-02 14:49:02 +00:00
release Add download attribute to release attachments (#28739) 2024-01-09 16:51:20 +08:00
settings Add branch protection setting for ignoring stale approvals (#28498) 2024-01-15 07:20:01 +00:00
tag Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
wiki Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
activity.tmpl Render code block in activity tab (#28816) 2024-01-16 22:38:09 +08:00
blame.tmpl
branch_dropdown.tmpl
clone_buttons.tmpl Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
clone_script.tmpl
commit_load_branches_and_tags.tmpl
commit_page.tmpl Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
commit_status.tmpl Restore warning commit status (#27504) 2023-10-08 22:16:06 +00:00
commit_statuses.tmpl Add Hide/Show all checks button to commit status check (#26284) 2023-11-02 14:49:02 +00:00
commits_list_small.tmpl Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
commits_list.tmpl Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
commits_table.tmpl Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
commits.tmpl
create_helper.tmpl
create.tmpl Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
empty.tmpl Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
file_info.tmpl
forks.tmpl
graph.tmpl Fix more "locale" usages (#27259) 2023-09-25 20:42:40 +08:00
header.tmpl Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
home.tmpl Add word-break to repo description in home page (#27924) 2023-11-07 23:52:08 +00:00
icon.tmpl cleanup repo details icons/labels (#27644) 2023-10-16 23:06:15 +02:00
latest_commit.tmpl Show latest commit for file (#28067) 2024-01-15 17:42:15 +01:00
packages.tmpl
release_tag_header.tmpl Improve RSS feed icons (#28368) 2023-12-06 20:29:26 +00:00
search_name.tmpl
search.tmpl Fix 500 error of searching commits (#28576) 2023-12-21 23:09:14 +00:00
shabox_badge.tmpl
sub_menu.tmpl Enable followCursor for language stats bar (#27713) 2023-10-22 13:06:04 +00:00
unicode_escape_prompt.tmpl
upload.tmpl
user_cards.tmpl
view_file.tmpl Show latest commit for file (#28067) 2024-01-15 17:42:15 +01:00
view_list.tmpl Show latest commit for file (#28067) 2024-01-15 17:42:15 +01:00
watchers.tmpl