• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

In TablePlugin, the databg colors are shifted by one. Witness:

%TABLE{headerrows="1" footerrows="1"  databg="#FFFF00,#FF0000,#33FF00,#FFFFFF"}%
|*A*|*B*|
|1|yellow|
|2|red|
|3|green|
|4|white|
|1|yellow|
|2|red|
|3|green|
|4|white|
|*D*|*E*|
yields
A B
D E
1 yellow
2 red
3 green
4 white
1 yellow
2 red
3 green
4 white
but one would expect
A B
D E
1 yellow
2 red
3 green
4 white
1 yellow
2 red
3 green
4 white

-- TW

The color sequence is correct if there are no header rows, e.g. the plugin needs to be made aware of header rows.

4 white
1 yellow
2 red
3 green
4 white
1 yellow
2 red
3 green

The spec can be tricky, what is considered a header row? A single cell can be a header cell. What if only some cells in a row are header cells?

Example:

1 one x
10 ten x
2 two x
3 three x
4 four x
5 five x
6 six x
7 seven x
8 eight x
9 nine x

-- PTh

You are right, but I think the solution is clear here: If you have an attribute headerrows="1" in the tag, that means there is 1 headerrow, etc. If there is no such attribute, I can accept that the result is not determined.

On the spec question, I do recall that somewhere in the code there is a definition that says: if all cells in a row are bolded, then it is considered a header row. -- TW


This is not a requirement. Changing to Enhancement.

What would be the desired handling of colored rows?

AC


OK. I realized that I misunderstood "requirement" (I thought it meant "deviation from the specification").

But clearly this is a bug, not an enhancement. The spec describes that the colors for data rows are taken from the databg attribute. Clearly the user expects that the colors follow what was defined in this attribute.

The desired handling is that the data rows are colored in the order shown in the databg attribute, starting with the first value matching the first data row and continue on, restarting from the first value when there are more data rows than values in the attribute. The specification is undefined as to what happens when there are header rows interspersed in the data rows. -- TW


I do not see that this has been fixed. Reopening. -- TW
This has been fixed but your examples are out of date. The first table is now exactly as your example second table, but the current second table has changed along.

For each complete header row, the color iteration is reset.

AC


I've switched the default color order as well (topic setting). Tables now should look the same as before the header color fix.

AC


This last change needs to be accounted for in RenderFormTests.pm (r12278).

HJ

4.1.0 released

KJL

ItemTemplate
Summary TablePlugin: Table colors shifted by one
ReportedBy TWiki:Main.ThomasWeigert
Codebase ~twiki4
SVN Range TWiki-4.1, Sat, 18 Nov 2006, build 12001
AppliesTo Extension
Component TablePlugin
Priority Normal
CurrentState Closed
WaitingFor

Checkins 12129 12139 12172 12278
TargetRelease minor
Edit | Attach | Watch | Print version | History: r21 < r20 < r19 < r18 < r17 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r21 - 2007-01-16 - KennethLavrsen
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback