Move events/market/blog composition from Python to .sx defcomps (Phase 9)
Continues the pattern of eliminating Python sx_call tree-building in favour of data-driven .sx defcomps. POST/PUT/DELETE routes now pass plain data (dicts, lists, scalars) and let .sx handle iteration, conditionals, and layout via map/let/when/if. Single response components wrap OOB swaps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,28 +1,9 @@
|
||||
"""Price helpers, OOB helpers, product detail/meta data builders."""
|
||||
"""Price helpers, product detail/meta data builders."""
|
||||
from __future__ import annotations
|
||||
|
||||
from shared.sx.helpers import sx_call
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# OOB orphan cleanup
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
_MARKET_DEEP_IDS = [
|
||||
"product-admin-row", "product-admin-header-child",
|
||||
"product-row", "product-header-child",
|
||||
"market-admin-row", "market-admin-header-child",
|
||||
"market-row", "market-header-child",
|
||||
"post-admin-row", "post-admin-header-child",
|
||||
]
|
||||
|
||||
|
||||
def _clear_deeper_oob(*keep_ids: str) -> str:
|
||||
"""Clear all market header rows/children NOT in keep_ids."""
|
||||
to_clear = [i for i in _MARKET_DEEP_IDS if i not in keep_ids]
|
||||
return " ".join(sx_call("clear-oob-div", id=i) for i in to_clear)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Price helpers
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user