[Webkit-unassigned] [Bug 38664] Web Inspector: add a "table" method to console, to allow output of tabular data

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 03:30:29 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38664





--- Comment #19 from Jan Odvarko <odvarko at gmail.com>  2010-06-01 03:30:27 PST ---
(In reply to comment #16)
> (In reply to comment #15)
> > If row headers are supported it would look like as follows:
> > 
> >              name age
> >             --------
> > father | Mike  30
> > son     | John   5
> 
> I think row headers for arrays would be useful too, 0, 1, 2, etc.
Yes

> > 6) Expandable log
> > var object = {father: {name: "Mike", age: 30}, son: {name: "John", age: 5}};
> > console.table("My Family", object);
> > 
> > + My Family
> > 
> > The user needs to expand to see the actual data.
> 
> I agree with Patrick, it is weird to treat the parameters differently based on type/order. I think title is a good idea, and agree it is optional. And more likely to be used than specifying columns and headers. So here is the parameter order I would expect.
> 
> console.table(data[[[, title], columns], headers])
OK, agree, you convinced me.


> > - The first data row (ie. the first object in the provided array, or the first array in the provided array of the first found property in the provided object) is used as the template and the others are expected to be the same.
> 
> There was Pavels idea of adding the columns together for mixed type objects.
> 
> So given:
> 
> var people = [{name: "John", company: "Acme"}, {name: "Amy", email: "amy at foo.com"}, {name: "Joe", company: "Acme", phone:"555-555-5555"}];
> 
> name  company  email                phone
> ------------------------------------
> John    Acme        --                      --
> Amy     --            amy at foo.com  --
> Joe      Acme        --                      555-555-5555
> 
> That is useful for sparse objects, when you have missing data.
Sound good to me (event if it requires more analysis of provided data before UI generation).

Honza

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list