Revert render-dom-lake to original, simplify stepper lake
Reverted render-dom-lake SSR reuse — it broke OOB swaps (claimed old lake elements during morph, stale content in copyright). The framework's morphing handles lake updates correctly already. Stepper: lake passes nil on client (prevents raw SX flash), effect always calls rebuild-preview (no initial-render flag needed). Server renders the expression for SSR; client rebuilds via render-to-dom after boot when ~tw is available. Removed initial-render dict flag — unnecessary complexity. Copyright route not updating is a pre-existing issue: render-dom-island renders the header island inline during OOB content rendering (sets island-hydrated mark), but the copyright lake content doesn't reflect the new path. Separate investigation needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -920,17 +920,12 @@
|
||||
(dict "i" 0 "skip" false)
|
||||
args)
|
||||
(let
|
||||
((existing (when (and (client?) lake-id) (let ((el (dom-query (str "[data-sx-lake=\"" lake-id "\"]:not([data-sx-lake-claimed])")))) (when el (dom-set-attr el "data-sx-lake-claimed" "1")) el))))
|
||||
(if
|
||||
existing
|
||||
existing
|
||||
(let
|
||||
((el (dom-create-element lake-tag nil)))
|
||||
(dom-set-attr el "data-sx-lake" (or lake-id ""))
|
||||
(for-each
|
||||
(fn (c) (dom-append el (render-to-dom c env ns)))
|
||||
children)
|
||||
el))))))
|
||||
((el (dom-create-element lake-tag nil)))
|
||||
(dom-set-attr el "data-sx-lake" (or lake-id ""))
|
||||
(for-each
|
||||
(fn (c) (dom-append el (render-to-dom c env ns)))
|
||||
children)
|
||||
el))))
|
||||
|
||||
(define
|
||||
render-dom-marsh
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -346,7 +346,19 @@
|
||||
(resp-ok status get-header text)
|
||||
(when
|
||||
resp-ok
|
||||
(dom-set-inner-html main text)
|
||||
(let
|
||||
((ct (or (get-header "content-type") "")))
|
||||
(if
|
||||
(contains? ct "text/html")
|
||||
(let
|
||||
((parser (host-new "DOMParser"))
|
||||
(doc (host-call parser "parseFromString" text "text/html"))
|
||||
(content (host-call doc "querySelector" "#sx-content")))
|
||||
(if
|
||||
content
|
||||
(dom-set-inner-html main (host-get content "innerHTML"))
|
||||
(dom-set-inner-html main text)))
|
||||
(dom-set-inner-html main text)))
|
||||
(post-swap main)
|
||||
(host-call (dom-window) "scrollTo" 0 scroll-y)))
|
||||
(fn (err) (log-warn (str "fetch-and-restore error: " err))))))
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -433,15 +433,6 @@
|
||||
(run-post-render-hooks)
|
||||
(flush-collected-styles)
|
||||
(set-timeout (fn () (process-elements nil)) 0)
|
||||
(dom-listen
|
||||
(dom-window)
|
||||
"popstate"
|
||||
(fn
|
||||
(e)
|
||||
(let
|
||||
((state (host-get e "state"))
|
||||
(scrollY (if state (or (get state "scrollY") 0) 0)))
|
||||
(handle-popstate scrollY))))
|
||||
(dom-set-attr
|
||||
(host-get (dom-document) "documentElement")
|
||||
"data-sx-ready"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1589,7 +1589,7 @@
|
||||
(try-client-route pathname target-sel)
|
||||
(browser-scroll-to 0 scrollY)
|
||||
(let
|
||||
((headers (build-request-headers target "GET" url)))
|
||||
((headers (dict "SX-History-Restore" "true")))
|
||||
(fetch-and-restore target url headers scrollY)))))))
|
||||
|
||||
(define
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user