Rebrand sexp → sx across web platform (173 files)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 11m37s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 11m37s
Rename all sexp directories, files, identifiers, and references to sx. artdag/ excluded (separate media processing DSL). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Events app fragment endpoints.
|
||||
|
||||
Exposes sexp fragments at ``/internal/fragments/<type>`` for consumption
|
||||
Exposes sx fragments at ``/internal/fragments/<type>`` for consumption
|
||||
by other coop apps via the fragment client.
|
||||
"""
|
||||
|
||||
@@ -31,9 +31,9 @@ def register():
|
||||
async def get_fragment(fragment_type: str):
|
||||
handler = _handlers.get(fragment_type)
|
||||
if handler is None:
|
||||
return Response("", status=200, content_type="text/sexp")
|
||||
return Response("", status=200, content_type="text/sx")
|
||||
result = await handler()
|
||||
ct = "text/html" if fragment_type in _html_types else "text/sexp"
|
||||
ct = "text/html" if fragment_type in _html_types else "text/sx"
|
||||
return Response(result, status=200, content_type=ct)
|
||||
|
||||
# --- container-nav fragment: calendar entries + calendar links -----------
|
||||
@@ -41,7 +41,7 @@ def register():
|
||||
async def _container_nav_handler():
|
||||
from quart import current_app
|
||||
from shared.infrastructure.urls import events_url
|
||||
from shared.sexp.helpers import sexp_call
|
||||
from shared.sx.helpers import sx_call
|
||||
|
||||
container_type = request.args.get("container_type", "page")
|
||||
container_id = int(request.args.get("container_id", 0))
|
||||
@@ -69,11 +69,11 @@ def register():
|
||||
date_str = entry.start_at.strftime("%b %d, %Y at %H:%M")
|
||||
if entry.end_at:
|
||||
date_str += f" – {entry.end_at.strftime('%H:%M')}"
|
||||
parts.append(sexp_call("calendar-entry-nav",
|
||||
parts.append(sx_call("calendar-entry-nav",
|
||||
href=events_url(entry_path), name=entry.name,
|
||||
date_str=date_str, nav_class=nav_class))
|
||||
if has_more and paginate_url_base:
|
||||
parts.append(sexp_call("htmx-sentinel",
|
||||
parts.append(sx_call("htmx-sentinel",
|
||||
id=f"entries-load-sentinel-{page}",
|
||||
hx_get=f"{paginate_url_base}?page={page + 1}",
|
||||
hx_trigger="intersect once",
|
||||
@@ -87,7 +87,7 @@ def register():
|
||||
)
|
||||
for cal in calendars:
|
||||
href = events_url(f"/{post_slug}/{cal.slug}/")
|
||||
parts.append(sexp_call("calendar-link-nav",
|
||||
parts.append(sx_call("calendar-link-nav",
|
||||
href=href, name=cal.name, nav_class=nav_class))
|
||||
|
||||
if not parts:
|
||||
@@ -123,7 +123,7 @@ def register():
|
||||
async def _account_nav_item_handler():
|
||||
from quart import current_app
|
||||
from shared.infrastructure.urls import account_url
|
||||
from shared.sexp.helpers import sexp_call
|
||||
from shared.sx.helpers import sx_call
|
||||
|
||||
styles = current_app.jinja_env.globals.get("styles", {})
|
||||
nav_class = styles.get("nav_button", "")
|
||||
@@ -135,7 +135,7 @@ def register():
|
||||
bookings_url = account_url("/bookings/")
|
||||
parts = []
|
||||
for href, label in [(tickets_url, "tickets"), (bookings_url, "bookings")]:
|
||||
parts.append(sexp_call("nav-group-link",
|
||||
parts.append(sx_call("nav-group-link",
|
||||
href=href, hx_select=hx_select, nav_class=nav_class, label=label))
|
||||
return "(<> " + " ".join(parts) + ")"
|
||||
|
||||
@@ -169,13 +169,13 @@ def register():
|
||||
|
||||
async def _link_card_handler():
|
||||
from shared.infrastructure.urls import events_url
|
||||
from shared.sexp.helpers import sexp_call
|
||||
from shared.sx.helpers import sx_call
|
||||
|
||||
slug = request.args.get("slug", "")
|
||||
keys_raw = request.args.get("keys", "")
|
||||
|
||||
def _event_link_card_sexp(post, cal_names: str) -> str:
|
||||
return sexp_call("link-card",
|
||||
def _event_link_card_sx(post, cal_names: str) -> str:
|
||||
return sx_call("link-card",
|
||||
title=post.title, image=post.feature_image,
|
||||
subtitle=cal_names,
|
||||
link=events_url(f"/{post.slug}"))
|
||||
@@ -193,7 +193,7 @@ def register():
|
||||
g.s, "page", post.id,
|
||||
)
|
||||
cal_names = ", ".join(c.name for c in calendars) if calendars else ""
|
||||
parts.append(_event_link_card_sexp(post, cal_names))
|
||||
parts.append(_event_link_card_sx(post, cal_names))
|
||||
return "\n".join(parts)
|
||||
|
||||
# Single mode
|
||||
@@ -207,7 +207,7 @@ def register():
|
||||
g.s, "page", post.id,
|
||||
)
|
||||
cal_names = ", ".join(c.name for c in calendars) if calendars else ""
|
||||
return _event_link_card_sexp(post, cal_names)
|
||||
return _event_link_card_sx(post, cal_names)
|
||||
|
||||
_handlers["link-card"] = _link_card_handler
|
||||
|
||||
|
||||
Reference in New Issue
Block a user