cartoframes
cartoframes copied to clipboard
Improve zoom and scroll user experience
Context
While working in a notebook, I'm noticing that the issue of scroll for page navigation vs. map zoom in/out, is an issue.
To do
To be defined
Or will notebook savy ppl not encounter this?
I think we should allow the user to activate / deactivate the zoom controls when creating the map, and decide the default behaviour (if we want it activated or deactivated by default)
The interactions are the same as on a webpage, so people will find it kind of annoying, especially if it's posted as a webpage (which is common: https://nbviewer.jupyter.org/gist/andy-esch/eba5f8b645b1ae99467f478fdd44d2ac)
As interaction defaults, adding zoom controls (plus home!), and disabling scroll wheel zoom feels good to me. A common pattern for exposing extra options like these is as kwargs
. matplotlib is the most common one to follow this pattern. It's a way to stuff in advanced or lesser known options without making the function signature huge.
The interactions are the same as on a webpage, so people will find it kind of annoying
Yes, I am one of them :) and cool demo!
Totally in agreement with the options (also like the idea of "home").
Sounds like we all agree on: scroll disabled and zoom controls by default with the options to change. Is that right?
Since we are in the process of the map/legend/widget design, I can respond in the other ticket asking for zoom controls to be considered in the mocks as well.
I'm starting to reconsider the scrollwheel zoom. One way it's great is that if you want to zoom to a fractional level to get a specific view of the data that integer zooms wouldn't be as good for. I also love how I have more control on the zooming and centering with the scrollwheel and I don't want to enable it every time I create a map. So.. I think I want it enabled by default now 😝
In that case, we could leave the scrolling enabled by default and show the "Home" icon as soon as the map is scrolled (?). So if someone accidentally scrolls the map while navigating there is a short way back to the original position.
@Lady-Aga I like that idea and think that makes a lot of sense. @andy-esch take your point, my preference is still no scroll wheel but if you think that will make the experience better, then ok :)
I don’t like it either but think it’s the best experience. I really wish that if a user was really scrolling on a page then the map wouldn’t zoom.
On Fri, May 3, 2019 at 9:44 AM Mamata Akella [email protected] wrote:
@Lady-Aga https://github.com/Lady-Aga I like that idea and think that makes a lot of sense. @andy-esch https://github.com/andy-esch take your point, my preference is still no scroll wheel but if you think that will make the experience better, then ok :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CartoDB/cartoframes/issues/634#issuecomment-489100242, or mute the thread https://github.com/notifications/unsubscribe-auth/AAH6FIHQHLBGLM5R76EDMXDPTQ6UJANCNFSM4HJMYQBQ .
-- Andy Eschbacher Data Scientist @MrEPhysics
CARTO Made in NYC, Madrid, and DC
Hi. I have tested the scroll behavior and I think it is really nice as is.
- If you start scrolling out of a map you enter in scroll mode although you pass over a map
- If you stand for a while over the map, without scrolling, you enter in zoom mode inside the map
- There is plenty of space around the notebook to scroll it (left or right)
- The "home" button is the same as running the cell again. However, we can include it as an option.
IMO, I think we can close this issue, what do you think?
Agree.
I have checked it with some data scientists and they all see it as a pain (I also hate it) but there is not an easy solution to detect whether the user wants to scroll the page or to zoom the map.
Let's close it for now then, and we can reopen it once we have it clearer :)
reopening this because there have been many people expressing that when maps are embedded in something like a blog post, that having the scroll wheel zoom enabled by default is not an ideal user experience...
now that we are interacting with the maps in other places (outside of the notebook), this is becoming more of an issue.
for example: https://carto.com/blog/retail-revenue-prediction-data-science/
Once you get "stuck" on a map it can get zoomed all the way out as you are attempting to scroll the page and finding your way back to the original extent of the map once that's done is nearly impossible.
can we revisit the idea of setting this as a true/false
option? please :)
thanks!
Thanks @makella for bringing this back! In addition, this is going to be needed to embed (as you mention) the notebook in the developer center (the examples section includes embedded notebooks)
I'd name this parameter scroll_zoom
to be set false
by default.
Do you think we should include + - zoom controls to the viz then?
good idea! would the zoom controls be a true/false option too? i am thinking for things like the Layout, if zoom controls aren't wanted... but not sure if that is relevant!
Yep! We can do the following:
If scroll_zoom=False
, then zoom_controls=True
and the other way round, if scroll_zoom=True
, then zoom_controls=False
. However, you could overwrite zoom_controls
if, for example, you want to activate or deactivate both features. How does it sound? Too complex, maybe?
totally! that's what i was thinking exactly... love it and don't think it is too complex!
Thumbs up for scroll_zoom
and other zoom control options!
Nice! We already know this is a problem and this seems a more or less fast solution. The reason we didn't tackle this before was because users told us "I want to be able scroll the page without zooming the map but I don't want to lose the zooming experience when zooming". Thoughts?
@cmongut so I'm guessing the user comment comes from the notebook? The problem is that how the scrolling can "stick" on the map outside of the notebook context where you lose the extent and can't scroll the page.
How many users was this? I've had 5 people at least tell me the opposite. Also, we are dealing with maps outside of the notebook context when published too so we have to think of both use cases. In a notebook you can select the cell a map is in and have control vs. on a webpage or in our documentation that isn't possible.
The user will not lose the zooming in/out experience, they will just have to set it to true or false. So all of the behaviour will remain, it is just a matter of turning it on or off.
Yeap, I was just thinking about other solution to the zoom controls. Like clicking on one component to enable/disable zoom.
so more of a button?
i'm not sure if in the blog we can get focus on a map by selecting it... also not sure if that would work in our doc but i see not a button, similar to how it is in the notebook, is that right?
Yesterday I was talking with @makella about this. My proposal was to see if it makes sense to implement something like this:
I was trying to give the same zoom experience to users when they enable it. @makella told me that some maps use the gear icon to hide additional functionality. At the same time, she told me that what we have already implemented are the zoom controls so it seems the way to go :)
- Add option Map to disable mouse zoom (+ add zoom buttons)
this is great!!
since we've discussed in this ticket before, would there be an opportunity with this enhancement to also add some sort of home button/action to recenter the map to its original extent? after using CF more, it makes a lot of sense for both notebook and published maps (especially in the cases where scroll zoom is set to true)
having the option to disable zoom will make a huge difference so the likelihood of getting "lost" on a map will decrease, but that need to go back where you started requires that you either rerun a cell in the notebook and/or refresh the page on a published map.
i know we don't have a design for this right now, but maybe it doesn't have to be anything fancy and can be an addition to the zoom in/out controls (?)