Skip to content
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

Layers list polish #2277

Closed
yvonnesjy opened this issue Feb 20, 2024 · 9 comments · Fixed by #2309, #2310, #2311, #2312 or #2313
Closed

Layers list polish #2277

yvonnesjy opened this issue Feb 20, 2024 · 9 comments · Fixed by #2309, #2310, #2311, #2312 or #2313
Assignees
Labels
cesium enhancement pdg Permafrost Discovery Gateway
Milestone

Comments

@yvonnesjy
Copy link
Collaborator

  • Move visibility toggle to left
  • Change legend to settings button on hover
  • Drop layers icon

Mock: https://www.sketch.com/s/eea6a4f3-5c59-40e6-bf7f-64edc511e4cb

@yvonnesjy yvonnesjy added portals Anything related to portals pdg Permafrost Discovery Gateway cesium and removed portals Anything related to portals labels Feb 28, 2024
@yvonnesjy
Copy link
Collaborator Author

@robyngit Do we want to limit these changes to PDG? Or are we okay with applying them to all portals?

@robyngit
Copy link
Member

robyngit commented Mar 7, 2024

Do we want to limit these changes to PDG? Or are we okay with applying them to all portals?

@yvonnesjy, I have a few questions myself before I can answer.

Drop layers icon

In layer lists that are NOT grouped, will the icon be dropped or not? If we continue to show icons for non-grouped layer item, will the visibility toggle stay on the right?

Change legend to settings button on hover

I don't understand this - the legend will only show when you hover over the layer settings button? Will it not work on touch devices then?

(Reminder to update the documentation for the layer icon property of the map config if the icon will be deprecated or not show in some circumstances)

@hngrtr
Copy link

hngrtr commented Mar 8, 2024

The Figma prototype shows what I'm thinking here for desktop. Clicking a layer list item anywhere will toggle it's visibility, except for the gear icon that triggers the layer detail overlay.
(In the prototype, you can open and close any of the layer groups. LEO Permafrost, Drained Lake Basins, and Ice-Wedge Polygons (High) are the ones that can be toggled on and off.)

For mobile, I was thinking the primary tap action is toggling visibility like on desktop. The gear icon would shown when a layer is visible.

For layers that aren't grouped, you could continue to use the icons that are there today, but have them double as visibility indicators. That way clicking a layer toggles visibility the same way whether or not the layers are grouped. You could use the light grey treatment that the PDG eye icon uses when a layer is off for the icons on a portal like DRP. When you click the DRP layer to turn it on, the icon would then turn solid and be blue (or whatever unique theme color the portal specifies).

As far as the legends go, the full versions are in the layer detail overlay. The swatches are shown when a layer is on more for a "palette overview" and to distinguish between the palettes being used in other enabled layers. Since some of these datasets (particularly categorial ones) can potentially have a lot of values in a legend, the interactive thumbnail won't scale up to support that.

I'm not dead set on any of these answers and I hope we'll get some feedback in our interviews next week, but I'm happy to talk about these things in more detail anytime.

@yvonnesjy
Copy link
Collaborator Author

The prototype is looking great Doug! And good idea to use layer icons as visibility indicators for ungrouped layers.

That said, @robyngit does what Doug described sound okay to you for use cases outside PDG?

And @hngrtr since R1 is coming up real soon, I'll go ahead with the current prototype. I can update it if anything comes out of the interviews that's easy to fix. Otherwise, we can discuss. That sounds good?

@robyngit
Copy link
Member

Love the prototype @hngrtr!!

@yvonnesjy agree that these changes should applying to all portals and all uses of the Cesium map (including the data catalog). When you're developing, could you make sure to test how the changes look in the scenario where a data layer fails to load for some reason? The current behaviour is that there is a warning icon with a tooltip giving some details about the failure. Some other behaviour is fine, as long as it's handled in one way or another.

I think these small changes will have a big impact on the look and feel! Really excited to see this!

@yvonnesjy
Copy link
Collaborator Author

@hngrtr For the ungrouped cases, I'm running into a scenario in testing that some layers don't have an icon defined. We'll need a default icon in this case since it'll be doubling as the visibility toggle. I'm thinking of using the layers icon again, which is the default for layer group icon as well. WDYT?
image

yvonnesjy added a commit to yvonnesjy/metacatui that referenced this issue Mar 19, 2024
Per discussion [here]( NCEAS#2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
@robyngit robyngit added this to the 2.28.0 milestone Mar 19, 2024
yvonnesjy added a commit to yvonnesjy/metacatui that referenced this issue Mar 19, 2024
Per discussion [here]( NCEAS#2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
yvonnesjy added a commit that referenced this issue Mar 19, 2024
Per discussion [here]( #2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
yvonnesjy added a commit to yvonnesjy/metacatui that referenced this issue Mar 19, 2024
Per discussion [here]( NCEAS#2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
yvonnesjy added a commit that referenced this issue Mar 20, 2024
Per discussion [here]( #2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
yvonnesjy added a commit that referenced this issue Mar 25, 2024
Per discussion [here]( #2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
yvonnesjy added a commit that referenced this issue Mar 25, 2024
Per discussion [here]( #2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
yvonnesjy added a commit that referenced this issue Mar 25, 2024
Per discussion [here]( #2277 (comment)), if a layer list is not categorized, we'll use different colors in the layer icon to indicate layer shown vs hidden. For a categorized layer list, we use the eye icon instead, because a custom icon is already used for the category label.

The different treatments require LayerItemView to be aware of whether it's categorized or not.
robyngit pushed a commit that referenced this issue Mar 26, 2024
@yvonnesjy
Copy link
Collaborator Author

yvonnesjy commented Mar 28, 2024

Documenting the following fixes that we will implement as a part of the April release (R1):

  • Don’t wrap layer badges. Bug report
  • Don’t wrap layer labels. Bug report
  • Widen layers panel
  • Move layer details panel to right hand side
  • Don’t add paddings in settings button when legend is not available. Bug report
  • Non-PDG: Make layer icon more obvious as a visibility state indicator when layers are not nested. Bug report

@yvonnesjy
Copy link
Collaborator Author

yvonnesjy commented Apr 11, 2024

For "Widen layers panel", Doug has a version that works on PDG, but not so well on ADC's 3-part view because the map panel is much narrower. Talking with Robyn to figure out a best path forward now. While that's happening, @robyngit are we okay with releasing R1 without this fix and address it in R1.5 instead?

Implications:
Because the new theme keeps the layer names in one line, long layer names get truncated with ellipsis. Users can still see the full layer name if they hover over it, or open up the layer details panel.
https://github.com/NCEAS/metacatui/assets/8570665/5217e660-3f47-41d5-993d-c2b5907e6c6b

@robyngit
Copy link
Member

Let's move "Widen layers panel" to 2.29! Otherwise, everything in this issue is complete 🎉🎉🎉

@github-project-automation github-project-automation bot moved this from Ready to Done in Visualization/Frontend Apr 15, 2024
yvonnesjy added a commit that referenced this issue May 1, 2024
Two very small css changes so I'll just put them in one branch.

1. #2344 : Use portal font for feature info iframe when available (Barlow for PDG)
2. #2277 : .layers-panel__layers can host either .layer-list or .layer-category-list. I needed a border for it and wasn't thinking so I added to the children instead. .layer-list is a sharable component so it caused an unwanted border in a different scenario.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment