Closed oliverroick closed 1 month ago
@oliverroick I believe this is pointing to the right direction. We might need to create new states for each area section and apply styles when entering/exiting then, avoiding doing a area refetch when it doesn't change.
@oliverroick I added a new branch scrolly-vg
with a refactored approach based on your work. The main difference is that we avoid using a "submachine" to handle the different area view types, which would make it harder to observe URL changes and identify where the map effects should be applied. The diagram looks like this now:
Please note I haven't added the map side effects of state changes yet, but it should be less involved to add them now.
@oliverroick I merged our latest changes from scrolly-vg
and:
I believe this is working well and can serve as a foundation for the other PRs that introduce the section diagrams, so I'll go ahead and merge it.
ScrollTracker
component, which tracks scrolling events in the sidebar and updates the browser locationaction:parseAreaSection
, which handles changes to the location hash, and will later be extended to show and hide relevant layers on the map