WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 215085
Web Inspector: Media & Animations timeline shouldn't shift when sorting
https://bugs.webkit.org/show_bug.cgi?id=215085
Summary
Web Inspector: Media & Animations timeline shouldn't shift when sorting
Nikita Vasilyev
Reported
2020-08-03 09:35:49 PDT
Created
attachment 405841
[details]
[Video] Bug When clicking on the header of the graph column, the graph scale shouldn't shift.
Attachments
[Video] Bug
(2.42 MB, video/quicktime)
2020-08-03 09:35 PDT
,
Nikita Vasilyev
no flags
Details
Patch
(3.58 KB, patch)
2020-08-05 22:48 PDT
,
Nikita Vasilyev
hi
: review+
Details
Formatted Diff
Diff
[Video] With patch applied
(1.94 MB, video/quicktime)
2020-08-05 22:51 PDT
,
Nikita Vasilyev
no flags
Details
Patch
(3.02 KB, patch)
2020-08-06 16:54 PDT
,
Nikita Vasilyev
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Nikita Vasilyev
Comment 1
2020-08-03 09:37:08 PDT
Also, the column header is missing the chevron icon. Every other column has it.
Nikita Vasilyev
Comment 2
2020-08-05 22:48:31 PDT
Created
attachment 406074
[details]
Patch
Nikita Vasilyev
Comment 3
2020-08-05 22:51:44 PDT
Created
attachment 406075
[details]
[Video] With patch applied
Devin Rousso
Comment 4
2020-08-06 10:35:10 PDT
Comment on
attachment 406074
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406074&action=review
> Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.css:53 > + top: calc(var(--data-grid-header-height) / 2 - var(--data-grid-sorting-chevron-height) / 2);
This feels like an overly complicated way of doing things. I think the underlying problem is that the `::after` sort indicator is attached to the `.header-cell-content:first-child` instead of the parent `th`. As you say, `WI.TimelineRuler` is weird cause it uses `position: absolute;` to expand outside of the `th`, which I think is why the `::after` sort indicator was "missing" before (it was positioned in the middle of the `WI.TimelineRuler` not the `th`). It'd be nice to adjust what node the `::after` sort indicator is attached to so that this can never happen again.
Nikita Vasilyev
Comment 5
2020-08-06 15:23:18 PDT
Comment on
attachment 406074
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406074&action=review
>> Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.css:53 >> + top: calc(var(--data-grid-header-height) / 2 - var(--data-grid-sorting-chevron-height) / 2); > > This feels like an overly complicated way of doing things. I think the underlying problem is that the `::after` sort indicator is attached to the `.header-cell-content:first-child` instead of the parent `th`. As you say, `WI.TimelineRuler` is weird cause it uses `position: absolute;` to expand outside of the `th`, which I think is why the `::after` sort indicator was "missing" before (it was positioned in the middle of the `WI.TimelineRuler` not the `th`). It'd be nice to adjust what node the `::after` sort indicator is attached to so that this can never happen again.
You're correct that the sort indicator was "missing" before because it was positioned in the middle of the `WI.TimelineRuler` and not the `th`. I don't understand what you're suggesting, exactly. What node should the `::after` sort indicator be attached to? Note that `position: relative` doesn't work for <th> (or any element with `display: table-cell`).
Devin Rousso
Comment 6
2020-08-06 15:45:36 PDT
Comment on
attachment 406074
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406074&action=review
r=me
> Source/WebInspectorUI/UserInterface/Views/DataGrid.css:32 > + --data-grid-sorting-chevron-height: 8px;
NIT: can we use `indicator` (or `indicator-arrow`) instead of `chevron`? That matches the SVG file name :)
>>> Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.css:53 >>> + top: calc(var(--data-grid-header-height) / 2 - var(--data-grid-sorting-chevron-height) / 2); >> >> This feels like an overly complicated way of doing things. I think the underlying problem is that the `::after` sort indicator is attached to the `.header-cell-content:first-child` instead of the parent `th`. As you say, `WI.TimelineRuler` is weird cause it uses `position: absolute;` to expand outside of the `th`, which I think is why the `::after` sort indicator was "missing" before (it was positioned in the middle of the `WI.TimelineRuler` not the `th`). It'd be nice to adjust what node the `::after` sort indicator is attached to so that this can never happen again. > > You're correct that the sort indicator was "missing" before because it was positioned in the middle of the `WI.TimelineRuler` and not the `th`. I don't understand what you're suggesting, exactly. What node should the `::after` sort indicator be attached to? > > Note that `position: relative` doesn't work for <th> (or any element with `display: table-cell`).
Interesting! I didn't know about the undefined behavior of `position: relative;` and `display: table-cell;`. That's very unfortunate :( FWIW, `position: relative;` and `display: table-cell;` appears to work just fine in WebKit. It would probably be best to create a wrapper between the `th` and the `headerView`, but given that we're trying to phase out `WI.DataGrid` anyways I suppose this is fine.
> Source/WebInspectorUI/UserInterface/Views/TimelineRuler.css:101 > + position: absolute !important;
Can we create a rule to override this in `TimelineDataGrid.css` instead of using `!important`? We should really avoid `!important` wherever possible. ``` .data-grid.timeline th > .header-cell-content.timeline-ruler > .markers { position: absolute; } ```
Nikita Vasilyev
Comment 7
2020-08-06 16:54:36 PDT
Created
attachment 406129
[details]
Patch
EWS
Comment 8
2020-08-06 17:19:21 PDT
Committed
r265356
: <
https://trac.webkit.org/changeset/265356
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 406129
[details]
.
Radar WebKit Bug Importer
Comment 9
2020-08-06 17:20:46 PDT
<
rdar://problem/66653722
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug