On Tue, Apr 12, 2016 at 4:11 PM, Vincent Massol <[email protected]> wrote:
>
>> On 12 Apr 2016, at 16:09, Thomas Mortagne <[email protected]> wrote:
>>
>> -1 for (1)
>> +1 for (3)
>
> Could you explain why you prefer (3) to (2)?

(3) is simpler to implement and (2) does not really give you much
simpler references (there is no concept of space anywhere in the UI
and you end up with "space:" references), at least in (3) there is
only one kind of reference.

I don't find any of the proposal perfect but I did not voted -1 for
(2), if everyone prefer (2) then so be it but on my side I find (3)
better right now.

>
> Thanks
> -Vincent
>
>>
>> On Tue, Apr 12, 2016 at 3:43 PM, Marius Dumitru Florea
>> <[email protected]> wrote:
>>> On Tue, Apr 12, 2016 at 4:30 PM, Vincent Massol <[email protected]> wrote:
>>>
>>>> Hi Marius,
>>>>
>>>>> On 12 Apr 2016, at 14:56, Marius Dumitru Florea <
>>>> [email protected]> 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.).
>>>
>>> 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)
>>>
>>> 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), as I
>>>>> commented on http://jira.xwiki.org/browse/XWIKI-13083, so I'm +1 for
>>>> option
>>>>> (3).
>>>>>
>>>>> WDYT?
>>>>>
>>>>> Thanks,
>>>>> Marius
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to