I was using virtualdom key for two things, both of which I cannot do in 
0.17.

1. Instructing virtual-dom whether or not to reset scrolling-state of an 
element. Try it out here: https://debois.github.io/elm-mdl/: Scroll to the 
bottom, then switch tab. Because virtual-dom is re-using the div containing 
the main contents, it does not reset scrolling state, and so when you 
switch tab, you retain scrolling state. In 0.16, I could specify different 
keys for the old and new tabs, which would make virtual-dom clear 
scrolling-state on change. I can't find a way to do this in 0.17.

2. Controlling CSS transitions in dynamically generated list of elements. 
See @Richard's post above. Here is an example from the elm-mdl demo.

Proper behaviour: https://debois.github.io/elm-mdl/. On the "snackbar" tab, 
click the "Snackbar" button a few times, then click "Undo".

 

0.17 behaviour: https://debois.github.io/elm-mdl/broken-css.html. Try the 
same thing. Note boxes accidentally resizing. What happens is that 
virtualdom re-appropriates a div of width 0 for an element that wants to be 
width 200px; CSS transitions kick in. 

  


Cheers,

Søren
 

 




-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to