Click to filter values in Discover doc table and Visualize data table#9989
Click to filter values in Discover doc table and Visualize data table#9989Bargs merged 14 commits intoelastic:masterfrom
Conversation
There was a problem hiding this comment.
Could you move this into its own template file?
There was a problem hiding this comment.
The style guide suggests using the property value shorthand syntax (simply negate instead of negate: negate).
|
This is awsome @Bargs, thanks! Two minor inconsistencies between discover and the data table - whole row in data table is highlighted on mouseover and magnifying glass shown at the top of the row. |
|
Thanks for the input @jimmyjones2! The cell/row highlighting was an existing style of the data table. Perhaps you're right we should remove it now. What do you think @cjcenizal? Could you provide a screenshot of the positioning inconsistency you mentioned? From what I could tell the doc table also put the magnifying icon at the top of the row but I may have missed something. |
|
@Bargs Sorry I wasn't very clear - in the header of the data table there is a magnifying glass as a cue for filtering, but not in the doc table. |
|
This looks good from a UX perspective, except for one weird thing I found. If I tried to filter on a value, sometimes it tried to apply a filter for every value in the row, instead of just the value of the cell I clicked on. When this happened, it prompted me to verify that I want to filter. If I selected a different cell, this behavior didn't occur, and instead the filter was applied for just the cell I clicked on. From a UX perspective, I couldn't figure out why this was happening. Any idea what's going on here? |
There was a problem hiding this comment.
This can also just be column, similar to @lukasolson's comment.
|
@cjcenizal this is the way the current filtering works in the data table ¯_(ツ)_/¯ |
|
use hover to highlight whole row then ? |
|
@ppisljar I'm open to trying that out. What do you think the biggest benefit(s) of that is for the user? |
|
with multiple columns its hard to see which value matches to the row you are looking to, highlighting the row makes it obvious. |
|
@lukasolson @cjcenizal @ppisljar Just pushed some updates:
Please take another look. |
|
jenkins, test this |
|
Hmm, how complicated would it be to centralize this logic into a directive and re-use it in both places? That way we wouldn't have the HTML duplicated in two different places... What do you think? |
|
@lukasolson I think a bit of it could be DRYed up, but not a ton. The way the filters are built is quite different in each context, so it would really just be the html that gets de-duplicated. I don't mind doing it, but I also know @ppisljar is working on some major changes to the data table so it might be best to avoid sharing this logic for now. |
…elastic#9989) Adds + and - icons on hover in the doc table and data table, allowing users to drill down with more options and fewer clicks. Previously in the doc table a user had to expand the row in order to filter on a document value. In the data table a user could filter simply by clicking a cell, but there was no way to create a negative filter. This commit brings feature parity between the data table and doc table.
…#9989) (#10123) Adds + and - icons on hover in the doc table and data table, allowing users to drill down with more options and fewer clicks. Previously in the doc table a user had to expand the row in order to filter on a document value. In the data table a user could filter simply by clicking a cell, but there was no way to create a negative filter. This commit brings feature parity between the data table and doc table.
| if (i === 0 && !reuse) { | ||
| if (!reuse) { | ||
| $toggleScope = $scope.$new(); | ||
| $compile($target)($toggleScope); |
There was a problem hiding this comment.
@Bargs : Sorry for the late and random comment, but doesn't this $compile($target)($toggleScope); on all "newHtmls" elements for each row introduce some performance degradation when showing many rows ?
There was a problem hiding this comment.
@marenas I haven't personally seen any slowdown with this change. The template for each cell is pretty minimal.

Fixes #3432
Replaces #5344
This PR extends the filter icons implemented in #5344 to the data table visualization.