HS: show command handles dialogs/details — dialog 10/10 complete, 435→437
- show compiler: emit hs-show! runtime call instead of direct dom-set-style - hs-show! runtime: dialog → showModal(), details → open=true, else display/opacity/visibility - dialog category fully passing (was 1/10) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -936,12 +936,7 @@
|
||||
(let
|
||||
((tgt (hs-to-sx (nth ast 1)))
|
||||
(strategy (if (> (len ast) 2) (nth ast 2) "display")))
|
||||
(cond
|
||||
((= strategy "opacity")
|
||||
(list (quote dom-set-style) tgt "opacity" "1"))
|
||||
((= strategy "visibility")
|
||||
(list (quote dom-set-style) tgt "visibility" "visible"))
|
||||
(true (list (quote dom-set-style) tgt "display" "")))))
|
||||
(list (quote hs-show!) tgt strategy)))
|
||||
((= head (quote transition)) (emit-transition ast))
|
||||
((= head (quote transition-from))
|
||||
(let
|
||||
|
||||
@@ -497,6 +497,20 @@
|
||||
(host-call el "close")
|
||||
(dom-set-prop el "open" false)))))
|
||||
|
||||
(define
|
||||
hs-show!
|
||||
(fn
|
||||
(el strategy)
|
||||
(let
|
||||
((tag (dom-get-prop el "tagName")))
|
||||
(cond
|
||||
((= tag "DIALOG")
|
||||
(when (not (dom-has-attr? el "open")) (host-call el "showModal")))
|
||||
((= tag "DETAILS") (dom-set-prop el "open" true))
|
||||
((= strategy "opacity") (dom-set-style el "opacity" "1"))
|
||||
((= strategy "visibility") (dom-set-style el "visibility" "visible"))
|
||||
(true (dom-set-style el "display" ""))))))
|
||||
|
||||
(define hs-first (fn (lst) (first lst)))
|
||||
|
||||
(define hs-last (fn (lst) (last lst)))
|
||||
|
||||
Reference in New Issue
Block a user