Commit Graph
4 Commits
Author SHA1 Message Date
Jack Franklin 982e9db7e7 [DataGrid] support filter parser input
`TextUtils.FilterParser` is commonly used to parse user input into a
series of filters. This CL updates the new data-grid-controller so it
can take the result of parsing user input into an array of parsed
filters. This means we can hook it up to existing input boxes in
DevTools and unblocks us landing the new data grid into the protocol
monitor.

Bug: 1125968
Change-Id: I45896796d7e7cc720d22c48b65325fb099115da8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560237
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-11-25 13:32:47 +00:00
Jack Franklin cfda4f910c [DataGrid]: swap hidden flag to visible + hideable
One of the features we need to support in the new DataGrid is a context
menu to hide/show columns. Therefore in preparation this CL updates the
API for a `column` from just the `hidden` field to `visible` and
`hideable`. The former denotes if the column is visible or not, and
`hideable` denotes if the user can hide/show it via the context menu.

There's no user facing change here, just type changes in preparation for
future work.

Bug: 1150793, 1125968
Change-Id: Idfa95a27aab741388548e10ff83263c6b7338724
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2550075
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-11-20 12:03:56 +00:00
Alfonso Castaño 405815877a Add title to DataGrid cells
This CL adds a title field to Cell. Title will be used in
stringValueForCell, as a replacement for cell.value or the renderer output.

Bug: chromium:1148760
Change-Id: I566276b5bb0536ee262d51fb70bae2a74b26390a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2536407
Commit-Queue: Alfonso Castaño <alcastano@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-11-16 10:55:39 +00:00
Jack Franklin f3ebb1429d New DataGrid component.
This CL introduces the new DataGrid component, and is split into two:

- DataGrid, which is a "plain" component that takes data and renders it.
- DataGridController, which is a "smart" component that can take the
data and manipulate it (e.g. sorting), before passing it into a DataGrid
to be rendered.

These components are not feature complete in that they do not support
all features of the incumbent `DataGrid.js` but they are not designed
to. The goal here is to land the initial data-grid components, and then
work on using them in DevTools (as part of the protocol monitor). At
that point we can extend functionality by seeing what is missing and
testing in DevTools, rather than testing in isolation.

This CL includes the implementation, unit tests and component
documentation examples of the functionality that does exist, along with
a README explaining the two components and when to use each one.

Bug: 1125966
Change-Id: I1b5c9a0174c4563be64b5b4adcc8251d1498b55d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2461772
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-11-05 15:40:11 +00:00