Bug 193982 - Web Inspector: Improve API and documentation of ColumnChart
Summary: Web Inspector: Improve API and documentation of ColumnChart
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: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-29 14:10 PST by Joseph Pecoraro
Modified: 2019-02-01 13:26 PST (History)
4 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (6.27 KB, patch)
2019-01-29 14:11 PST, Joseph Pecoraro
hi: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2019-01-29 14:10:52 PST
Improve API and documentation of ColumnChart

Used to be "BarChart" and some remnants of "bar" still existed.
Comment 1 Joseph Pecoraro 2019-01-29 14:11:51 PST
Created attachment 360500 [details]
[PATCH] Proposed Fix
Comment 2 Devin Rousso 2019-01-29 14:24:59 PST
Comment on attachment 360500 [details]
[PATCH] Proposed Fix

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

r=me

> Source/WebInspectorUI/ChangeLog:8
> +        This used to be named "BarChart", convert remaining instances

Grammar: this sentence is a fragment, so use a ";" or add some other conjunction.

> Source/WebInspectorUI/UserInterface/Views/ColumnChart.js:59
> +    get columns() { return this._columns; }

Considering that nobody calls this (and frankly the data it contains is really not very useful), I think we should just remove this.

> Source/WebInspectorUI/UserInterface/Views/ColumnChart.js:82
> +        this._columns = [];

I feel like this should call `this.needsLayout()` 🤔

> Source/WebInspectorUI/UserInterface/Views/ColumnChart.js:85
>      needsLayout()

Perhaps this class should be a subclass of `WI.View`?

> Source/WebInspectorUI/UserInterface/Views/StackedLineChart.js:63
> +    get element() { return this._element; }

Yes! ᕦ(ò_óˇ)ᕤ
Comment 3 Joseph Pecoraro 2019-01-31 13:15:49 PST
(In reply to Devin Rousso from comment #2)
> Comment on attachment 360500 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=360500&action=review
> 
> r=me
> 
> > Source/WebInspectorUI/ChangeLog:8
> > +        This used to be named "BarChart", convert remaining instances
> 
> Grammar: this sentence is a fragment, so use a ";" or add some other
> conjunction.

kk.

> > Source/WebInspectorUI/UserInterface/Views/ColumnChart.js:59
> > +    get columns() { return this._columns; }
> 
> Considering that nobody calls this (and frankly the data it contains is
> really not very useful), I think we should just remove this.

Okay.

> > Source/WebInspectorUI/UserInterface/Views/ColumnChart.js:85
> >      needsLayout()
> 
> Perhaps this class should be a subclass of `WI.View`?

Will do in a bit.
Comment 4 Joseph Pecoraro 2019-02-01 13:25:58 PST
https://trac.webkit.org/changeset/240865/webkit
Comment 5 Radar WebKit Bug Importer 2019-02-01 13:26:38 PST
<rdar://problem/47747238>