This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-12
Channels
- # announcements (7)
- # babashka (13)
- # beginners (14)
- # business (7)
- # clerk (4)
- # clj-kondo (21)
- # clojure (42)
- # clojure-denmark (5)
- # clojure-dev (16)
- # clojure-europe (27)
- # clojure-finland (1)
- # clojure-nl (1)
- # clojure-norway (36)
- # clojure-sweden (2)
- # clojure-uk (34)
- # clojurescript (29)
- # datomic (15)
- # emacs (1)
- # hyperfiddle (13)
- # jobs (11)
- # joyride (8)
- # malli (15)
- # missionary (10)
- # off-topic (5)
- # portal (6)
- # releases (3)
- # shadow-cljs (9)
- # spacemacs (28)
- # specter (2)
- # squint (12)
does anyone have a ui4-style contenteditable input i could borrow? i'd like a div whose text you can edit, and "input"
triggers an e/fn
with optimistic rendering
here's my first take, but it's unusable because the cursor gets reset to the start on every edit
#?(:cljs (defn inner-html [^js e] (.-target.innerHTML e)))
(defmacro content-editable [v V! & body]
`(div (props {:content-editable true
:contentEditable true})
(control "input" inner-html identity ~v ~V! dom/set-val ~@body)
(text ~v)))
Thatβs normal with contentEditable. You need to reset the cursor position on every re-render.
@ggaillard discovered something wonky in 689f5c44607d33897ccb213f887a9566e65f6f45
:
base.js:650 Uncaught Error: Importing test-only code into non-debug environment: goog.testing.stacktrace
at base.js:650:15
at append.js:2:1
(anonymous) @ base.js:650
(anonymous) @ append.js:2
Points here:
goog.setTestOnly = function(opt_message) {
if (goog.DISALLOW_TEST_ONLY_CODE) {
opt_message = opt_message || '';
throw new Error(
'Importing test-only code into non-debug environment' +
(opt_message ? ': ' + opt_message : '.'));
}
};
This happens on advanced compilation only, as you might have guessed from the error. The commit just prior to this one works fine.Unfortunately, the error is not more helpful than that. It just spits the entry point of the app (in append.js) and the Closure source location.
Thank you for the report. I think I know where to look at. Will keep you posted π
Not urgent or anything, I just discovered it when tracking master/configuring Jetty for the WSOD stuff.
Btw, the Jetty 12 release from ring-jetty9-adapter
has been updated with :ws-max-binary-message-size
and :ws-max-frame-size
, which means it now exposes the knobs needed to run Electric according to spec.
Eight months later I finally finished putting together a demo repo for combining electric with https://github.com/cjohansen/portfolio if anyone has interest https://github.com/alan-carroll/electric-portfolio