Hi,
I have implemented an example on top of my tea-tree package, that is now at a level that is sufficient to demonstrate its purpose. Specifically that in Elm it is possible to have stale events (constructed from an older version of the Model
before the current one) and this tree implementation lets you reference nodes in the tree by Path
s which do not capture the stale state of the tree.
https://github.com/the-sett/tea-tree
To run the example:
cd examples
elm-reactor
# go to http://localhost:8000/index.html
Tree zippers cannot be used in events because they capture the state of the tree, and when there are stale events they overwrite the updates made with other zippers. I refer to the original discussion if you want to refresh yourself about it:
https://discourse.elm-lang.org/t/a-tree-for-tea-tea-tree/1427
Also see this Ellie for a demonstration of how stale events can occur:
https://ellie-app.com/yVC9wPk33xa1
I am aiming to make this sunburst diagram behave like the one below. This will also be used to test how efficient the map
operation is over the tree when it is used to implement an animation of the whole tree.