eraeco / joy

JOY is a JavaScript framework for building user interfaces and progressive applications.
121 stars 25 forks source link

First compositor #15

Closed dmaevsky closed 1 year ago

dmaevsky commented 1 year ago

Not dealing with percentages yet. Only '~' as units for now

amark commented 1 year ago

Awesome! Really understandable code, and surprisingly small for what it is already doing/handling so well & correctly. Pulling.

Notes: (no need to reply) A) worried about the performance of generators/yield, so will want to revisit that with some comparison benchmarks later. 🔥 for using a Switch statement, I actually hate switch statements BUT in my streaming JSON parser I got a ~5% performance boost using Switch over If/Else chains.

B) innerLayout's double while loop, I know this is unavoidable cause have to do multiple passes to calculate widths/maxes, but will we be able to LIMIT boxes length to the current Line? Also: When dealing with scrolling I want to make sure that the compositing works well with culling/clipping other earlier/later boxes not within ~150% the screen size. This will be fairly important pretty early on that the compositor's architecture can handle this since infinite scrolling is one of the top 3 goals of the rendering engine (1. center-center by default 2. native infinite scrolling list views 3. responsive layout paths & reflowing between containers). Then double while loops don't worry me because it is constrained to only the composited portions of the screen/buffer and should still say fast with lots of items.

C) WARNING: ⚠️ my latest PRs on the security side brick SR from updating itself... which makes local development/testing agitatingly infuratingly impossible (everything gets cached and locked in weird impossible ways and won't reset). Maybe we should do a quick call for me to figure out how you can deactivate these things (probably commenting out lines 68 enclave.js which registers service.js and line 33 which does localStorage.sandbox =.


woooooow!!!! Seeing minHeight/maxHeight work and it auto expand is.... AMAZING. Holy cow dude, this engine SHREDS!!!!!! Look at this stress test video I recorded: https://twitter.com/SecureRender/status/1668807004943691777