Commit Graph
9 Commits
Author SHA1 Message Date
Jack Franklin 5b1ab68316 [DataGrid] focusable cell logic improvements
This CL is a mix of changes within the DataGrid that improve the logic
around focusable cells. Prior to this CL the DataGrid stored one
value, which was the cell that the user would select if they tabbed
into the DataGrid. That got confusing as we used that value to also
represent the currently active cell that the user has clicked on.

This CL splits those concerns up into two properties, and improves how
we track when the user is or isn't focusing within the data-grid. It
also moves some event handlers from `click` to `focus` for the table
cells which is just a nice tidy up.

Bug: 1211346
Change-Id: If6449f5381134892705f7f42f24b226f8dbf170a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2935284
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-06-22 12:10:10 +00:00
Tim van der Lippe 23283e110a Instrument code with Istanbul for interactions tests
All interaction tests are now lazily instrumented with Istanbul
to obtain code coverage. The interactions tests can be started
with `COVERAGE=1` to obtain coverage. For that, the Mocha hooks
perform the eventual reporting and gathering of data. The instrumentation
is performed in the components server itself.

To make sure that we perform the minimal amount of work required
(since code coverage instrumentation is computationally expensive),
we preload pages to populate the instrumentation cache. Every
interactions tests should preload an example (most likely basic.html)
to populate the cache. Every subsequent test will then use the
already-instrumented code, rather than computing the code over
and over again.

The eventual code coverage is written to /interactions-coverage.
The results will eventually be merged with /karma-coverage
to obtain the union of both unit and interaction tests coverage.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1206705
Change-Id: I5e19b1ecef23d21107210699cb29800556e0415e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2879986
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-10 14:44:42 +00:00
Jack Franklin 4e3706155a Fix flakey data-grid-controller interaction tests on Mac
Fixed: chromium:1164826
Change-Id: I75da6ced70391ab9f87628920908d8b30f1a8a11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2619603
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-01-11 09:48:16 +00:00
Simon Zünd 9c46f2cb69 Skip flaky DataGridController interaction tests
The tests seem to only flake/fail on MacOS bot.

Bug: chromium:1164826
Change-Id: Ib6cec75b4bfcbdcaad89d7da94a975700f7dee4e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2619601
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-11 06:25:36 +00:00
Jack Franklin 3fcecc1172 Add body context menu to data-grid
This CL adds support for the context menu that appears when you right
click on the body row of the data-grid.

This menu shows columns you can sort by and you can toggle column
visibility via "Header Options" (the text is identical to the legacy
data grid). It also provides a hook for the user to customise and add
their own items to the context menu.

Bug: 1150793
Change-Id: I6a6d8c6c67156a575477c1e6d438261b85d9b034
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610967
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-06 16:11:55 +00:00
Jack Franklin bb7bf72580 Fix sub menu context menu interaction tests on Mac
The interaction tests that looked for submenu entry points in a context
menu would fail on Mac, because on Mac they have the ▶ symbol, whereas
on other platforms they do not.

This CL provides a helper to search for the item with and without the ▶
and ensures the tests pass on all platforms.

Change-Id: I619ff370fbc6388ec166d9fd4b7e944788dbbf6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612991
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-06 11:59:35 +00:00
Jack Franklin 90b6613019 Reland "Add header context menu to data grid"
This reverts commit c2ad98d783.

Reason for revert: fixed flakey test

Original change's description:
> Revert "Add header context menu to data grid"
>
> This reverts commit 6bdb3622bd.
>
> Reason for revert: Interaction tests started failing on mac.
>
> https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview
>
> Original change's description:
> > Add header context menu to data grid
> >
> > This CL adds a default header context menu to the data grid that lists visible
> > and sortable columns much like the legacy data grid.
> >
> > Bug: 1150793
> > Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> > Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
>
> TBR=aerotwist@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1150793
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
> Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>

TBR=aerotwist@chromium.org,szuend@chromium.org,janscheffler@chromium.org,jacktfranklin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1150793
Change-Id: Ibd352be261d2cefee6fccc4b18b438faaad57631
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610596
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-01-05 11:56:39 +00:00
Jan Scheffler c2ad98d783 Revert "Add header context menu to data grid"
This reverts commit 6bdb3622bd.

Reason for revert: Interaction tests started failing on mac.

https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview

Original change's description:
> Add header context menu to data grid
>
> This CL adds a default header context menu to the data grid that lists visible
> and sortable columns much like the legacy data grid.
>
> Bug: 1150793
> Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

TBR=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1150793
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-12-23 07:27:30 +00:00
Jack Franklin 6bdb3622bd Add header context menu to data grid
This CL adds a default header context menu to the data grid that lists visible
and sortable columns much like the legacy data grid.

Bug: 1150793
Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-22 15:43:47 +00:00