Description
This PR addresses the issue forgejo/forgejo#12951 by implementing the fixes suggested in this comment.
The changes are made to the following template files:
- on the repo star/unstar button
- on the repo watch/unwatch button
- on the issue notification button
Tests have been added to ensure that the URL of the page doesn't change when the user clicks those buttons.
Checklist
The contributor guide contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's AI Agreement. There also are a few conditions for merging Pull Requests in Forgejo repositories. You are also welcome to join the Forgejo development chatroom.
Tests for JavaScript changes
(can be removed for Go changes)
- I added test coverage for JavaScript changes...
- in
web_src/js/*.test.jsif it can be unit tested. - in
tests/e2e/*.test.e2e.jsif it requires interactions with a live Forgejo server (see also the developer guide for JavaScript testing).
- in
Documentation
- I created a pull request to the documentation to explain to Forgejo users how to use this change.
- I did not document these changes and I do not expect someone else to do it.
Release notes
- This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. (merger note: it will not because no stable versions with the regression were published)
- This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.
The decision if the pull request will be shown in the release notes is up to the mergers / release team.
The content of the release-notes/<pull request number>.md file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead.