Re:Declarative Dragging
by disconcision on Sunday November 08, 2026 @04:07PM
(#50417266)
an author here (andrew). down to answer questions though it might be a bit until i get to them
[ Parent
| on HN ]
Re:Declarative Dragging
by terabytest on Sunday November 08, 2026 @04:16PM
(#50417354)
Out of curiosity, does your library support physical springs for animation between states? That’d be a great touch.
Re:Declarative Dragging
by disconcision on Sunday November 08, 2026 @09:06PM
(#50420083)
so far the library is history-independent wrt transitions, which is a nice simplification but does preclude more physics-y interactions.
All I have to say is thank you for doing this! This is truly super cool. It’s a rare kind of gem to see thoughtful work like this in our new AI era.
Re:Declarative Dragging
by michalsustr on Sunday November 08, 2026 @05:00PM
(#50417803)
Very cool demo! One idea I had in the back of my mind is extending grammar of graphics for interactive visualisations. What you did might be a good way how to approach this! Did you think about doing something like this btw.?
Someone else asked something similiar but basically, how does / should this work when candidate drop targets are many e.g. when dragging a first or second rectangle onto a page in Figma when no relationships have obviously been set.
Re:Declarative Dragging
by disconcision on Sunday November 08, 2026 @09:22PM
(#50420201)
not 100% sure this is what you're asking but for continuous degrees of freedom i.e. numeric model parameters we have the 'vary' operator, which is used in all our canvas-type examples. more in the paper (section 5 under the numerical optimization header). in the trivial case this allows for unconstrained positioning
Perfect answer - thank you
so a comment right above yours asks a question I'm curious about too, and I wish that person asked you, so I'm copying it here:
--- Does this also work when the search space becomes large? I fear this might lead to an exponential blowup.
(The examples shown are all tiny) ---
Re:Declarative Dragging
by disconcision on Monday November 09, 2026 @11:58PM
(#50436235)
there's a small section on perf in the paper (under implementation). the current implementation has poor asymptotic behavior when there are lots of reachable states. this is somewhat intrinsic to the approach. we've talked about various ideas for better behavior in a lot of common cases, but i think that ultimately for cases with more than a few hundred reachable states, a bespoke implementation may be the way to go