Feature Proposal: Add preference value to customize the new-wikiword link
Motivation
It is too difficult to click on the question mark
? attached to non-existing
WikiWords.
Description and Documentation
Three reasons:
(1) Other wikis allow to click on the new
WikiWord itself to create it which is alot more user-friendly than trying to hit the little
?.
(2) The question mark distracts reading the text ("why questioning
MyNewWikiWord$linksymbol").
(3) The superscript disturbs the text layout, i.e. its line-height. Lines with non-existing
WikiWords are higher
than others.
Currently the only possibility to customize the new-wikiword link is to change the css for
twikiNewLink (a span surrounding the
name of the new topic and the questionmark link) and to set NEWTOPICLINKSYMBOL which defaults to
<sup>?</sup>.
I'd propose to introduce a new preference variable NEWLINKFORMAT that still allows to provide a backwards compatible default
producing the same link look&feel as before but have more.
Examples
Backwards compatible:
* Set NEWLINKFORMAT = <span class="twikiNewLink">$text<a href="%SCRIPTURLPATH{"edit"}%/$web/$topic" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">$linksymbol</a></span>
* Set NEWTOPICLINKSYMBOL = <sup>?</sup>
which renders
SomeNewTopic?
Proposed:
* Set NEWLINKFORMAT = <a class="twikiNewLink" href="%SCRIPTURLPATH{"edit"}%/$web/$topic" rel="nofollow" title="%MAKETEXT{"Create this topic"}%">$text</a>
* Set NEWTOPICLINKSYMBOL =
which renders
SomeNewTopic
Note, that there are some style changes needed to pattern
<style type="text/css">
a.twikiNewLink {
color:#666;
border-color:#ddd;
text-decoration:none;
}
a.twikiNewLink:hover {
background-color:#D6000F;
color:#FBF7E8;
border-color:#D6000F;
}
</style>
Impact and Available Solutions
Implementation
Here is the
patch.
This infact provides greater flexibility
and reduces code complexity, i.e.
TWiki::Render::_renderNonExistingWikiWord
as it is 11 lines only now.
The NEWLINKFORMAT can contain the following variables:
-
$web: the web where the new topic is to be created in
-
$topic: the name of the new topic
-
$text: the link text
-
$linksymbol: the NEWTOPICLINKSYMBOL for backwards compatibility
--
Contributors: MichaelDaum
Discussion
--
MichaelDaum - 05 Oct 2006
Nice enhancement, that is a
WhatIsIn04x01 candidate.
--
PeterThoeny - 05 Oct 2006
How about changing the default to show a red link like
MediaWiki? This keeps the flow of reading, it is also familiar to the large Wikipedia group. All docs need to be updated to reflect that (WikiWord, tutorials etc.)
--
PeterThoeny - 05 Oct 2006
Nice enhancement. The gray color looks like a "visited" link in pattern; the red Wikipedia style link color looks like an error message.
Perhaps:
Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae
SomeLink vitae dicta sunt, explicabo. nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci velit.
--
ArthurClemens - 05 Oct 2006
How about
UnknownWord vs.
KnownWord
--
MichaelDaum - 05 Oct 2006
Would be possible, but normal links currently do not have a bottom border, just an underline. So it would become:
UnknownWord vs.
KnownWord
--
ArthurClemens - 05 Oct 2006
UnknownWord,
WikiWordLink, and
VisitedTopic looks reasonable to me.
--
PeterThoeny - 05 Oct 2006
My experience from Wikipedia is that I often find myself clicking on links to topics that do not exist.
Will a normal user who just passes by to READ the pages and knows nothing about TWiki actually know the difference between a red underlined link or a gray underlined link? It may look nicer this way but does it actually function well in practice with occational users?
I think the small ?-mark works well. It signals much better that this is a potential link and not an existing link.
Michael describes the ?-mark as superscript. It is not in PatternSkin. I think it works well in PatternSkin with a light gray underline that you hardly see and the little box to the right of the WikiWord with the ?-mark inside at the same height as the rest of the text. I find no problem with clicking on it with the mouse. Is the superscript a NatSkin or ClassicSkin problem?
I will not argue against this feature - but be careful with how the occational or first time users experience the use if you change this.
--
KennethLavrsen - 05 Oct 2006
Ah, and we have to remember the visually impaired...
--
ArthurClemens - 05 Oct 2006
Kenneth, the
<>sup>?</sup> is the hardcoded default for
NEWTOPICLINKSYMBOL. See the code. Note, that the
proposal above allows to configure every new-wikiword concept you like. So we only have to agree on a reasonable default.
Before making any decision, test it first ("girl friend test").
The blue vs red bottom bar for different links may be a problem to be recognized properly. I need to see a larger page with several of
them mixed up. The other problem with using a css bottom-bar property is that it is too far away from the text it is about to underline, imho,
getting too close to the top of the next line. The normal text-decoration:underline is much better as it is a
real underline. Having both
styles of underlining words will be very odd on a page mixing known and unknown words as for the user there's no obvious reason why
both ways of underlining a WikiWord must be so different (I can already hear them saying "oh look the underline is too far away from the word").
In such cases I'd opt for using a small background image repeating on the x-axis that you can position as close to the text as needed
a {
background-image:url(blue-line.gif);
background-position:bottom;
background-repeat:repeat-x;
}
a.twikiNewLink {
background-image:url(red-line.gif);
}
--
MichaelDaum - 06 Oct 2006
As I said above - I am not at all arguing against the feature. I was only commenting on how you would use it in practical. I support the feature of making it flexible as long as I can keep the current implementation and the proposal is nicely made so that I can do that.
--
KennethLavrsen - 06 Oct 2006
Awesome feature
I say keep the default. It's practical and straightforward. For a normal user at least.
It may be better if the style follows
ArthurClemens$linksymbol' example with a ? at the end, all in one box.
--
KwangErnLiew - 06 Oct 2006
Alright. Then let's keep the current scheme and css.
--
MichaelDaum - 06 Oct 2006
Accepted at
EdinburghReleaseMeeting2006x10x16 with current layout as default.
--
KennethLavrsen - 16 Oct 2006
Bugs:Item3037
--
MichaelDaum - 20 Oct 2006
Btw. NEWTOPICBGCOLOR and NEWTOPICFGCOLOR are still there but never used. I'd opt to remove them to simplify configuration.
Bugs:Item3038
--
MichaelDaum - 20 Oct 2006
They are used still in
TWiki/Render.pm, possibly for other skins such as classic?
--
PeterThoeny - 21 Oct 2006