@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#L483I can file a proper bug report and/or dig a bit deeper if you'd like
Strangely there's no NPE when body is just []
@jjttjj, taking a look right now
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
.
@smith.adriane thanks!
Are you using the scrollview within a defui
? Otherwise, it won't provide the normal scrollview behavior
Oh, yeah, I wasn't, I'll give that a shot
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.
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.
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.
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.
Sounds good, I'll keep you updated!
Btw that Bret Victor talk was excellent
Though a little sad the landscape feels sort of the same as he described, 8 years later
8 years!