Rename all 1,169 components to path-based names with namespace support

Component names now reflect filesystem location using / as path separator
and : as namespace separator for shared components:
  ~sx-header → ~layouts/header
  ~layout-app-body → ~shared:layout/app-body
  ~blog-admin-dashboard → ~admin/dashboard

209 files, 4,941 replacements across all services.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 22:00:12 +00:00
parent de80d921e9
commit b0920a1121
209 changed files with 4620 additions and 4620 deletions

View File

@@ -1,6 +1,6 @@
;; Checkout return page components
(defcomp ~checkout-return-header (&key (status :as string))
(defcomp ~checkout/return-header (&key (status :as string))
(header :class "mb-1 sm:mb-2 flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-4"
(div :class "space-y-1"
(h1 :class "text-xl sm:text-2xl md:text-3xl font-semibold tracking-tight"
@@ -16,23 +16,23 @@
((= status "missing") "We couldn\u2019t find that order \u2013 it may have expired or never been created.")
(t "We\u2019re still waiting for a final confirmation from SumUp."))))))
(defcomp ~checkout-return-missing ()
(defcomp ~checkout/return-missing ()
(div :class "max-w-full px-1 py-1"
(div :class "rounded-2xl border border-dashed border-rose-300 bg-rose-50/80 p-4 sm:p-6 text-sm text-rose-800"
"We couldn\u2019t find that order. If you reached this page from an old link, please start a new order.")))
(defcomp ~checkout-return-failed (&key (order-id :as string))
(defcomp ~checkout/return-failed (&key (order-id :as string))
(div :class "rounded-2xl border border-rose-200 bg-rose-50/80 p-4 sm:p-6 text-sm text-rose-900 space-y-2"
(p :class "font-medium" "Your payment was not completed.")
(p "You can go back to your cart and try checkout again. If the problem persists, please contact us and mention order "
(span :class "font-mono" (str "#" order-id)) ".")))
(defcomp ~checkout-return-paid ()
(defcomp ~checkout/return-paid ()
(div :class "rounded-2xl border border-emerald-200 bg-emerald-50/80 p-4 sm:p-6 text-sm text-emerald-900 space-y-2"
(p :class "font-medium" "All done!")
(p "We\u2019ll start processing your order shortly.")))
(defcomp ~checkout-return-ticket (&key (name :as string) (pill :as string) (state :as string) (type-name :as string?) (date-str :as string) (code :as string) (price :as string))
(defcomp ~checkout/return-ticket (&key (name :as string) (pill :as string) (state :as string) (type-name :as string?) (date-str :as string) (code :as string) (price :as string))
(li :class "px-4 py-3 flex items-start justify-between text-sm"
(div
(div :class "font-medium flex items-center gap-2"
@@ -42,23 +42,23 @@
(div :class "text-xs text-stone-400 font-mono mt-0.5" code))
(div :class "ml-4 font-medium" price)))
(defcomp ~checkout-return-tickets (&key items)
(defcomp ~checkout/return-tickets (&key items)
(section :class "mt-6 space-y-3"
(h2 :class "text-base sm:text-lg font-semibold" "Event tickets in this order")
(ul :class "divide-y divide-stone-200 rounded-2xl border border-stone-200 bg-white/80" items)))
;; Data-driven ticket items (replaces Python loop)
(defcomp ~checkout-return-tickets-from-data (&key (tickets :as list))
(~checkout-return-tickets
(defcomp ~checkout/return-tickets-from-data (&key (tickets :as list))
(~checkout/return-tickets
:items (<> (map (lambda (tk)
(~checkout-return-ticket
(~checkout/return-ticket
:name (get tk "name") :pill (get tk "pill")
:state (get tk "state") :type-name (get tk "type_name")
:date-str (get tk "date_str") :code (get tk "code")
:price (get tk "price")))
(or tickets (list))))))
(defcomp ~checkout-return-content (&key summary items calendar tickets status-message)
(defcomp ~checkout/return-content (&key summary items calendar tickets status-message)
(div :class "max-w-full px-1 py-1"
(when summary
(div :class "rounded-2xl border border-stone-200 bg-white/80 p-4 sm:p-6 space-y-2" summary))

View File

@@ -4,6 +4,6 @@
;; Renders the "orders" link for the account dashboard nav.
(defhandler account-nav-item (&key)
(~account-nav-item
(~shared:fragments/account-nav-item
:href (app-url "orders" "/")
:label "orders"))

View File

@@ -3,40 +3,40 @@
;; --- orders layout: root + auth + orders rows ---
(defcomp ~orders-layout-full (&key (list-url :as string))
(defcomp ~layouts/full (&key (list-url :as string))
(<> (~root-header-auto)
(~header-child-sx
(~shared:layout/header-child-sx
:inner (<> (~auth-header-row-auto)
(~orders-header-row :list-url (or list-url "/"))))))
(~shared:auth/orders-header-row :list-url (or list-url "/"))))))
(defcomp ~orders-layout-oob (&key (list-url :as string))
(defcomp ~layouts/oob (&key (list-url :as string))
(<> (~auth-header-row-auto true)
(~oob-header-sx
(~shared:layout/oob-header-sx
:parent-id "auth-header-child"
:row (~orders-header-row :list-url (or list-url "/")))
:row (~shared:auth/orders-header-row :list-url (or list-url "/")))
(~root-header-auto true)))
(defcomp ~orders-layout-mobile ()
(defcomp ~layouts/mobile ()
(~root-mobile-auto))
;; --- order-detail layout: root + auth + orders + order rows ---
(defcomp ~order-detail-layout-full (&key (list-url :as string) (detail-url :as string))
(defcomp ~layouts/order-detail-layout-full (&key (list-url :as string) (detail-url :as string))
(<> (~root-header-auto)
(~order-detail-header-stack
(~shared:orders/detail-header-stack
:auth (~auth-header-row-auto)
:orders (~orders-header-row :list-url (or list-url "/"))
:order (~menu-row-sx :id "order-row" :level 3 :colour "sky"
:orders (~shared:auth/orders-header-row :list-url (or list-url "/"))
:order (~shared:layout/menu-row-sx :id "order-row" :level 3 :colour "sky"
:link-href (or detail-url "/") :link-label "Order"
:icon "fa fa-gbp"))))
(defcomp ~order-detail-layout-oob (&key (detail-url :as string))
(<> (~oob-header-sx
(defcomp ~layouts/order-detail-layout-oob (&key (detail-url :as string))
(<> (~shared:layout/oob-header-sx
:parent-id "orders-header-child"
:row (~menu-row-sx :id "order-row" :level 3 :colour "sky"
:row (~shared:layout/menu-row-sx :id "order-row" :level 3 :colour "sky"
:link-href (or detail-url "/") :link-label "Order"
:icon "fa fa-gbp" :oob true))
(~root-header-auto true)))
(defcomp ~order-detail-layout-mobile ()
(defcomp ~layouts/order-detail-layout-mobile ()
(~root-mobile-auto))

View File

@@ -13,14 +13,14 @@
:page (or (request-arg "page" "1") "1"))
:layout (:orders
:list-url (str (route-prefix) (url-for "defpage_orders_list")))
:filter (~order-list-header
:search-mobile (~search-mobile
:filter (~shared:orders/list-header
:search-mobile (~shared:controls/search-mobile
:current-local-href "/"
:search (or search "")
:search-count (or search-count "")
:hx-select "#main-panel"
:search-headers-mobile "{\"X-Origin\":\"search-mobile\",\"X-Search\":\"true\"}"))
:aside (~search-desktop
:aside (~shared:controls/search-desktop
:current-local-href "/"
:search (or search "")
:search-count (or search-count "")
@@ -30,7 +30,7 @@
(detail-url-raw (str pfx (url-for "defpage_order_detail" :order-id 0)))
(detail-prefix (slice detail-url-raw 0 (- (len detail-url-raw) 2)))
(rows-url (str pfx (url-for "orders.orders_rows"))))
(~orders-list-content
(~shared:orders/list-content
:orders orders
:page page
:total-pages total-pages
@@ -49,12 +49,12 @@
:list-url (str (route-prefix) (url-for "defpage_orders_list"))
:detail-url (str (route-prefix) (url-for "defpage_order_detail" :order-id order-id)))
:filter (let* ((pfx (route-prefix)))
(~order-detail-filter-content
(~shared:orders/detail-filter-content
:order order
:list-url (str pfx (url-for "defpage_orders_list"))
:recheck-url (str pfx (url-for "orders.order.order_recheck" :order-id order-id))
:pay-url (str pfx (url-for "orders.order.order_pay" :order-id order-id))
:csrf (csrf-token)))
:content (~order-detail-content
:content (~shared:orders/detail-content
:order order
:calendar-entries calendar-entries))