Merge branch 'worktree-iso-phase-1' into macros
# Conflicts: # shared/sx/helpers.py # shared/sx/pages.py # sx/sx/nav-data.sx # sx/sx/plans.sx # sx/sxc/pages/docs.sx
This commit is contained in:
@@ -463,11 +463,12 @@ def components_for_request(source: str = "",
|
||||
Reads the ``SX-Components`` header (comma-separated component names
|
||||
like ``~card,~nav-item``) and returns only the definitions the client
|
||||
is missing. If *source* is provided, only sends components needed
|
||||
for that source (plus transitive deps).
|
||||
for that source (plus transitive deps). If the header is absent,
|
||||
returns all needed defs.
|
||||
|
||||
*extra_names* — additional component names to include beyond what
|
||||
*source* references. Used by defpage to send components the page's
|
||||
content expression needs for client-side routing.
|
||||
*extra_names* — additional component names (``~foo``) to include
|
||||
beyond what *source* references. Used by ``execute_page`` to send
|
||||
components the page's content expression needs for client-side routing.
|
||||
"""
|
||||
from quart import request
|
||||
from .jinja_bridge import _COMPONENT_ENV
|
||||
|
||||
@@ -282,7 +282,7 @@ async def execute_page(
|
||||
# Compute content expression deps so the server sends component
|
||||
# definitions the client needs for future client-side routing
|
||||
extra_deps: set[str] | None = None
|
||||
if page_def.content_expr is not None:
|
||||
if page_def.content_expr is not None and page_def.data_expr is None:
|
||||
from .deps import components_needed
|
||||
from .parser import serialize
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user