This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-03
Channels
- # announcements (5)
- # aws (3)
- # babashka (52)
- # babashka-sci-dev (23)
- # beginners (51)
- # calva (191)
- # clj-commons (18)
- # clj-kondo (11)
- # cljdoc (39)
- # cljsrn (3)
- # clojure (24)
- # clojure-czech (3)
- # clojure-dev (2)
- # clojure-europe (15)
- # clojuredesign-podcast (2)
- # clojurescript (8)
- # conjure (2)
- # core-typed (151)
- # cursive (15)
- # data-science (3)
- # datalevin (4)
- # datomic (8)
- # figwheel-main (21)
- # fulcro (37)
- # gratitude (3)
- # honeysql (1)
- # hyperfiddle (2)
- # introduce-yourself (1)
- # malli (3)
- # membrane (54)
- # off-topic (21)
- # other-languages (4)
- # portal (18)
- # re-frame (12)
- # reagent (7)
- # releases (2)
- # sci (64)
- # scittle (1)
- # spacemacs (14)
- # sql (2)
- # vim (4)
- # xtdb (6)
Hey coming back to this https://clojurians.slack.com/archives/CVB8K7V50/p1646659055749079 I still can't get it to work, tried a clean project with shadow-cljs, when I use this kind of dep in deps.edn:
com.phronemophobic/membrane {:mvn/version "0.9.31.5-beta"}
I get this build error:
(resolve-sci-meta first-form)
Use of undeclared Var membrane.component/resolve-sci-meta
Which skimming the code doesn't make sense because it should be defined under a :default clause.
When I depend it like this:
com.phronemophobic/membrane {:local/root ../membrane_latest"}
It builds, but then the textarea fails to work for me in the way described in the previous thread, it pops up with the right text but the text then doesn't update when typing. I'll try and dig into this tomorrow but thought I'd post in case you knew an obvious cause
do you have the code that uses the text area?
yea, if you post the project, I can try that as well
how do you clean and compile?
delete .shadow-cljs and .cpcache and anything in the public folder and run shadow-cljs watch app
that should work and just "yarn" "shadow-cljs watch backend" "shadow-cljs watch app" "yarn start" in different terminals I think
I'm not familiar with yarn, but I'll give it a try
I'm just not that familiar with the js ecosystem
the breadth of technologies you've built as a possible membrane backend is impressive
The canvas needs to have tabindex="0"
as an attribute.
When I update public/index.html to :
<html>
<head>
<meta charset="UTF-8">
<!-- -->
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self'"> -->
<title>tab</title>
</head>
<body>
<canvas tabindex="0" id="canvas" height="900px" width="1600px"></canvas>
</body>
<script src="assets/app/js/main.js"></script>
<!-- <script src="assets/app/js/make_alert.js"></script> -->
</html>
It seems to work<canvas tabindex="0" id="canvas" height="900px" width="1600px"></canvas>
Adding tabindex="0"
being the only changeThere's a note about it in the https://github.com/phronmophobic/membrane/blob/master/docs/webgl.md#hello-world doc, but it's very easy to miss. I should probably add a warning or something in membrane.webgl/run
actually I now have a very strange bug where once I click into the window it spams "m"s but once I click delete once it works
the tabindex=0 thing rings a bell, I dunno if I pulled this code from some sample code somewhere
no problem! I'm going to add a warning to membrane.webgl/run
so that it's easier to identify the problem.
I thought it would be versioning because lots of other stuff in webgl is working just not that
I don't want to have membrane.webgl/run
add the tabindex property automatically since there are legitimate use cases for not caring about key events and not wanting the canvas to accept focus.
any idea re the "m" spam? I guess I should css out the orange border for the canvas focus, weird that buttons were working without focus
focus is just about key events
mostly, but the canvas can still receive mouse events
this didn't work and then I went to work on other parts of my project and just came back
what do you mean by "m" spam?
in the console?
no worries at all. It's very easy to miss.
The m spam is very curious
If you refresh the page, does it happen again?
this might be an issue that I'm running electron through windows WSL2 in the fake windows-linux thing
it happened over again several times with that behavior so it's not something quite as stupid as me actually holding down m but now it's ghosted away
ok, have a good night!