membrane

https://github.com/phronmophobic/membrane
2021-03-09T17:35:36.098800Z

@smith.adriane It apears the :or in defui isn't always working. At least, when I try to do

(basic/scrollview
  {:scroll-bounds [500 1000]
   :body          [(ui/rectangle 100 100)]})
I get an NPE due to offset being nil when it should be set with the default value here: https://github.com/phronmophobic/membrane/blob/5ee612ae8ab2ff1be3fb7838b1a864d8d771bff6/src/membrane/basic_components.cljc#L483

2021-03-09T17:36:08.099400Z

I can file a proper bug report and/or dig a bit deeper if you'd like

2021-03-09T17:36:26.099800Z

Strangely there's no NPE when body is just []

phronmophobic 2021-03-09T18:26:25.100100Z

@jjttjj, taking a look right now

phronmophobic 2021-03-09T18:44:42.102300Z

ok, the issue is because it uses the map argument rather than the destructured binding. I'll create an issue for it. It should work ok if it's called from within a defui.

2021-03-09T18:44:59.102600Z

@smith.adriane thanks!

phronmophobic 2021-03-09T18:46:56.104100Z

Are you using the scrollview within a defui? Otherwise, it won't provide the normal scrollview behavior

2021-03-09T18:48:46.104600Z

Oh, yeah, I wasn't, I'll give that a shot

phronmophobic 2021-03-09T18:51:23.106700Z

Fyi, the scrollview is a bit janky. When you mouse out of the scrollview element, it stops scrolling. If you're planning on using the scrollview, I can make sure to fix that soon.

phronmophobic 2021-03-09T18:52:49.108Z

I don't use scrollviews that often so I've been putting it off, but I feel like scrollviews are one of the first things people try so I should probably just fix it.

2021-03-09T19:17:43.109300Z

No problem, I don't have a huge need for the scroll view, I just started using the actual components stuff a bit more and just happened to reach for the scrollview to try it out.

phronmophobic 2021-03-09T19:25:31.111800Z

Cool, I would love to know how the component stuff feels as you try it out. It's probably the most experimental part of the library and the hardest piece to get feedback about. All feedback is welcome, especially the stuff you don't like.

2021-03-09T19:44:38.112100Z

Sounds good, I'll keep you updated!

2021-03-09T19:54:15.112500Z

Btw that Bret Victor talk was excellent

👍 1
2021-03-09T19:54:47.113100Z

Though a little sad the landscape feels sort of the same as he described, 8 years later

phronmophobic 2021-03-09T19:55:34.113600Z

8 years!