On Tue, Apr 12, 2016 at 4:18 PM, Marius Dumitru Florea
<[email protected]> wrote:
> On Tue, Apr 12, 2016 at 5:12 PM, Thomas Mortagne <[email protected]>
> wrote:
>
>> On Tue, Apr 12, 2016 at 4:09 PM, Vincent Massol <[email protected]>
>> wrote:
>> >
>> >> On 12 Apr 2016, at 15:43, 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.).
>> >
>> > 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).

I know this is already the case, that was my point that it was not
requiring the WYSIWYG to do much about it :)

>
>
>>
>> >
>> > 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),
>> 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
>>
> _______________________________________________
> 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