feature: Promote the basemap toggle - #1015
Conversation
7040bfc to
17fa179
Compare
This moves the basemap toggle to a first class component. There hasn't been any known traction on the experimental API but there was uptake of the basemap switcher component itself. This also fixes some bugs with the previous implementation: 1. It is more determinante than the previous one. Mostly because it's using internal selectors and wired right to the store. 2. The CSS is more sane and ported to Less so folks can more easily override the styling without rewriting the inline styles of the component.
17fa179 to
35c3f4a
Compare
|
The keyboard navigation changes look good to me. |
I was trying to give the user a path to issue elevation. For captive users like a city employee, they'd be able to reach out and say "Hey! This looks broken, plz can fix?" I think it's a sensible to have an error state but I definitely sympathize with making it less reachable.
We don't have a bespoke "background" flag. It's only a constructed concept that the mapbook allows us to more-or-less "mock." This obviously appears a bit more broken in our demo than I think it would be on a live site. I have a few thoughts on how we could move forward:
|
|
Can the layers to turn off be caught by group title? Like catching all layers within the "Backgrounds" group title here, gm3/examples/desktop/mapbook.xml Line 529 in f2876d7 multiple="true", nested groups, or toggling between multiple groups might make things a little more complicated. |
|
Or I guess a brute force method could be configuring all the layers to turn off before turning the toggled layer on. Essentially enumerating what is a "background" for the toggle. That could simplify some of the complexity of pulling from nested group titles or multiple group titles. |
|
Could we just point the basemap toggle at a mapbook group instead of giving it it's own layer list? I think that would get rid of most of the confusing behavior between the layer control and this new control. (It wouldn't need to even necessarily be an exclusive group, but probably only makes sense for leaf groups. Click on the new control just toggles that layer and if other layers turn off is part of the normal group handling.) |
|
I wouldn't select that group for the basemap toggle. Also, the nesting could be a problem. |
|
How the basemap toggle/switcher should work really depends on goals or target audience. I see the role of the basemap toggle for very basic users who might search one default thing and toggle one basemap button and then leave. For users willing to use the TOC, there are lots of basemaps, etc. I don't see the button/toggle users as advanced users. For advanced users the toggle is just a click saver. They can switch from the few "popular" options in the toggle or many more options themselves in the TOC since they know how to use the site. Most of these improvements target what I think are more advanced users. I think all those error message and other things are great for those users. I just don't see those users as the target of this tool. I'm targeting the user who comes to the site, types a random thing in a search box (name, address, map-taxlot, etc), gets zoomed to that result, turns on some basemap toggle, and leaves. Maybe an advanced "drive-by" user would get as advanced as clicking a neighboring property with the identify tool. I don't see these drive-by users reading anything much less sorting out a new vocabulary to know what it means and how to take action on it. I'm expecting these drive-by users, after minimal effort and minimum time duration (achieving either success or failure), to leave the site. |
I feel like my comment is consistent with this target audience, and my suggestion is to not update the behavior in this PR, but to improve the style/content/presentation of the messages that pop-up. |
|
This may be a difference of opinion of our users 😂. I think half of our users would be helped and half would be hurt by this:
The users who would be helped are already capably self-serving themselves in the TOC and I'm not worried about them. |
|
Haha, so then I am completely missing your point! What behavior change are you requesting in how the new feature works? The message you highlighted is intended to be for the people who would be confused if they got themselves into a situation where they bumped into it. Advanced users already don't have a problem that needs to be solved. Or at least that is how I interpret the situation, which seems consistent with what you are saying... |









This moves the basemap toggle to a first class component.
There hasn't been any known traction on the experimental API but there was uptake of the basemap switcher component itself.
This also fixes some bugs with the previous implementation:
Screencast.From.2026-08-02.11-47-47.mp4