mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 21:46:49 +00:00
558f348881
Planned countries are off the map by default and come back through a switch above the globe, drawn dashed so they never read as somewhere you have been. The switch only appears once there is something planned to show, and it remembers its state. Three things that needed care: The colour palette is built from the visited countries alone. It assigns colours by index, so letting planned ones join would reshuffle the whole map every time the switch is flipped. countryMap decides both the tooltip and what a click does, so it is built from the visible countries — a hidden country has to fall through to the mark-as-visited branch or it becomes unclickable. The region layer read `data` without listing it as a dependency, which meant region colours already went stale on their own; adding the switch would have made that visible. Five copies of the optimistic mark-as-visited update have moved into withCountryMarkedVisited, which also promotes a planned country instead of adding it twice. Antarctica joins the continent row when someone has been.