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

@@ -2,32 +2,32 @@
;; in test/sxc/pages/__init__.py.
;; Service filter nav links
(defcomp ~test-service-nav (&key services active-service)
(defcomp ~components/test-service-nav (&key services active-service)
(<>
(~nav-link :href "/" :label "all"
(~shared:layout/nav-link :href "/" :label "all"
:is-selected (if (not active-service) "true" nil)
:select-colours "aria-selected:bg-sky-200 aria-selected:text-sky-900")
(map (lambda (svc)
(~nav-link :href (str "/?service=" svc) :label svc
(~shared:layout/nav-link :href (str "/?service=" svc) :label svc
:is-selected (if (= active-service svc) "true" nil)
:select-colours "aria-selected:bg-sky-200 aria-selected:text-sky-900"))
services)))
;; Test header menu row
(defcomp ~test-header-row (&key services active-service)
(~menu-row-sx :id "test-row" :level 1 :colour "sky"
(defcomp ~components/test-header-row (&key services active-service)
(~shared:layout/menu-row-sx :id "test-row" :level 1 :colour "sky"
:link-href "/" :link-label "Tests" :icon "fa fa-flask"
:nav (~test-service-nav :services services :active-service active-service)
:nav (~components/test-service-nav :services services :active-service active-service)
:child-id "test-header-child"))
;; Layout: full page header stack (reads root header values from env free variables)
(defcomp ~test-layout-full (&key services active-service)
(defcomp ~components/test-layout-full (&key services active-service)
(<> (~root-header-auto)
(~header-child-sx
:inner (~test-header-row :services services :active-service active-service))))
(~shared:layout/header-child-sx
:inner (~components/test-header-row :services services :active-service active-service))))
;; Map test dicts to test-row components
(defcomp ~test-rows (&key tests)
(defcomp ~components/test-rows (&key tests)
(<> (map (lambda (t)
(~test-row
:nodeid (get t "nodeid")
@@ -37,18 +37,18 @@
tests)))
;; Grouped test rows with service headers
(defcomp ~test-grouped-rows (&key sections)
(defcomp ~components/test-grouped-rows (&key sections)
(<> (map (lambda (sec)
(<> (~test-service-header
:service (get sec "service")
:total (str (get sec "total"))
:passed (str (get sec "passed"))
:failed (str (get sec "failed")))
(~test-rows :tests (get sec "tests"))))
(~components/test-rows :tests (get sec "tests"))))
sections)))
;; Results partial: conditional rendering based on running/result state
(defcomp ~test-results-partial (&key status summary-data tests sections has-failures)
(defcomp ~components/test-results-partial (&key status summary-data tests sections has-failures)
(let* ((state (get summary-data "state")))
(<>
(~test-summary
@@ -68,11 +68,11 @@
((= state "no-results") (~test-no-results))
((= state "empty-filtered") (~test-no-results))
(true (~test-results-table
:rows (~test-grouped-rows :sections sections)
:rows (~components/test-grouped-rows :sections sections)
:has-failures has-failures))))))
;; Wrap results in a div with optional HTMX polling
(defcomp ~test-results-wrap (&key running inner)
(defcomp ~components/test-results-wrap (&key running inner)
(div :id "test-results" :class "space-y-6 p-4"
:sx-get (when running "/results")
:sx-trigger (when running "every 2s")
@@ -80,7 +80,7 @@
inner))
;; Test detail section wrapper
(defcomp ~test-detail-section (&key test)
(defcomp ~components/test-detail-section (&key test)
(section :id "main-panel"
:class "flex-1 md:h-full md:min-h-0 overflow-y-auto overscroll-contain js-grid-viewport"
(~test-detail
@@ -90,11 +90,11 @@
:longrepr (or (get test "longrepr") ""))))
;; Detail page header stack (reads root header values from env free variables)
(defcomp ~test-detail-layout-full (&key services test-nodeid test-label)
(defcomp ~components/test-detail-layout-full (&key services test-nodeid test-label)
(<> (~root-header-auto)
(~header-child-sx
:inner (<> (~test-header-row :services services)
(~header-child-sx :id "test-header-child"
:inner (~menu-row-sx :id "test-detail-row" :level 2 :colour "sky"
(~shared:layout/header-child-sx
:inner (<> (~components/test-header-row :services services)
(~shared:layout/header-child-sx :id "test-header-child"
:inner (~shared:layout/menu-row-sx :id "test-detail-row" :level 2 :colour "sky"
:link-href (str "/test/" test-nodeid)
:link-label test-label))))))