On 9 Feb 2019, at 13:11, Marius Dumitru Florea
<mariusdumitru.florea(a)xwiki.com> wrote:
On Fri, Feb 8, 2019 at 4:12 PM Vincent Massol <vincent(a)massol.net> wrote:
On 8 Feb 2019, at 14:00, Marius Dumitru Florea
<
mariusdumitru.florea(a)xwiki.com> wrote:
On Fri, Feb 8, 2019 at 1:51 PM Vincent Massol <vincent(a)massol.net>
wrote:
>
>
>> On 8 Feb 2019, at 12:45, Marius Dumitru Florea <
> mariusdumitru.florea(a)xwiki.com> wrote:
>>
>> On Fri, Feb 8, 2019 at 10:25 AM Vincent Massol <vincent(a)massol.net>
> wrote:
>>
>>>
>>>
>>>> On 8 Feb 2019, at 09:20, Marius Dumitru Florea <
>>> mariusdumitru.florea(a)xwiki.com> wrote:
>>>>
>>>> On Fri, Feb 8, 2019 at 9:52 AM Vincent Massol <vincent(a)massol.net>
>>> wrote:
>>>>
>>>>> Hi Marius/All,
>>>>>
>>>>> See below
>>>>>
>>>>>> On 31 Jan 2019, at 11:29, Vincent Massol
<vincent(a)massol.net>
wrote:
>>>>>>
>>>>>> Hi Marius/all,
>>>>>>
>>>>>>> On 30 Jan 2019, at 15:45, Marius Dumitru Florea <
>>>>> mariusdumitru.florea(a)xwiki.com> wrote:
>>>>>>>
>>>>>>> Hi devs,
>>>>>>>
>>>>>>> I'm working on
https://jira.xwiki.org/browse/XWIKI-1660
(I need
it
>>> for
>>>>>>>
https://jira.xwiki.org/browse/XWIKI-13352) and I'd like
to change
> the
>>>>> page
>>>>>>> rename job (from refactoring module) to update the existing
objects
>>>>> when a
>>>>>>> class is renamed *if the "Update links" options is
checked*.
>>>>>>>
>>>>>>> Of course, we could add a new option (e.g. "Update
objects") but:
>>>>>>>
>>>>>>> * it complicates the rename UI (too many options)
>>>>>>> * I think most of the users understand the current
"Update links"
>>>>> option as
>>>>>>> "update the places where this page is *used*". I
don't think it
> makes
>>>>> sense
>>>>>>> to have separate options (at least at the UI level) for
things
like
>>>>> "Update
>>>>>>> macro calls" or "Update image includes".
>>>>>>> * I don't see why you would want to update the back-links
but not
> the
>>>>>>> objects (or the other way around).
>>>>>>
>>>>>> Sounds good to me in general.
>>>>>>
>>>>>>> If we agree on using a single option ("Update
links") then the
next
>>>>>>> questions are:
>>>>>>>
>>>>>>> * Is there a better name? I think "Update links" is
a good name
for
>>>>> simple
>>>>>>> users so I would keep it. Another option is "Update
references"
but
> it
>>>>> has
>>>>>>> a special meaning for XWiki developers.
>>>>>>
>>>>>> Maybe "Update other pages” with a hint saying “Ensure that
other
> pages
>>>>> using the renamed pages continue to work after the rename”.
>>>>>>
>>>>>> ?
>>>>>>
>>>>>>>
>>>>>>> * Should we update the hint for the "Update links"
option? I think
> we
>>>>>>> should, but only for advanced users, since they should be
aware of
> the
>>>>>>> implications of renaming a class. Simple users are not aware
of
the
>>>>>>> existence of objects,
most probably, so I wouldn't complicate
their
>>>>> lives.
>>>>>>
>>>>>> Would be nicer to find a single message that work for everyone
but
I
>>>>> agree it’s not easy if we
wish to provide details.
>>>>>>
>>>>>> I feel a nicer option would be to NOT show “Update other pages”
for
>>>>> simple users since that should always be checked. Only offer the
>>> ability to
>>>>> uncheck it for advanced users and this solves the hint issue too :)
>>>>>
>>>>>
>>>>
>>>>> Nobody replied to this proposal but I really find it the best by far
> and
>>>>> it solves your other questions too while making the UI simpler
> globally.
>>>>>
>>>>
>>>> The only issue I see with this option is that by hiding the "Update
>>> Links"
>>>> the simple users might not be aware of the side effects of the rename
>>>> operation: the fact that other pages will have to be updated. Seeing
>>> that a
>>>> page you want to rename is referenced in many places can make you
think
>>> twice about the rename.
>>
>>
>
>> We could keep that info, it could be useful indeed.
>>
>
> I can keep the message but then I'll probably need to display different
> messages for simple and advanced users. Moreover, ideally the message
> should be updated whenever the Preserve Children checkbox is clicked
(e.g.
> to indicate that there are more pages to update if the child pages are
> preserved).
By messages I meant to indicate (as information)
the number of links
leading to the renamed pages.
Sure, but it's not just links. There's also xobjects of a class that is
among those pages being renamed. There are two options:
* show a single number (e.g. "There are *10 other pages* that are going
to
be updated because they are referencing the pages
that are being
renamed")
. The issue here is de-duplication: if you simply
sum up the backlinks +
xobjects + etc. then you can have pages counted multiple times...
Moreover,
we would need to provide a link to a view showing
these other pages (as
we
have for backlinks right now), and having a
unified backlinks + xobjects
+
etc. is complex.
Why is it complex? For me it’s about putting
references to pages in a Set.
Whether the update will come from a link or an xobject can be seen as a
detail.
I'm not sure that scales.. Renaming a large hierarchy of pages (I've heard
users trying to rename / move the XWiki page...) can lead to thousands of
back-links, xobjects, etc.