You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by Stéphane NICOLAS <st...@gmail.com> on 2010/11/05 11:30:08 UTC

Feature Request :column groups in tables

Allo,

I would like to suggest a first idea that seems not so difficult to
implement in click : column groups.

*Idea :*

When I developped my first click app, I had to build a few list views using
tables.
When tables become large, I think it s a good design to have the ability to
hide/unhide columns to increase the readability of data as it increases
focus on the most meaning full part of them.

Nevertheless, all the time the fields of items to expose in the list were
grouped. The idea is nothing new, it's exactly what field sets have been
designed for.

So I suggest that we had column groups in tables to mimic the behavior of
fields set for forms, but in tables.

*API :

*It would be nice to have an interface like this :
ColumnGroup groupPersonalData = new ColumnGroup( <name>, <label> );
Column columnName = new Column( <name>, <label>);
Column columnPhone = new Column( <name>, <label>);

groupPersonalData.add( columnName );
groupPersonalData.add( columnPhone );
table.add( groupPersonalData );

*Rendering :*

The html would be rendered as a normal table, with a first line (above
column names), a special header with the name of groupPersonalData with a
span of 2 (as it has 2 columns).

I got a few other ideas for fancier layouts but that would be nice already.

To hide and show the column, I would love to have a
groupPersonalData.setVisible( <boolean> );
but I feel like click doesn't want to go that way and would prefer let
people use a css style or css class to achieve that.


*Implementation :*

Well, on that side, just a few words, I am sure most people here will get
better ideas than mine.
Table class :
- add a property List<ColumnGroup>
- a few methods to add/remove them
- modify getColumnCount and other related methods
- modify rendering/template add a tr row containing ths for groups with a
span attribute, ungoruped columns would have an empty th of span 1 or a
group one or none if they are no columngroups in the table.

*FormTable* :

The same would also be applicable to FormTable class, and FieldSets there
could have the same role as column groups for editable fields.

Thanks in advance for your time and feedback,
 Stéphane

Re: Feature Request :column groups in tables

Posted by Bob Schellink <sa...@gmail.com>.
On 6/11/2010 23:40, Stéphane NICOLAS wrote:
>
> What would be the advantage of using javascript to hide columns ?
It allows the user to instantly hide/show columns without a roundtrip to the server. However it adds
considerable clutter and UI complexity so it's a trade of.

regards

Bob

Re: Feature Request :column groups in tables

Posted by Stéphane NICOLAS <st...@gmail.com>.
Hi bob,

thx for replying.

Sure, you would have the same amount of columns to render. Exactly in the
same way as using fieldset or tabs doesn't give you more space on the screen
nor lets you render less fields.

My point is that it would help dealing with wide tables and present a more
coherent information to the user.

Moreover, it could be used to hide columns and groups.

What would be the advantage of using javascript to hide columns ?
Up to now, I used forms to achieve that, or action links.

Stéphane


2010/11/5 Bob Schellink <sa...@gmail.com>

> Hi Stéphane,
>
> I'm not sure how ColumnGroups solve the problem of screen real estate? The
> same amount of columns
> are still rendered in the end right?
>
> If you want to show/hide columns isn't JavaScript[1] a more appropriate
> tool?
>
> Kind regards
>
> Bob
>
> [1]: http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html
>
>
> On 5/11/2010 21:30, Stéphane NICOLAS wrote:
> > Allo,
> >
> > I would like to suggest a first idea that seems not so difficult to
> implement in click : column groups.
> >
> > /Idea :/
> >
> > When I developped my first click app, I had to build a few list views
> using tables.
> > When tables become large, I think it s a good design to have the ability
> to hide/unhide columns to
> > increase the readability of data as it increases focus on the most
> meaning full part of them.
> >
> > Nevertheless, all the time the fields of items to expose in the list were
> grouped. The idea is
> > nothing new, it's exactly what field sets have been designed for.
> >
> > So I suggest that we had column groups in tables to mimic the behavior of
> fields set for forms, but
> > in tables.
> >
> > /API :
> >
> > /It would be nice to have an interface like this :
> > ColumnGroup groupPersonalData = new ColumnGroup( <name>, <label> );
> > Column columnName = new Column( <name>, <label>);
> > Column columnPhone = new Column( <name>, <label>);
> >
> > groupPersonalData.add( columnName );
> > groupPersonalData.add( columnPhone );
> > table.add( groupPersonalData );
> >
> > /Rendering :/
> >
> > The html would be rendered as a normal table, with a first line (above
> column names), a special
> > header with the name of groupPersonalData with a span of 2 (as it has 2
> columns).
> >
> > I got a few other ideas for fancier layouts but that would be nice
> already.
> >
> > To hide and show the column, I would love to have a
> > groupPersonalData.setVisible( <boolean> );
> > but I feel like click doesn't want to go that way and would prefer let
> people use a css style or css
> > class to achieve that.
> >
> >
> > /Implementation :/
> >
> > Well, on that side, just a few words, I am sure most people here will get
> better ideas than mine.
> > Table class :
> > - add a property List<ColumnGroup>
> > - a few methods to add/remove them
> > - modify getColumnCount and other related methods
> > - modify rendering/template add a tr row containing ths for groups with a
> span attribute, ungoruped
> > columns would have an empty th of span 1 or a group one or none if they
> are no columngroups in the
> > table.
> >
> > /FormTable/ :
> >
> > The same would also be applicable to FormTable class, and FieldSets there
> could have the same role
> > as column groups for editable fields.
> >
> > Thanks in advance for your time and feedback,
> >  Stéphane
> >
> >
>
>

Re: Feature Request :column groups in tables

Posted by Bob Schellink <sa...@gmail.com>.
Hi Stéphane,

I'm not sure how ColumnGroups solve the problem of screen real estate? The same amount of columns
are still rendered in the end right?

If you want to show/hide columns isn't JavaScript[1] a more appropriate tool?

Kind regards

Bob

[1]: http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html


On 5/11/2010 21:30, Stéphane NICOLAS wrote:
> Allo,
> 
> I would like to suggest a first idea that seems not so difficult to implement in click : column groups.
> 
> /Idea :/
> 
> When I developped my first click app, I had to build a few list views using tables.
> When tables become large, I think it s a good design to have the ability to hide/unhide columns to
> increase the readability of data as it increases focus on the most meaning full part of them.
> 
> Nevertheless, all the time the fields of items to expose in the list were grouped. The idea is
> nothing new, it's exactly what field sets have been designed for.
> 
> So I suggest that we had column groups in tables to mimic the behavior of fields set for forms, but
> in tables.
> 
> /API :
> 
> /It would be nice to have an interface like this :
> ColumnGroup groupPersonalData = new ColumnGroup( <name>, <label> );
> Column columnName = new Column( <name>, <label>);
> Column columnPhone = new Column( <name>, <label>);
> 
> groupPersonalData.add( columnName );
> groupPersonalData.add( columnPhone );
> table.add( groupPersonalData );
> 
> /Rendering :/
> 
> The html would be rendered as a normal table, with a first line (above column names), a special
> header with the name of groupPersonalData with a span of 2 (as it has 2 columns).
> 
> I got a few other ideas for fancier layouts but that would be nice already.
> 
> To hide and show the column, I would love to have a
> groupPersonalData.setVisible( <boolean> );
> but I feel like click doesn't want to go that way and would prefer let people use a css style or css
> class to achieve that.
> 
> 
> /Implementation :/
> 
> Well, on that side, just a few words, I am sure most people here will get better ideas than mine.
> Table class :
> - add a property List<ColumnGroup>
> - a few methods to add/remove them
> - modify getColumnCount and other related methods
> - modify rendering/template add a tr row containing ths for groups with a span attribute, ungoruped
> columns would have an empty th of span 1 or a group one or none if they are no columngroups in the
> table.
> 
> /FormTable/ :
> 
> The same would also be applicable to FormTable class, and FieldSets there could have the same role
> as column groups for editable fields.
> 
> Thanks in advance for your time and feedback,
>  Stéphane
> 
>