Fork me on GitHub
#membrane
<
2023-03-02
>
genekim19:03:32

@smith.adriane Holy cow. I managed to get all of the Fulcro RAD machinery working (well, shambling is probably a better word. 🙂 . Am now dealing with membrane hanging on show! and show-sync! — I’ll get a video posted shortly. Some windows even showing up.

phronmophobic19:03:34

👍 I have a bit of time today if you want to pair to help get you up and running.

genekim20:03:36

https://capture.dropbox.com/bvwuKkfzjyX64bzO OMG, that would be fabulous! Anytime after 30m from now and before 3pm would work! Here’s a quick description of current state. I’ll check code into repo as well, but this is so shaky, I don’t expect you’ll be able to reproduce anything. Actually, let me work on giving you exact steps to reproduce. 5m.

phronmophobic20:03:35

I'll check out the video, but if it's hanging while trying to show the window, it's most likely that something is blocking on the main thread.

phronmophobic20:03:52

It looks like something is updating. What do you mean by hanging?

genekim20:03:20

REPL session never returns from sync show.

genekim20:03:48

I have to break the evaluation to get repl prompt back. Is that expected behavior?

phronmophobic20:03:16

Yes. The sync versions are mainly when running from app main. It will block until you close the window.

genekim20:03:27

Oh!!! Wonderful! Umm, the main issue is that the current rows “var” in current state is still empty. Isn’t being… gosh, I don’t even know the words. Isn’t being passed in.

genekim20:03:42

I’m available anytime now. Will be putting in more code to figure out what the “component state” actually is…. DM me whenever you’re ready.

genekim20:03:22

props (the map being passed in to defsc component) is nil. Don’t know what that means…

phronmophobic20:03:30

It's been quite a while since I've looked into this so I don't exactly remember how all the pieces fit.

genekim20:03:19

I’ve been using Fulcro for 3 years, and I still don’t know how all the pieces fit. Gimme 5m: doing a simpler component to render a story/article. That will teach me something about how this works…

phronmophobic20:03:10

I seem to be missing a namespace: com.example.components.database-queries

genekim20:03:46

Oh. You also need to get the back-end working. Here. Let me start a video of the full startup sequence from scratch.

genekim21:03:16

https://capture.dropbox.com/At5m9cSN30ccMCbi Puzzling over something, but here’s the video on how to startup

genekim21:03:23

less than 2m.

genekim21:03:50

• use datomic alias when starting up • go to datomic/development.clj • run (restart) That gets the backend running.

genekim21:03:43

FWIW, I think the data is all there. I just don’t understand how components actually get rendered. 🙂 Wanna jump on a call, and see if we can get the Fulcro machinery to issue queries and get its data/state loaded?

genekim21:03:58

Maybe bound it to 30m — if we can’t get it running, maybe we ask if Tony can jump in and give us some pointers…

genekim21:03:14

…sorry for barfing more stuff here… What seems to be missing. We should be passing in “client/app” somewhere, which contains all the state, which components query.

phronmophobic21:03:32

I think membrane fulcro tries to wrap all that up for you

phronmophobic21:03:58

I'm making a cup of coffee, but I'll be ready after that.

genekim23:03:02

@smith.adriane OMG, Fulcro RAD report is working!!!! My question: when I update the defsc form and reload, the view doesn’t update. (Maybe I just need to go back to the dev-view? Gotta admit: I’m a little foggy-headed now, and probably should leave this alone until tomorrow. But exciting!) https://capture.dropbox.com/SWpwbu5Gc2OAtY0K

🎉 2
genekim23:03:21

https://capture.dropbox.com/8A3FEU5kiBi4EGz0 Complete demo of how to run — things to note! • when you manually get the RAD report running (I show you how — it’s a report/run and report/start), the view updates! That’s amazing! It shows that Fulcro updates are making it to membrane. • The mystery: when you update a defsc component, it doesn’t trigger an update. I wonder how we can trigger that? (I will look into Fulcro docs and see if live coding update/experience works in your TODO demo.)

phronmophobic00:03:24

> • The mystery: when you update a defsc component, it doesn’t trigger an update. I wonder how we can trigger that? (I will look into Fulcro docs and see if live coding update/experience works in your TODO demo.) I believe renders get triggered from fulcro so you need to trigger a rerender when you redefine a component. I'm not sure where you ended up putting the render-root! function, but you'll need to call that after you redefine a component. Not sure what the best way to make it easy to automatically rerender when you define a component. Maybe either a macro that wraps defsc, some repl middleware, or add watches on the component vars.

genekim00:03:35

I tried manually rendering, but that didn’t seem to do anything. I will look into it again when I get home. And I was just reading this! :) https://github.com/thiru/clj-reloader/blob/master/src/reloader/core.clj

genekim00:03:27

In the meantime, thinking of just adding a counter to force a refresh every second. :)

genekim00:03:33

(That probably won’t work. I think it requires remounting the component — I was banging away on that when I had to step away.. will look at it. I think hot code reload is what I’ll work on next. What’s so compelling about membrane is how immediate everything is.)

genekim03:03:43

Got live-reloading to work! 50m video posted: Some triumphant moments! • 17m: got rows rendering • 23m: got row numbers working • 27m: rendering all 7000 stories! https://capture.dropbox.com/YaC4HT24weWLR1WE

genekim03:03:20

Got stuck trying to figure out why report isn’t paginating, instead rending all 7K entries. 🙂 Wrapping up soon, but so fun!

genekim18:03:28

PS: at around 17m, I finally figured out that I needed apply to get things to render. That was a couple of min trying to figure out what was going wrong.

genekim18:03:25

(Everything after 30m was me trying to figure out how to get RAD pagination working — I forgot to add a required map key. Oops. not worth watching.)