zui icon indicating copy to clipboard operation
zui copied to clipboard

Broken Right Click in Detail Pane for Maps & Arrays

Open jameskerr opened this issue 2 years ago • 2 comments

The right click menu does not work for any compound type (array, set, map, record) in the detail pane and detail page.

The reason is we don't render each item in the compound type like we do in the viewer.

The menu items that are broken are:

  • Filter in value
  • Filter not in value
  • New search with this value

https://user-images.githubusercontent.com/3460638/135928137-699a6572-9688-4cb3-8db4-56a5b3bc47de.mp4

jameskerr avatar Oct 04 '21 21:10 jameskerr

This should be address when we work on #1851

jameskerr avatar Oct 07 '21 03:10 jameskerr

Since a lot has changed recently, I revisited this issue with current Brim commit 7ba79d8.

As shown in the attached video, things have mostly changed for the better, but could still use some improvement. This test data data.zson is used in the repro.

{my_array:[1,2,3,4,5]}
{my_set:|["foo",1.5]|}
{my_map:|{"a":1(int32),"b":2(int32),"c":3(int32)}|}
{my_record:{orig_h:10.164.94.120,orig_p:39681(port=uint16),resp_h:10.47.3.155,resp_p:3389(port)}}

What we see is how complex types like set, map, and array are now rendered in the Detail panel with a shorthand that just summarizes the number of elements (e.g., [...5] to show that my_array is five elements.) If the user wants to expand the list of elements, they can click to the Inspector view. However, one improvement we might still make here would be to "gray out" the options like "Filter" and "New Search" when the user right-clicks on one of these fields, since it would further communicate that they're not looking at actual values and hence shouldn't expect those options to work.

For the record type, however, we see that the right-click options work as expected.

https://user-images.githubusercontent.com/5934157/180890437-297c6e30-3869-409a-9e1d-0af99a099784.mp4

philrz avatar Jul 25 '22 23:07 philrz