Bug 153733 - Web Inspector: DataGridNode should support adding go-to arrow buttons to any cell
Summary: Web Inspector: DataGridNode should support adding go-to arrow buttons to any ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks: 153032
  Show dependency treegraph
 
Reported: 2016-01-31 19:29 PST by Matt Baker
Modified: 2016-02-01 13:48 PST (History)
8 users (show)

See Also:


Attachments
[Patch] Proposed Fix (2.90 KB, patch)
2016-01-31 19:40 PST, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2016-01-31 19:29:07 PST
* SUMMARY
DataGridNode should support adding go-to arrow buttons to any cell. TimelineDataGridNode automatically creates go-to arrows for SourceCodeLocation cells, but currently it's not convenient to add go-to arrows to arbitrary cells.

As part of the Timelines UI redesign, grids will need cells with arrow buttons for navigating to resources: https://bugs.webkit.org/show_bug.cgi?id=153032.
Comment 1 Radar WebKit Bug Importer 2016-01-31 19:29:17 PST
<rdar://problem/24431813>
Comment 2 Matt Baker 2016-01-31 19:40:51 PST
Created attachment 270363 [details]
[Patch] Proposed Fix
Comment 3 BJ Burg 2016-02-01 09:41:10 PST
Comment on attachment 270363 [details]
[Patch] Proposed Fix

r=me
Comment 4 WebKit Commit Bot 2016-02-01 10:22:43 PST
Comment on attachment 270363 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 270363

Committed r195966: <http://trac.webkit.org/changeset/195966>
Comment 5 WebKit Commit Bot 2016-02-01 10:22:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Joseph Pecoraro 2016-02-01 12:26:58 PST
Comment on attachment 270363 [details]
[Patch] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=270363&action=review

> Source/WebInspectorUI/ChangeLog:10
> +        Provide a way to add go-to arrow buttons to any grid cell from within a
> +        DataGridNode subclass's implementation of createCellContent.

Why?

I think of DataGrid as a table containing cells. In which case:

- Most DataGrids will not require this, so it shouldn't be in the base class.
- When there are goto arrows, I prefer they have a sourceCodeLocation and so can provide a tooltip
- Placement of the goto arrow may be different depending on what the cell wants.
- If a cell manually creates its own goto arrow, the DataGrid's GoToArrowClicked is not triggered. That seems confusing.
Comment 7 Matt Baker 2016-02-01 13:48:44 PST
(In reply to comment #6)
> Comment on attachment 270363 [details]
> [Patch] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270363&action=review
> 
> > Source/WebInspectorUI/ChangeLog:10
> > +        Provide a way to add go-to arrow buttons to any grid cell from within a
> > +        DataGridNode subclass's implementation of createCellContent.
> 
> Why?
> 
> I think of DataGrid as a table containing cells. In which case:
> 
> - Most DataGrids will not require this, so it shouldn't be in the base class.
> - When there are goto arrows, I prefer they have a sourceCodeLocation and so
> can provide a tooltip
Currently goto arrows are only created for SourceCodeLocation's but this will be changing. Cells in the 'Name' column created by ResourceDataGridNode (https://webkit.org/b/153034) needs a goto arrow, but don't have SourceCodeLocations. It's up to the NetworkTimeView/OverviewTimelineView to handle the grid's GoToArrowClicked event and open a content view for the node's resource. This is similar to what the TimelineSidebarPanel does now.

> - Placement of the goto arrow may be different depending on what the cell
> wants.
It seems like right-aligned goto arrows is pretty standard throughout the UI (SourceCodeLocation cells, tree elements).
> - If a cell manually creates its own goto arrow, the DataGrid's
> GoToArrowClicked is not triggered. That seems confusing.
I agree that this is somewhat confusing.