Yōten: A social tracker for your language learning journey built on the atproto.

feat(views/partials): replace infinite scroll with "Load more" buttons #43

merged opened by brookjeynes.dev targeting master from push-yvvorrxqyprs
Labels

None yet.

Participants 1
AT URI
at://did:plc:4mj54vc4ha3lh32ksxwunnbh/sh.tangled.repo.pull/3mg6zmiucxv22
+35 -30
Diff #0
+7 -6
internal/server/views/partials/comment-feed.templ
··· 17 17 }) 18 18 } 19 19 if params.NextPage > 0 { 20 - <div 20 + <button 21 + type="button" 21 22 id="next-feed-segment" 22 23 hx-get={ templ.SafeURL(fmt.Sprintf("/%s/session/%s/feed?page=%d", params.StudySessionDid, params.StudySessionRkey, params.NextPage)) } 23 - hx-trigger="revealed" 24 24 hx-swap="outerHTML" 25 + hx-disabled-elt="this" 26 + class="btn btn-primary w-fit group self-center" 25 27 > 26 - <div class="flex justify-center py-4"> 27 - <i data-lucide="loader-circle" class="w-6 h-6 animate-spin text-text-muted"></i> 28 - </div> 29 - </div> 28 + Load more 29 + <i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i> 30 + </button> 30 31 } 31 32 }
+7 -6
internal/server/views/partials/friends-feed.templ
··· 12 12 }) 13 13 } 14 14 if params.NextPage > 0 { 15 - <div 15 + <button 16 + type="button" 16 17 id="next-friends-segment" 17 18 hx-get={ fmt.Sprintf("/friends/feed?mode=%spage=%d", params.FeedMode, params.NextPage) } 18 - hx-trigger="revealed" 19 19 hx-swap="outerHTML" 20 + hx-disabled-elt="this" 21 + class="btn btn-primary w-fit group self-center" 20 22 > 21 - <div class="flex justify-center py-4"> 22 - <i data-lucide="loader-circle" class="w-6 h-6 animate-spin text-text-muted"></i> 23 - </div> 24 - </div> 23 + Load more 24 + <i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i> 25 + </button> 25 26 } 26 27 </div> 27 28 if len(params.Feed) == 0 {
+7 -6
internal/server/views/partials/notification-feed.templ
··· 11 11 }) 12 12 } 13 13 if params.NextPage > 0 { 14 - <div 14 + <button 15 + type="button" 15 16 id="next-notification-segment" 16 17 hx-get={ templ.SafeURL(fmt.Sprintf("/notification/feed?page=%d", params.NextPage)) } 17 - hx-trigger="revealed" 18 18 hx-swap="outerHTML" 19 + hx-disabled-elt="this" 20 + class="btn btn-primary w-fit group self-center" 19 21 > 20 - <div class="flex justify-center py-4"> 21 - <i data-lucide="loader-circle" class="w-6 h-6 animate-spin text-text-muted"></i> 22 - </div> 23 - </div> 22 + Load more 23 + <i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i> 24 + </button> 24 25 } 25 26 </div> 26 27 if len(params.Feed) == 0 {
+7 -6
internal/server/views/partials/profile-feed.templ
··· 13 13 }) 14 14 } 15 15 if params.NextPage > 0 { 16 - <div 16 + <button 17 + type="button" 17 18 id="next-profile-segment" 18 19 hx-get={ templ.SafeURL(fmt.Sprintf("/%s/feed?page=%d", params.Profile.Did, params.NextPage)) } 19 - hx-trigger="revealed" 20 20 hx-swap="outerHTML" 21 + hx-disabled-elt="this" 22 + class="btn btn-primary w-fit group self-center" 21 23 > 22 - <div class="flex justify-center py-4"> 23 - <i data-lucide="loader-circle" class="w-6 h-6 animate-spin text-text-muted"></i> 24 - </div> 25 - </div> 24 + Load more 25 + <i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i> 26 + </button> 26 27 } 27 28 </div> 28 29 if len(params.Feed) == 0 {
+7 -6
internal/server/views/partials/study-session-feed.templ
··· 19 19 }) 20 20 } 21 21 if params.NextPage > 0 { 22 - <div 22 + <button 23 + type="button" 23 24 id="next-feed-segment" 24 25 hx-get={ templ.SafeURL(fmt.Sprintf("/feed?friends=%v&page=%d", params.IsFriendsFeed, params.NextPage)) } 25 - hx-trigger="revealed" 26 26 hx-swap="outerHTML" 27 + hx-disabled-elt="this" 28 + class="btn btn-primary w-fit group self-center" 27 29 > 28 - <div class="flex justify-center py-4"> 29 - <i data-lucide="loader-circle" class="w-6 h-6 animate-spin text-text-muted"></i> 30 - </div> 31 - </div> 30 + Load more 31 + <i class="w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" data-lucide="loader-circle"></i> 32 + </button> 32 33 } 33 34 </div> 34 35 if len(params.Feed) == 0 {

History

1 round 0 comments
sign up or login to add to the discussion
brookjeynes.dev submitted #0
1 commit
expand
feat(views/partials): replace infinite scroll with "Load more" buttons
expand 0 comments
pull request successfully merged