On 04/18/2011 09:14 AM, Vincent Massol wrote:
On Apr 18, 2011, at 7:27 AM, Marius Dumitru Florea wrote:
On 04/17/2011 11:02 PM, Vincent Massol wrote:
Hi Marius,
On Apr 13, 2011, at 4:37 PM, Marius Dumitru Florea wrote:
Hi devs,
Do we have a specification for what a tag is inside XWiki? On
http://extensions.xwiki.org/xwiki/bin/view/Extension/Tag+Application
tags are defined as keywords but no constraints are specified.
I'd like to enforce this two constraints on tags:
* tags can't have leading and trailing white space characters
I'm not sure if you mean using space as a
separator or not here. If space is used as a separator then it should be allowed to use
quotes (such as: "<space>*tagvalue<space>*").
Since some users want to be able to use space inside a tag, only leading
and trailing space will be removed. For instance:
" Word of mouth , foo " -> 2 tags "Word of mouth" and
"foo"
How do I enter leading spaces if I want? I'd like
to be able to enter *any* character in any part of the tag name.
I need valid use cases. I know it's nice to be able to do everything but
it's not worth to implement the quotes and the escaping character if no
one will ever used them in real life. How many tags did you see with
leading or trailing spaces? How many containing a comma?
Tags are 99% keywords and IMO it's best to establish some simple rules:
* no leading or trailing spaces
* no comma inside
rather than implementing something that is useful in 1% of the cases.
Now, I didn't started this thread to re-implement or re-design the tags
UI. I just wanted to fix the current way of inputting tags which is not
consistent:
* regarding leading and trailing spaces:
" foo, bar" -> " foo" and "bar"
* regarding case:
"foo,bar,fOo" -> removing "fOo" removes "foo" also.
Thanks,
Marius
Some questions:
* Can the user uses quotes to enter any character, for ex " word ".
Alternatively the space could be escaped with a char, for ex \
* How can the user use quotes, is there an escape char, for ex: my tag with a \"
* Same question for entering the tag separator character. For ex if comma is the
separator, can I enter: tag with \, in the name
Thanks
-Vincent
* tags' case is saved but case is ignored when
comparing two tags (once
you defined a tag "news" you can't define a new tag "News"; the
existing
tag is reused; tag's case is used only for display)
If we don't consider case I'm not sure we
should use display using the first tag entered. For example someone entered
"http". Someone else wants to add HTTP. Should we display http or HTTP?
I'm fine with displaying http provided the UI allows to renamed the tag case.
If you click on the tag you go to Main.Tags page where you have an
option to rename the tag (that is specified in the query string).
Thanks,
Marius
Otherwise ok for me.
Optionally, we could enforce that tags can't
contain white spaces.
See above.
Thanks
-Vincent
WDYT?
If no one is against it then I'd like to change the UI to apply these
constraints.
Thanks,
Marius
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs