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).