On Wed, Apr 13, 2016 at 11:15 AM, Guillaume Delhumeau <
guillaume.delhumeau(a)xwiki.com> wrote:
I don't like the option 2 because it mentions
"space" which is not
presented in the UI and which will disappear eventually.
On the other hand, option 3 has the drawback of writing "WebHome"
everywhere, which is again something we want to hide.
Since we have recently decided that "page" should be the word used instead
of "document", and since the creation of "terminal page" is only an
option
for advanced users, I propose to introduce the type "page" as an alias of
"space".
So to link a terminal page, we would use "doc:A.B" and to link a nested
page, we would use "page:A.B" (which will be resolved as A.B.WebHome). No
ambiguity.
With that proposition, I would be for the option 2
I'm sorry to hijack the vote with a new proposition, but I though it was
important.
I was actually thinking of the same thing. Maybe we should have chosen
"page" from the start. If we move to "page" I would prefer to replace
"space" instead of adding yet another alias for it (which would not be as
trivial as it seems) since we`re still rather early in the Nested Page
adoption. We could probably try some migrator as well for that.
|
Regarding the link syntax complexity, IMO the source of all these issues is
the "default" and "indirect"/"accidental" relativity of
[[A]] links. I say
"indirect"/"accidental" because it`s not designed, IMO, but only a
side
effect of the way the reference resolver works and, together with the
"relative" effect, we also get all these weird limitations that don`t make
sense for a user wanting page references and not document references (witch
also have a space element).
A solution to this, IMO, would be to make references absolute by default
and have relative links be explicit (probably with the [[.A]] notation and
the [[..A]] notation for parent, as Vincent was saying). Migrations would
be problematic though.
Another solution (maybe more manageable in terms of migrations, and more
user friendly) would be a new link syntax, as Vincent again mentioned, but
then we would find ourselves translating the link syntax to the reference
syntax which would now diverge (even more than they did in order to be able
to avoid ".WebHome").
|
Regarding the actual issue at hand, I agree with Marius on the 3rd option,
since that is what I have also implemented in the WYSIWYG (in order to
accept the new "space:" link type) and it does make sense from a visual
editor point of view. If users use a visual editor they should not care
about what it produces. Think of the old DreamWeaver solution or any other
visual tool that produces code... it will never be pretty code but it will
work and you can never expect it to be pretty enough, as if a human wrote
it. It needs to cover many use cases as best as possible, whereas if a
human wrote it, it would cover a single specific use case very neatly. If
some users use WYSIWYG and others use wiki syntax there will surely be some
friction by design and I don`t see how we can get around it.
Thanks,
Eduard
WDYT?
Thanks,
2016-04-12 16:29 GMT+02:00 Vincent Massol <vincent(a)massol.net>et>:
On 12 Apr 2016, at 16:18, Marius Dumitru Florea
<
mariusdumitru.florea(a)xwiki.com> wrote:
On Tue, Apr 12, 2016 at 5:12 PM, Thomas Mortagne <
thomas.mortagne(a)xwiki.com>
wrote:
> On Tue, Apr 12, 2016 at 4:09 PM, Vincent Massol <vincent(a)massol.net>
> wrote:
>>
>>> On 12 Apr 2016, at 15:43, Marius Dumitru Florea <
> mariusdumitru.florea(a)xwiki.com> wrote:
>>>
>>> On Tue, Apr 12, 2016 at 4:30 PM, Vincent Massol <vincent(a)massol.net
>> wrote:
>>>>
>>>>> Hi Marius,
>>>>>
>>>>>> On 12 Apr 2016, at 14:56, Marius Dumitru Florea <
>>>>> mariusdumitru.florea(a)xwiki.com> wrote:
>>>>>>
>>>>>> Hi devs,
>>>>>>
>>>>>> We need to decide what is the expected link reference
serialization
>>>>> produced by the WYSIWYG editor when you create a link to a wiki
page.
> I
>>>>> think we have to choose between 3 options:
>>>>>
>>>>> (1) Output untyped (ambiguous) link references whenever possible
>>>>> (2) Always output unambiguous (typed) link references (both
'doc:'
and
>>>>>> 'space:')
>>>>>> (3) Always output 'doc:' link references (no
'space:' references)
>>>>>>
>>>>>> Let's see the details:
>>>>>>
>>>>>> = OPTION 1: Output untyped link references whenever possible =
>>>>>>
>>>>>> == <7.2 ==
>>>>>>
>>>>>> Link from A.B
>>>>>> * to A.WebHome (space home page) => [[WebHome]]
>>>>>> * to A.C (same space) => [[C]]
>>>>>
>>>>> I don’t understand why you’re using relative links in your 2
examples
>>>>> above. Option (1) says
untyped, it doesn’t say convert links into
>> relative
>>>>> links.
>>>>>
>>>>> So for me that would be:
>>>>>
>>>>> * to A.WebHome (space home page) => [[A.WebHome]]
>>>>> * to A.C (same space) => [[A.C]]
>>>>>
>>>>>> * to X.Y (different space) => [[X.Y]]
>>>>>> * to X.WebHome => [[X.WebHome]]
>>>>>>
>>>>>> == 7.2+ ==
>>>>>>
>>>>>> Link from A.B.WebHome
>>>>>> * to A.WebHome (its parent) => [[space:A]]
>>>>>
>>>>> Note 1: We could also imagine introducing a syntax for absolute
links
>> such
>>>>> as [[:A]]
>>>>> Note 2: We could also imagine introducing a syntax for parent links
>> such
>>>>> as [[..A]]
>>>>>
>>>>>> * to A.B.C or A.B.C.WebHome or A.C or A.C.WebHome (child or
sibling)
>> =>
>>>>>> [[C]] (very ambiguous)
>>>>>
>>>>> This is using a relative notation. But (1) is not about
transforming
>
links
>>>> into relative links.
>>>>
>>>> so for me this is:
>>>> * => [[A.B.C]]
>>>> * => [[A.C]]
>>>>
>>>> I’m stopping reading here since first we need to clarify if (1) is
> about
>>>> a) untyped or b) using relative references.
>>>>
>>>> IMO it should be about a) and doesn’t have to do b).
>>>>
>>>>
>>>
>>>> Maybe I misunderstood something?
>>>>
>>>
>>> Generating relative references is a must for me (whenever possible),
no
>>>> matter what output format we choose. I'm surprised there's any
doubt
>> about
>>>> this. The current WYSIWYG editor is generating relative references
and
> the
>>> CKEditor should continue to do this. Relative references have many
>>> advantages (eases the refactoring, allows you to export a hierarchy
and
>>>> import it somewhere else, etc.).
>>>
>>> Didn’t realize the WYSIWYG was already doing this!
>>>
>>> Indeed there are pros. The cons is that it can make the linking more
>> ambiguous., but overall it’s probably a good thing.
>>>
>>
>>> Also note that ideally we’d need to not convert existing links when
>> going through the WYSIWYG editor. That’s true independently of this
>> discussion though.
>>
>>
>
>> This is handled by XML comments containing the source reference so the
>> only thing the WYSIWYG need to do is to not touch those comments
>> (unless the user explicitly modify the target of course).
>>
>
> It's already the case. The link reference is preserved as is unless you
> edit the link and apply the changes (i.e. you close the link dialog
with
the OK
button).
Note that the majority of users will edit a link and click ok even if
they
don’t change anything. An improvement would be to
check for a difference
in
the generated link.
What I was commenting on though was that if the user has chosen an
absolute format or a relative format and he changes some link-related
data
(label, target location, etc), ideally the
WYSIWYG would output a
reference
using the same format (absolute or relative).
Thanks
-Vincent
Thanks for the reply, I understand now.
>>
>>> So option (1) is about untyped relative links, option (2) is about
typed
>>>> relative links and option (3) is about doc: relative links. In other
>> words:
>>>> (1) don't generate "doc:" and "space:"
>>>> (2) generate both "doc:" and "space:"
>>>> (3) generate only "doc:" (don't hide WebHome)
>>>
>>> I’ve now read again the first mail and I’m in favor of (2).
>>>
>>> The main reason for me is that we want to hide WebHome and with
Nested
>> Pages, all links would have WebHome in
them with option (3).
>>>
>>> Option (3) is really the worst for users: they get to see both “doc:”
>> and “WebHome” :)
>>>
>>> Also note that even option (2) is not perfect because of the “doc:”
and
>> “space:” prefixes which are also hard to
understand for users.
>>>
>>> I also know users who use both WYSIWYG and wiki editors (and who
think
>> that WebHome is confusing - We’re used
to it, but it’s really
confusing
if
> you’re just starting to use XWiki - you don’t
even understand what it
means
>> at all).
>>>
>>> To summarize: +1 for (2).
>>>
>>> Note: My choice for (2) is based purely on a usability POV. It could
be
> that
implementing option (2) is so much complex that it’s not worth it
and
> that we’d want to wait till we change the
underlying model before
changing
> the linking syntax.
>>
>> Last note: Maybe we need to invent some completely new syntax for
> linking since currently it has become very complex. I remember of any
mail
> where I proposed some new syntax for links
using a different syntax
such as
>> [[[…]]]. It could be interesting to spec a new simpler syntax such as:
>>> * Use “/“ instead of “.” (we already know that users would prefer “/“
>> since they’re more used to that symbol)
>>> * Leading “/“ means absolute. Example: [[[/A/B]]]
>>> * Use “..” for parent. Example: [[[..A/B]]]
>>>
>>> Thanks
>>> -Vincent
>>>
>>>> Thanks,
>>>> Marius
>>>>
>>>>
>>>>>
>>>>> Thanks
>>>>> -Vincent
>>>>>
>>>>>> * to A.B.C.D or A.B.C.D.WebHome (nested page two levels or more
>> below) =>
>>>>>> [[.C.D]] (ambiguous)
>>>>>> * to A.C.D or A.C.D.WebHome (nested page under sibling) =>
[[A.C.D]]
>>>>>> (ambiguous)
>>>>>> * to X.Y.Z or X.Y.Z.WebHome => [[X.Y.Z]] (ambiguous)
>>>>>>
>>>>>> Link from A.B (terminal)
>>>>>> * to A.WebHome (its parent) => [[space:A]]
>>>>>> * to A.C or A.C.WebHome (sibling) => [[C]] (ambiguous)
>>>>>> * to A.C.D or A.C.D.WebHome (nested page under sibling) =>
[[A.C.D]]
>>>>> (ambiguous)
>>>>> * to X.Y or X.Y.WebHome => [[X.Y]] (ambiguous)
>>>>>
>>>>> Link from A.B.C (terminal) or A.B.C.WebHome
>>>>> * to A.B.WebHome (its parent) => [[A.B]] (ambiguous)
>>>>>
>>>>> PROS:
>>>>> * shorter link references
>>>>> * hides WebHome from source syntax on 7.2+
>>>>>
>>>>> CONS:
>>>>> * ambiguous link references
>>>>> * complex code
>>>>> * different output for <7.2 and 7.2+ in case of top level space
>>>> [[WebHome]]
>>>>> or [[A.WebHome]] vs. [[space:A]] (we need to check if support for
> nested
>>>>> spaces is available)
>>>>>
>>>>>
>>>>> = OPTION 2: Always output unambiguous link references =
>>>>>
>>>>> == <7.2 ==
>>>>>
>>>>> Link from A.B
>>>>> * to A.WebHome (space home page) => [[doc:WebHome]] (relative)
>>>>> * to A.C (same space) => [[doc:C]] (relative)
>>>>> * to X.Y (different space) => [[doc:X.Y]]
>>>>> * to X.WebHome => [[doc:X.WebHome]]
>>>>>
>>>>> == 7.2+ ==
>>>>>
>>>>> Link from A.B.WebHome
>>>>> * to A.WebHome (its parent) => [[space:A]]
>>>>> * to A.B.C (terminal child) => [[doc:C]] (relative)
>>>>> * to A.B.C.WebHome (non-terminal child) => [[space:A.B.C]]
(absolute)
>>>>>> * to A.C (terminal sibling) => [[doc:A.C]]
>>>>>> * to A.C.WebHome (non-terminal sibling) => [[space:A.C]]
>>>>>> * to A.B.C.D (terminal descendant) => [[doc:.C.D]]
(relative)
>>>>>> * to A.B.C.D.WebHome (non-terminal descendant) =>
[[space:A.B.C.D]]
>>>>>> (absolute)
>>>>>> * to A.C.D (terminal descendant of sibling) => [[doc:A.C.D]]
>>>>>> * to A.C.D.WebHome (non-terminal descendant of sibling) =>
>>>>> [[space:A.C.D]]
>>>>>> * to X.Y.Z => [[doc:X.Y.Z]]
>>>>>> * to X.Y.Z.WebHome => [[space:X.Y.Z]]
>>>>>>
>>>>>> Link from A.B (terminal)
>>>>>> * to A.WebHome (its parent) => [[space:A]]
>>>>>> * to A.C (terminal sibling) => [[doc:C]] (relative)
>>>>>> * to A.C.WebHome (non-terminal sibling) => [[space:A.C]]
(absolute)
>>>>> * to A.C.D (terminal descendant of sibling) => [[doc:.C.D]]
(relative)
>>>>>> * to A.C.D.WebHome (non-terminal descendant of sibling) =>
>>>>> [[space:A.C.D]]
>>>>>> * to X.Y => [[doc:X.Y]]
>>>>>> * to X.Y.WebHome => [[space:X.Y]]
>>>>>>
>>>>>> Link from A.B.C (terminal) or A.B.C.WebHome
>>>>>> * to A.B.WebHome (its parent) => [[space:A.B]] (absolute)
>>>>>>
>>>>>> PROS:
>>>>>> * unambiguous link references ("what you link is what you
get")
>>>>>> * slightly less complex code (but still complex)
>>>>>> * hides WebHome from source syntax on 7.2+
>>>>>>
>>>>>> CONS:
>>>>>> * longer link references (because of "doc:" and
"space:" prefixes)
>>>>>> * cannot specify relative 'space:' references
>>>>>> * different output for <7.2 and 7.2+ in case of
[[doc:WebHome]]
vs.
>>>>> [[space:A]]
>>>>>
>>>>>
>>>>> = OPTION 3: Always output 'doc:' references =
>>>>>
>>>>> == <7.2 ==
>>>>>
>>>>> Link from A.B
>>>>> * to A.WebHome (space home page) => [[doc:WebHome]] (relative)
>>>>> * to A.C (same space) => [[doc:C]] (relative)
>>>>> * to X.Y (different space) => [[doc:X.Y]]
>>>>> * to X.WebHome => [[doc:X.WebHome]]
>>>>>
>>>>> == 7.2+ ==
>>>>>
>>>>> Link from A.B.WebHome
>>>>> * to A.WebHome (its parent) => [[doc:A.WebHome]]
>>>>> * to A.B.C (terminal child) => [[doc:C]] (relative)
>>>>> * to A.B.C.WebHome (non-terminal child) => [[doc:.C.WebHome]]
> (relative)
>>>>> * to A.C (terminal sibling) => [[doc:A.C]]
>>>>> * to A.C.WebHome (non-terminal sibling) => [[doc:A.C.WebHome]]
>>>>> * to A.B.C.D (terminal descendant) => [[doc:.C.D]] (relative)
>>>>> * to A.B.C.D.WebHome (non-terminal descendant) =>
[[doc:.C.D.WebHome]]
>>>>> (relative)
>>>>> * to A.C.D (terminal descendant of sibling) => [[doc:A.C.D]]
>>>>> * to A.C.D.WebHome (non-terminal descendant of sibling) =>
>>>>> [[doc:A.C.D.WebHome]]
>>>>> * to X.Y.Z => [[doc:X.Y.Z]]
>>>>> * to X.Y.Z.WebHome => [[doc:X.Y.Z.WebHome]]
>>>>>
>>>>> Link from A.B (terminal)
>>>>> * to A.WebHome (its parent) => [[doc:WebHome]] (relative)
>>>>> * to A.C (terminal sibling) => [[doc:C]] (relative)
>>>>> * to A.C.WebHome (non-terminal sibling) => [[doc:.C.WebHome]]
> (relative)
>>>>> * to A.C.D (terminal descendant of sibling) => [[doc:.C.D]]
(relative)
>>>>> * to A.C.D.WebHome
(non-terminal descendant of sibling) =>
>>>>> [[doc:.C.D.WebHome]] (relative)
>>>>> * to X.Y => [[doc:X.Y]]
>>>>> * to X.Y.WebHome => [[doc:X.Y.WebHome]]
>>>>>
>>>>> Link from A.B.C (terminal)
>>>>> * to A.B.WebHome (its parent) => [[doc:WebHome]] (relative)
>>>>>
>>>>> Link from A.B.C.WebHome
>>>>> * to A.B.WebHome (its parent) => [[doc:A.B.WebHome]] (absolute)
>>>>>
>>>>> PROS:
>>>>> * unambiguous link references ("what you link is what you
get")
>>>>> * relative references for nested non-terminal descendants
>>>>> * same output for <7.2 and 7.2+
>>>>> * simpler code (easier to maintain)
>>>>>
>>>>> CONS:
>>>>> * doesn't hide WebHome from source syntax
>>>>> * longer link references (because of "doc:" prefix and
"WebHome"
> suffix)
>>>>>
>>>>>
>>>>> I don't like ambiguous links so I'm against option (1). I
don't
think
>> the
>>>>>> WYSIWYG editor users care too much about the wiki syntax (option
2),
for
>>>> option
>>>>> (3).
>>>>>
>>>>> WDYT?
>>>>>
>>>>> Thanks,
>>>>> Marius
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Guillaume Delhumeau (guillaume.delhumeau(a)xwiki.com)
Research & Development Engineer at XWiki SAS
Committer on the
XWiki.org project
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs