Bug 1005640 - identify table sizes with classes
Summary: identify table sizes with classes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Publican
Classification: Community
Component: publican
Version: future
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeff Fearn 🐞
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-09 04:03 UTC by Andy Fitzsimon
Modified: 2013-12-19 02:46 UTC (History)
2 users (show)

Fixed In Version: 4.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-19 02:46:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Andy Fitzsimon 2013-09-09 04:03:28 UTC
Description of problem:

The publican brand needs to differentiate between tables that contain a few rows / columns and many. (to draw row/column lines and apply different padding or responsive CSS patterns depending on the expected horizontal and vertical size.)


Proposed solution:

Please count the number of sibling <td>'s in a <tr> and class the parent <table>  with both of the following for less than or greater than


lt4-cols 
gt-4-cols 
gt-8-cols

lt-7-rows 
gt-8-rows 
gt-14-rows



this will allow the brand to write rules like 

.lt-4-cols.lt-6-rows td{border:0;}
/*to simplify layout*/


.lt-4-cols.gt-14-rows tr:nth-child(odd){background-color:#fafafa)}
/* to keep simple but stripe rows */ 


.gt-8-cols td{border-left: 1px solid #ccc}
.gt-8-cols td:first-child{border-left: 0;}
/* to apply vertical lines to differentiate columns*/

Comment 2 HSS Product Manager 2013-09-23 05:27:32 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 3 Jeff Fearn 🐞 2013-09-23 06:24:12 UTC
Added new classes and styles.

lt-4-cols
gt-4-cols
gt-8-cols

lt-7-rows
gt-7-rows
gt-14-rows


table.lt-4-cols.gt-14-rows tr:nth-child(odd) {
	background-color: #fafafa;
}
/* to keep simple but stripe rows */ 


.gt-8-cols td {
	border-left: 1px solid #ccc;
}

.gt-8-cols td:first-child {
	border-left: 0;
}

Need moar style tweaks.

To ssh://git.fedorahosted.org/git/publican.git
   ff6375f..b3bcab0  HEAD -> devel

Comment 4 HSS Product Manager 2013-09-23 06:27:31 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 5 Ruediger Landmann 2013-10-21 04:30:24 UTC
Tested on publican-3.9.9-0.fc19.t16.noarch --

adding more columns to a table does change the class from lt-4-cols to gt-4-cols then to gt-8-cols as expected. 

However, adding more rows to a table does not change the "rows" portion of the class. Here's a 3-column 15-row table that is still transformed as class="lt-4-cols lt-7-rows

<table frame='all'><title>Sample Table</title>
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'/>
<colspec colname='c2'/>
<colspec colname='c3'/>
<thead>
<row>
  <entry>alpha</entry>
  <entry>beta</entry>
  <entry>gamma</entry>
</row>
</thead>
<tbody>
<row>
  <entry>a1</entry>
  <entry>a2</entry>
  <entry>a3</entry>
</row>
<row>
  <entry>b1</entry>
  <entry>b2</entry>
  <entry>b3</entry>
</row>
<row>
  <entry>c1</entry>
  <entry>c2</entry>
  <entry>c3</entry>
</row>
<row>
  <entry>d1</entry>
  <entry>d2</entry>
  <entry>d3</entry>
</row>
<row>
  <entry>e1</entry>
  <entry>e2</entry>
  <entry>e3</entry>
</row>
<row>
  <entry>f1</entry>
  <entry>f2</entry>
  <entry>f3</entry>
</row>
<row>
  <entry>g1</entry>
  <entry>g2</entry>
  <entry>g3</entry>
</row>
<row>
  <entry>h1</entry>
  <entry>h2</entry>
  <entry>h3</entry>
</row>
<row>
  <entry>i1</entry>
  <entry>i2</entry>
  <entry>i3</entry>
</row>
<row>
  <entry>j1</entry>
  <entry>j2</entry>
  <entry>j3</entry>
</row>
<row>
  <entry>k1</entry>
  <entry>k2</entry>
  <entry>k3</entry>
</row>
<row>
  <entry>l1</entry>
  <entry>l2</entry>
  <entry>l3</entry>
</row>
<row>
  <entry>m1</entry>
  <entry>m2</entry>
  <entry>m3</entry>
</row>
<row>
  <entry>n1</entry>
  <entry>n2</entry>
  <entry>n3</entry>
</row>
<row>
  <entry>o1</entry>
  <entry>o2</entry>
  <entry>o3</entry>
</row>
</tbody>
</tgroup>
</table>

Comment 6 Jeff Fearn 🐞 2013-10-21 06:17:17 UTC
To ssh://git.fedorahosted.org/git/publican.git
   d4a956e..c979069  HEAD -> devel

Comment 7 Ruediger Landmann 2013-10-21 07:03:49 UTC
Fixed in publican-3.9.9-0.fc19.t18.noarch


Note You need to log in before you can comment on or make changes to this bug.