WIP: feat: (un)subscribe button #527

Draft
yannham wants to merge 2 commits from tweag/yannham/subscribe-button into main
yannham commented 2025-04-30 16:02:52 +00:00 (Migrated from github.com)

Partially address #173. Depends on #526. Adds a (un)subscribe button on the issue detail view to subscribe or unsubscribe to a specific issue. The front-end part is currently really basic, let's use this PR as a basis for discussion.

TODO/To discuss

  • Add a status change message?
  • Avoid a reload of the page when posting?
  • (I'd like to leave that for a follow-up) add (un)subscribe buttons in the issue list view as well
Partially address #173. Depends on #526. Adds a (un)subscribe button on the issue detail view to subscribe or unsubscribe to a specific issue. The front-end part is currently really basic, let's use this PR as a basis for discussion. ## TODO/To discuss - [ ] Add a status change message? - [ ] Avoid a reload of the page when posting? - [ ] (I'd like to leave that for a follow-up) add (un)subscribe buttons in the issue list view as well
fricklerhandwerk commented 2025-04-30 18:28:50 +00:00 (Migrated from github.com)

The simple stupid way to do separate the code path for pure-HTML is to have a regular POST response for the full page reload, and let the htmx annotation on the button call a different endpoint that serves just that purpose. It's slightly noisy because you'd need to add an extra URL and view, and eventually we'd better build an abstraction.

The simple stupid way to do separate the code path for pure-HTML is to have a regular POST response for the full page reload, and let the htmx annotation on the button call a different endpoint that serves just that purpose. It's slightly noisy because you'd need to add an extra URL and view, and eventually we'd better build an abstraction.
This pull request has changes conflicting with the target branch.
  • src/website/webview/models.py
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin tweag/yannham/subscribe-button:tweag/yannham/subscribe-button
git switch tweag/yannham/subscribe-button

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff tweag/yannham/subscribe-button
git switch tweag/yannham/subscribe-button
git rebase main
git switch main
git merge --ff-only tweag/yannham/subscribe-button
git switch tweag/yannham/subscribe-button
git rebase main
git switch main
git merge --no-ff tweag/yannham/subscribe-button
git switch main
git merge --squash tweag/yannham/subscribe-button
git switch main
git merge --ff-only tweag/yannham/subscribe-button
git switch main
git merge tweag/yannham/subscribe-button
git push origin main
Sign in to join this conversation.
No description provided.