Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview/pages: oob swap follow button

If there are more than one follow/unfollow button in one screen, we want
to update them at once like we do with star button

Signed-off-by: Seongmin Lee <git@boltless.me>

authored by

Seongmin Lee and committed by
Tangled
(Jul 17, 2026, 6:25 PM +0300) 2d32d8f4 49add549

+6 -1
+1
appview/pages/pages.go
··· 855 855 UserDid string 856 856 FollowStatus models.FollowStatus 857 857 FollowersCount int64 858 + HxSwapOob struct{} // empty struct so always truthy 858 859 } 859 860 860 861 func (p *Pages) FollowFragment(w io.Writer, params FollowFragmentParams) error {
+5 -1
appview/pages/templates/user/fragments/follow.html
··· 2 2 <button id="{{ normalizeForHtmlId .UserDid }}" 3 3 class="btn w-full flex gap-2 items-center group" 4 4 5 + data-follow-subject="{{ .UserDid }}" 6 + {{ if .HxSwapOob }}hx-swap-oob='outerHTML:[data-follow-subject="{{ .UserDid }}"]'{{ end }} 7 + 5 8 {{ if eq .FollowStatus.String "IsNotFollowing" }} 6 9 hx-post="/follow?subject={{.UserDid}}" 7 10 {{ else }} ··· 10 13 11 14 hx-trigger="click" 12 15 hx-target="#{{ normalizeForHtmlId .UserDid }}" 13 - hx-swap="outerHTML" 16 + hx-swap="none" 17 + hx-disabled-elt="this" 14 18 > 15 19 {{ if eq .FollowStatus.String "IsNotFollowing" }} 16 20 {{ i "user-round-plus" "size-4 inline group-[.htmx-request]:hidden" }}