Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: tasks on timeline not adjusting to zoom
There are issues in svelte with cascading dependencies in reactive declarations, from what I understand. Since `background color` relies on `$store.timelineColored`, having `textColor` rely on both seemed to cause issues. Removing the direct dependency of the store works, anyway.
- Loading branch information
61de9a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only worked on very small projects with svelte. I do love it, but I've seen those weird problems with these reactive dependencies that no-one can really explain, quite a few times out there 🤷♂️
61de9a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @lukemt,
This is not a problem with reactive declarations, it looks like a compiler bug, that I've reported here: sveltejs/svelte#9185
The issues you're referring to usually arise in cases when people update an upstream reactive variable in a downstream reactive statement. People hope this will trigger another update cycle, but Svelte stops after the first cycle. This behavior is intended. Here is a great explanation from a Svelte dev: sveltejs/svelte#5848 (comment)
Derived stores don't have those limitations and they behave more predictably, BTW.
61de9a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this describes it aptly! Thanks for the info!