lonboard icon indicating copy to clipboard operation
lonboard copied to clipboard

Tooltip viewer can be too crowded

Open kylebarron opened this issue 1 year ago • 9 comments

When you click on an object, maybe show a sidebar or a collapsible menu.

Overture is a good example. We might want a JSON viewer

kylebarron avatar Jul 30 '24 13:07 kylebarron

In #636, we replaced the tooltip with a scrollable side panel. Currently, there is no visual indication that a feature can be clicked to open the side panel, which was not necessary when the tooltip was used.

@kylebarron you suggested documenting this behavior. Do you have any recommendations on the best approach? I still believe it is possible to change the mouse pointer on feature hover to indicate interactivity. We can do something using getCursor like in here, but it might be better to track as an enhancement in a separated ticket.

vgeorge avatar Oct 02 '24 16:10 vgeorge

I think documenting it in the release notes and documentation website is fine and sufficient

kylebarron avatar Oct 02 '24 17:10 kylebarron

The side panel is a nice addition to lonboard. However, I believe there is still a need for a tooltip, albeit with selectable contents as opposed to dumping it all in the side panel. I have included a video showing the behaviour I'm about to make the following comments on.

  • I play with _height to show the effect of toggling expand/collapse cell output of the map; I'll note that with a height greater than the default cell output height, the toggle has to be "convinced" a little (like click three times before I can see the full map height), but that's not a big deal
  • I like the auto_highlight feature a lot;; when the side panel lets the user see enough of the image to notice the current panel is linked to the highlighted feature, all is fine; however
  • when the side panel covers the entire map, we have a problem; the 'x' becomes a kind of '<' because it is hidden by the bbox button in the top right

Playing with the notebook panel width (e.g. showing the lefthand side Jupyterlab panel) shows how the panel wraps content well. So I'm thinking : is there a way to restrict the side panel to a percentage of the map cell output so as to still be able to see the selected/highlighted feature ?

As to the tooltip functionality, I believe it would still be useful for quick identification of features, when one does not want the whole pedigree. show_tooltip set to True does not show a tooltip. I think if one were to define a tooltip object attached to the map (or layer ?) it should be selectable on the map like the PMTiles Viewer Popup/Show Attributes. I'll try to have a look but you guys are probably in a better position to do an eventual PR.

Thanx again for lonboard, really.

https://github.com/user-attachments/assets/4d0f1f27-de81-47a7-a109-18f1ea47c441

ymoisan avatar Oct 09 '24 16:10 ymoisan

Even more intuitive IMO : tooltip has instruction "click feature for more details" which pops the side panel.

ymoisan avatar Oct 10 '24 14:10 ymoisan

There are definitely some tooltip improvements we need to make. @vgeorge is out this week and hopefully we'll get some fixes in next week.

kylebarron avatar Oct 10 '24 14:10 kylebarron

The hover tooltips seen in https://github.com/developmentseed/lonboard/blob/e655269/README.md#lonboard looked cool, but I suppose they were removed in #636. Came here confused when show_tooltip = True wouldn't do anything.

Is there a way to re-enable the old way?

astrojuanlu avatar Jan 08 '25 15:01 astrojuanlu

Indeed, they were removed in https://github.com/developmentseed/lonboard/pull/636. I think replacing the tooltip entirely with the side panel was possibly not the right decision, because for datasets with few attribute columns, the tooltip might be more useful than a full side panel.

I'm open to restoring the tooltip under a flag.

show_tooltip = True wouldn't do anything.

If that is True, when you click on a feature it will show a side panel with attribute information. If that is False, no "picking" will be done on the map on click.

kylebarron avatar Jan 08 '25 17:01 kylebarron

+1 for both tooltip and side panel options

knaaptime avatar Jan 11 '25 17:01 knaaptime

I merged https://github.com/developmentseed/lonboard/pull/736 to bring back the tooltip. There's now a separate show_tooltip parameter on Map defaulting to False and show_side_panel, defaulting to True.

I'd like to get a new release out soon with this change.

kylebarron avatar Jun 17 '25 20:06 kylebarron