The data-grid has a filler row that it renders to fill any additional
height of the container, but when the data-grid was filling the height
anyway this row would be 2px high (see screenshot in bug).
This CL changes the row to be 0px high, but I then found an oddness
with the rendering engine (not clear to me if it's desired behaviour
or a bug) where if the table had no rows (so we want the padding row
to be 100% high to fill the space) but then the padding row was given
`padding: 0`, it would not take up any height. Therefore we
conditionally apply an extra CSS class to give the row some padding
such that it takes up extra height in the event of the table being
empty.
Fixed: 1226745
Change-Id: I9030832320eb2554adbac1dc92dfbd8ec4cf9c2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3034608
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
This CL contains improvements to the auto scroll logic which means we
can correctly resume scrolling when the user has prevented it (e.g. by
selecting a cell) but then scrolled down to the end of the table.
It also includes a suite of interaction tests to verify the behaviour
and edge cases.
Bug: 1211346
Change-Id: Ic0905aaf2bc35dcf20d1c74dab19fb7e9eacedd5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2914884
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
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>
It seems there is no requirement for these files to be split; they don't
seem to have a logical split and they are both injected into the `body`
element when DevTools runs. If we kept both of these files around, we'd
have to inject them both into the component docs helpers, and deal with
both of them when it comes to figuring out where legacy CSS variables
are defined.
To make it a bit simpler I've merged `inspectorStyle` into
`inspectorCommon`. I went this way because:
* `inspectorCommon.css` is (I think!) a better name than `inspectorStyle.css`
* `inspectorCommon.css` was bigger.
I also drive-by disabled the stylelint `comment-empty-line-before`,
which was forbidding empty lines before any CSS comments; which made the
entire file feel very squashed!
Bug: none
Change-Id: Ifaa834c7bf56291561e2e5cc124c4efd85c3cc56
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716285
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
This was flaking on the waterfall; locally I have struggled to reproduce
but have added an extra check to the test which seems to help make it
more stable.
I tested it by running `it.repeat(50, ...)` in STRESS=1 and it didn't
fail once, so hopefully it will behave itself on the bots...
Bug: chromium:1172902
Change-Id: I25ad1572d63ff3e438df41bad1b0c62f38578d16
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2667189
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Whilst integrating the data-grid I found some bugs with resizing when there are
hidden columns. Some parts of the resize logic didn't take into account hidden
columns and as such indexes were off. This fixes it and adds more interaction
tests to cover the resizing functionality more thoroughly.
Fixed: 1158788
Change-Id: I302bd060bdc30e6739547b99b088541b5f36563e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2593134
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>