Country - Map (Experimental deck) UX improvements#733
Conversation
- Preserve visual context when flipping to back side of card, instead of starting @ world view and re-zooming - Touchpad events overwhelming the default handler, replace it with a smoother one - Prevent stale state from incorrectly coloring country on back side of card
|
Thanks very much for the fixes and changes! I haven't yet tested the new behaviour (or compared it to the old one), but reading through the code it generally seems sensible.
Possibly, but that shouldn't be a blocker for improving this for ourselves here. (Maybe add a TODO to the comment near the
Yeah, I remember this being a known shortcoming when the interactive map was first implemented. Your fixing this is very much appreciated! :) I'm slightly confused by the change to (Note: I don't use the interactive maps myself and am not too familiar with the code, only having looked through it when it was merged.) @helitopia if you have time any feedback would be appreciated! |
unnecessary, card state is now guarded by init front/back cleanup
Removed this and I haven't been able to replicate whatever I was seeing. I was more focused on the zoom fix so I didn't really dig into whatever was happening there. If it was related to stale card state, the new session cleanup in initFront/initBack should take care of it anyway. |
|
Hi guys! LGTM Just a quick reminder to you that experimental deck remains a POC since The latest state of things was me (edit) migrating to newer version of Unfortunately I stopped the research for indefinite amount of time due to higher-priority items. More context is in the following issue - 638. (edit 2) You may start reading from here to save some time. @joshfrench feel free to research and contribute to the actual implementation instead of band-aiding the POC (which is also okay). |
aplaice
left a comment
There was a problem hiding this comment.
Thanks! Testing this looks great! The gradual zoom with a touchpad, in particular, is a huge improvement.
Some enhancements to the map UX:
Experience is particularly bad on a touchpad due to jsVectorMap's event handling. Rather than zoom by a fixed multiplier for each scroll event received -- which can be many on a trackpad compared to a mouse -- normalize the delta based on input mode. (This might be fixed upstream in newer versions of jsVectorMap?)
Card backs start on the zoomed-out world view before zooming to the correct country, which makes it hard to correlate with where you actually clicked. Before flipping, set the back map view to match the front to preserve visual context.
zoom-to-country.mp4
End result:
✅ Successful procrastination
❌ Did not learn any countries