• 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.

Item3198: Incorrect formatting of table headers

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TablePlugin Enhancement New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

When there is no space between the * and the header text then if the header contains a link, it is not formatted as a link, and the web is shown. Witness:

Table 1

%TABLE{headerrows="1" sort="off"}%
|*A*|*TWiki.StandardColors*|
|1|yellow|
|2|red|
|3|green|
|4|white|

A TWiki.StandardColors
1 yellow
2 red
3 green
4 white

Table 2: With the sorting allowed, the header is not bold faced.

%TABLE{headerrows="1"}%
|*A*|*TWiki.StandardColors*|
|1|yellow|
|2|red|
|3|green|
|4|white|

A TWiki.StandardColors
1 yellow
2 red
3 green
4 white

Table 3: Same issue as (2) for a table without the table plugin directive

|*A*|*TWiki.StandardColors*|
|1|yellow|
|2|red|
|3|green|
|4|white|

A TWiki.StandardColors
1 yellow
2 red
3 green
4 white

Note that if you leave spaces, the links become links, but then you have another bug, see Item3197.

Table 4: If you don't have the *, you do not get header cells, but you get the link.

|*A*|TWiki.StandardColors|
|1|yellow|
|2|red|
|3|green|
|4|white|

A StandardColors
1 yellow
2 red
3 green
4 white


Maybe its because of my flu, but I don't understand the point being made. Could you write up a problem summary? AC

Problem Summary

Suddenly, formatting of header cells in tables does not work as it did in the past. I believe the requirements are that

  • A table row where all cells are bolded (surrounded by *) is a "header" row (albeit that row may be inside the table or the footer also)
  • A "header" row is shown with bold font and with a "header background"
  • If the table is sortable, the top header row only has links to allow sorting.

As we can see from above, the following deviations from this exist:

  1. Links in "header" rows are not properly formatted as they show the web. See Table 1-3.
  2. If a table is not sortable, a link to a topic in the "header" row is not a link. See Table 1.
  3. If a table is sortable, the "header row" is not shown in bold font (see Table 2 and Table 3)

TW


This happens in a twiki form, not in a twiki topic, because of this style:
.twikiFormTable th {
   font-weight:normal;
}

I have changed this.

AC


Problem 1 and 2 still persist. See above. -- TW
Problem 1: you are using a table header that happens to look like a web.topic link. If you prefer to disambigue the syntax, use bracket notation:

%TABLE{headerrows="1" sort="off"}%
|*A*|*[[TWiki.StandardColors]]*|
|1|yellow|
|2|red|
|3|green|
|4|white|

A TWiki.StandardColors
1 yellow
2 red
3 green
4 white

Pass a header color parameter to make the link readable:

A TWiki.StandardColors
1 yellow
2 red
3 green
4 white

Oops. That looks like a different bug.

Problem 2: the header is now bold (it wasn't before my fix). Try empty your cache first if the problem persists.

AC


Problem 1 still persists. It should not be required to put brackets around a TWiki word to make it appear as a link and format correctly. TWiki.TWikiTemplates should appear as TWikiTemplates, everywhere where TML is expanded.

Problem 2 still persists. Table 1 should have a clickable link in the header cell.

TW

You are saying that with the notation of TWiki.StandardColors (so even StandardColors in TWiki web), TablePlugin must recognize this as a link to a topic and should not use this link as a sortable header.

How would that work?

AC


No.

What I am saying is

1. In a WikiWord, the formatting is so that the web is not shown. E.g. TWiki.TWikiTemplates renders as TWikiTemplates. That should be true in table headers also.

2. If a table is not sortable, a WikiWord in the header should function as a link (as it is not overridden by the TablePlugin sort functionality).

TW


For a non-sortable column the solution is easy. TablePlugin wraps the header text inside **, and that has the same effect as on a topic page: TWiki.StandardColors.

I've changed the syntax from *Header* to <strong> Header </strong> to make links possible.

But for sortable columns the situation is not so easy. The header text is wrapped inside <a></a>. That is before the header name is recognized as a topic name (or web.topic name). If I put spaces around the header text, this is always rendered as a link to a topic instead of a column sort link.

AC

ItemTemplate
Summary Incorrect formatting of table headers
ReportedBy TWiki:Main.ThomasWeigert
Codebase ~twiki4
SVN Range TWiki-4.1, Sat, 18 Nov 2006, build 12001
AppliesTo Extension
Component TablePlugin
Priority Enhancement
CurrentState New
WaitingFor

Checkins 12061 12102
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r18 < r17 < r16 < r15 < r14 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r18 - 2007-12-02 - ArthurClemens
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback