host: no flash on relate/unrelate — server-render the picker's first page
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 34s
Relating/removing re-renders the kind's editor (outerHTML); the swapped-in picker's results <ul> was empty and only filled after its 'load' fetch, so the candidate list briefly emptied (a visible flash). Render the first page of candidates INTO the results <ul> server-side (host/blog--relation-editor builds it inline via cons, the same splice pattern the current-relations list uses), so the re-rendered picker arrives already populated; the 'load' trigger then re-fetches the same page and morphs it in place — invisible. No empty state, no flash. Rendered inline rather than via the ~relate-picker component because component args are evaluated, so pre-built candidate li-trees can't be spliced through one (they'd be applied as calls). The component is left in place but unused. Server-side only — the client engine (orchestration.sxbc, last commit's re-bind fix) is unchanged. host conformance 278/278 (new: editor server-renders candidates), web engine suite 8/8, run-picker-check 3/3. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -281,6 +281,14 @@
|
||||
(contains? html "input delay:200ms, load")
|
||||
(contains? html "rp-related-results")))
|
||||
(list true true true))
|
||||
;; the editor server-renders the first page of candidates INTO the picker's results
|
||||
;; <ul>, so a re-rendered editor is never briefly empty (no flash). The candidate row
|
||||
;; for an existing post appears inside the results ul.
|
||||
(host-bl-test "editor server-renders the first page of candidates into the picker"
|
||||
(let ((html (render-page (host/blog--relation-editor "alpha-post" "related"))))
|
||||
(list (contains? html "id=\"cand-related-") ;; a candidate row is present
|
||||
(contains? html "Beta Post"))) ;; an unrelated post is offered
|
||||
(list true true))
|
||||
;; Paging is server-driven: a full page carries a "load more" sentinel that, when
|
||||
;; revealed, GETs the next page and replaces itself (outerHTML), preserving q.
|
||||
(host-bl-test "load-more sentinel: revealed, outerHTML-swap, next offset, preserved q"
|
||||
|
||||
Reference in New Issue
Block a user