-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maintains zoom level and centers active pins #2219 #2236
Conversation
Looks nice! I can’t see the code changes that you made, but hopefully nothing is hardcoded and the locations and pans and everything are being calculated dynamically based on the visible map area? ( which is tricky because the text panel can be different sizes and the user can adjust the panel size manually) Please also test that it works correctly with all map/text panel splits on mobile and with all screen sizes! The one situation that I’m thinking of here is where the user is on mobile and has adjusted the split screen so that the map is 80% of the screen and the text panel is 20%. Does the map centering also work there? If it does, then this looks good to me and I’d say push as fast as possible to public if @Shienny1 doesn’t find any problems. |
@fancyham That's a good point! Right now it doesn't account for a user manually adjusting the panel sizing after they make a search. Zooming will still work fine but the centering could be off in that case. I'll update it to factor in the panel size when calculating the long. and lat. offsets. |
@fancyham Okay, so it does stay horizontally centered no matter what. The vertical positioning doesn't change on mobile when the text panel is pulled down. Is that the desired behavior? Or should the pin and visible map area also move vertically when the text panel is pulled up and down? |
It'd be amazing if adjusting the map's percentage of the screen kept the center of the map centered dynamically as the user adjusts the split. The zoom level stays the same. Would that be possible? Sounds hard but I think that's what a user would ideally want to happen. This would help users keep track of what they're looking at, rather than be confused by the pin they're looking at getting covered up by the text panel they just increased the size of, then having to manually pan the map to find the pin again. |
@fancyham Please let me know if I'm understanding correctly! So the vertical centering should change with the panel resizing, unlike it is now? If so, the only problem I see is that the map area would need to change with each adjustment in order to keep the pin centered. And since the user is probably manually moving around the map when it's 80% of the screen, if they moved to a different area and then adjust the panel, the map scrolling up and changing to account for that might be confusing. Right now it's the same as it is on my mobile yelp app or google maps app, where if they move the panel up or down the map position stays the same to help the user stay oriented. |
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.
As far as I can tell, this is working really well! Tried various zoom levels, and various ways of causing the panning (typing in the address box, clicking on map pins, selecting a listing from the list box), and it all seems to work really well. I think it might be kind of jarring for the user to pan the map as the user drags the drag bar up and down on mobile or opens/closes the side drawer on desktop.
Good points! I think the map dynamically keeping things centered is perhaps too clever for its own good, and yes, it could be visually jarring. Knowing that Apple and Google don’t do it are great datapoints. This is good to push! Thanks! |
BTW, I found an example of the ‘automatically zoom to keep what you were looking at on-screen even as you change the viewport’ idea we were discussing above inside Uber’s app. It looks tricky to implement but quite useful — in this case, a trip to an airport — so it keeps that full route on-screen by shrinking or expanding it as needed, meaning that I’m comforted in knowing that Uber hasn’t forgotten the route I’ve been working on (imagine what it’d fee like if the map didn’t zoom… people trust what they can see, so if something important goes off-screen, that can be a problem): RPReplay_Final1728934051.mov |
Fixes #2219
desktopscreenrecording10-7.mov
mobilescreenrecording10-7.mov