Bug 1005640 - identify table sizes with classes
identify table sizes with classes
Status: CLOSED CURRENTRELEASE
Product: Publican
Classification: Community
Component: publican (Show other bugs)
future
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Fearn
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-09 00:03 EDT by Andy Fitzsimon
Modified: 2013-12-18 21:46 EST (History)
2 users (show)

See Also:
Fixed In Version: 4.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-18 21:46:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andy Fitzsimon 2013-09-09 00:03:28 EDT
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 01:27:32 EDT
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
Comment 3 Jeff Fearn 2013-09-23 02:24:12 EDT
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 02:27:31 EDT
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.
Comment 5 Ruediger Landmann 2013-10-21 00:30:24 EDT
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 02:17:17 EDT
To ssh://git.fedorahosted.org/git/publican.git
   d4a956e..c979069  HEAD -> devel
Comment 7 Ruediger Landmann 2013-10-21 03:03:49 EDT
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.