Merge branch 'worktree-sx-loop-cleanup' into macros

# Conflicts:
#	blog/sx/sx_components.py
#	federation/sx/profile.sx
#	federation/sx/sx_components.py
#	orders/sx/sx_components.py
This commit is contained in:
2026-03-05 16:08:36 +00:00
9 changed files with 356 additions and 0 deletions

View File

@@ -90,3 +90,16 @@
(url-for "social.actor_timeline_page"
:id (get remote-actor "id")
:before (get (last items) "before_cursor")))))))
;; Data-driven activities list (replaces Python loop in render_profile_page)
(defcomp ~federation-activities-from-data (&key activities)
(if (empty? (or activities (list)))
(~federation-activities-empty)
(~federation-activities-list
:items (<> (map (lambda (a)
(~federation-activity-card
:activity-type (get a "activity_type")
:published (get a "published")
:obj-type (when (get a "object_type")
(~federation-activity-obj-type :obj-type (get a "object_type")))))
activities)))))