Page MenuHomePhabricator

Enable Reply Tool to adapt to indentation syntax used at ru.wiki
Open, Needs TriagePublic

Description

This task involves the work with making it so the Reply Tool uses the indentation Senior Contributors at ru.wiki expect.

Background

T252708 makes it so the Reply Tool uses a consistent character ( :) for indenting all comments posted with it. This task is about adjusting how the Reply Tool behaves at ru.wiki such that it instead uses * to indent comments posted with it.

Implementation details

  1. At ru.wiki:
    • The Reply Tool will, by default, indent comments posted with it using *
  2. For the behavior described in "1." to be adjusted, a config change would need to be made. Read: adjusting the behavior described in "1." will NOT happen via a MediaWiki:message.

Open questions

Done

  • Answers to all ===Open questions are documented
  • The behavior described in the ===Implementation details section above is implemented

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change of course
During today's team meeting, @Esanders raised the following point:

  • Might there be wikis that prefer the Reply Tool inherit the indentation syntax used in the comment being replied to (e.g. perhaps there are wikis that use different syntax depending on the page as is done on ru.wikipedia)?e

With the above mind, I think we should wait to work on this task until we have received an explicit request from wikis to change the behavior T252708 introduces.

Sure, it shouldn't be difficult to bring back the previous behavior (and make it configurable), if that's desired.

Change 672430 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Enable wikis to customize the syntax used for replies

https://gerrit.wikimedia.org/r/672430

(We're still considering what is the best way to do this)

@Jack_who_built_the_house, the team's wondering whether this should be handled as a config change (have to get a dev if you want to change it) or as a MediaWiki: message, which could be changed locally by any interface-admin. This might only be used at ruwiki, so I'd like to know what you recommend.

@Whatamidoing-WMF Giving it to a small group of admins is the easy way to push their opinions through a message (which change they can easily and quietly influence) to all users of the wiki. When the tool works the same on all sites, it is the Foundation's decision, but when you give the change to the admin, it is largely the decision of that small group. There is no rule about one specific symbol in ruwiki. They will not use Reply Tool because they are using their own script CD. This is your tool and your decision. There will be no personal choice for editors neither by personal editing, nor by local voting (all votes are short-term and few editors participate. Invite all users of their script to influence the decision they need in the vote and the result is obvious), interface-admins will of course push DiscussionTools users into the behavior of their scripts. This whole approach with symbols only creates local holywars. When contributors do not personally choose when creating a comment, as they do now, this is not the same approach when the developers suggested making "existing" things easier.

Giving it to a small group of admins is the easy way to push their opinions through a message (which change they can easily and quietly influence) to all users of the wiki. When the tool works the same on all sites, it is the Foundation's decision, but when you give the change to the admin, it is largely the decision of that small group.

The Foundation employees are also a small group in this case, a small group that decided (in my honest opinion, others might disagree) that the worse web accessibility does not matter if people in the communities use inaccessible variant too much. Why should they get the final say in your opinion? And what, do you think, you are exactly fighting for here?

There is no rule about one specific symbol in ruwiki. They will not use Reply Tool because they are using their own script CD.

Maybe, but that also does not mean that two scripts, both of which would probably continue to be widely used by hundreds of editors, should differ in their default behaviour for no reason.

Both syntaxes are pretty awful, let's please not make this task a discussion about which one is better.

We want the reply tool to use the syntax preferred by the majority of senior editors, regardless of which syntax is better, because even if those senior editors don't use the reply tool themselves, they will be often replying to comments posted by junior users who do use it, and we don't want them to get upset and bite the newcomers over this silly detail.

I hope that clarifies why we're working on this change, and why we're deferring to your opinion in this case.

@matmarex Does this mean that by creating a global variable it will be left to work like this for a long term and for many years? Does this mean that the developers have no further plans to unify the presentation for all discussions with the tool (with/without visible bullets regardless of the ul/dl code)? After all, there were earlier some proposals for additional more complex markup.

@matmarex Does this mean that by creating a global variable it will be left to work like this for a long term and for many years?

Probably (but it can be changed whenever the community requests it, and as mentioned above, we're considering using a MediaWiki: message instead if you wanted to make it easier to change).

Does this mean that the developers have no further plans to unify the presentation for all discussions with the tool (with/without visible bullets regardless of the ul/dl code)?

We're planning to work on changes to the presentation of discussions (https://www.mediawiki.org/wiki/Talk_pages_project/Visual_enhancements), but that hasn't started yet.

We've experimented with some radical changes to discussion pages, but we're probably not going to work on that any time soon. Here's a demo (only works on Firefox and Chrome): https://patchdemo.wmflabs.org/wikis/c59b46652abe0a4090fd15442b50c2b3/w/index.php/Special:ViewDiscussions/Project:Village_pump_(technical)/Archive_180. Such a change is both difficult to do reliably, and probably more than senior users are ready for. It would, however, get rid of bullets or lack thereof, and would probably improve the screenreader/keyboard accessibility and readability on mobile (although it was just a quick experiment, and we haven't tested it with any actual users). Maybe we'll get there in a few years.

By the way, some wikis already replaced the bullets/indents with different styling, check out https://fr.wikipedia.org/wiki/Wikipédia:Le_Bistro for example. Maybe that's an idea you could propose at Russian Wikipedia. (I know that the ConvenientDiscussions script also does some styling changes.)

I'm not sure if that really answers your question, sorry.

After all, there were earlier some proposals for additional more complex markup.

We were trying to propose a wikitext syntax for multi-line list items (and multi-line discussion comments): T230683. But they would still work mostly like normal list items, so that would not change the bullets.

@Jack_who_built_the_house, the team's wondering whether this should be handled as a config change (have to get a dev if you want to change it) or as a MediaWiki: message, which could be changed locally by any interface-admin. This might only be used at ruwiki, so I'd like to know what you recommend.

For ruwiki, I don't see much difference, as this value is unlikely to change. But I doubt this won't be used in other projects, since at least there are Russian projects other than Wikipedia that will likely use the same indentation, and that could also be the case for wikis in languages of Russia and CIS countries, since many of them have the same users and customs. But honestly I'm a rare guest there, and I don't know which indentation is used where. So, perhaps it would be easier for them to edit a MediaWiki message? I don't know.

On the other hand, I'm not sure this setting is at all suitable for MediaWiki messages. First of all, I doubt that any alternatives to * and : exist. Does any wiki count comments and start them with #? I would be surprised if it does.

BTW, one more thing. In ruwiki, there is a solid custom to put a space after indentation characters. We write

* Comment
: Comment

not

*Comment
:Comment

Could this be configurable too?

In Convenient Discussions, there is also a third setting that determines whether a new comment at the first level should repeat the previous comment's indentation style ('mimic' mode) or should the script use the default indentation char in all cases ('unify' mode).

Maybe DiscussionTools will have some of the mentioned or other settings. And I guess it's better to have all of them in one place. And not necessarily all of them will be suitable for MediaWiki messages.

But maybe I'm overcomplicating things and the devs will decide it's simpler to have a MediaWiki message or two.

I am removing this ticket from the Editing Team's current workboard because:

  1. Work on this ticket will likely be prioritized as part of making the Reply Tool available as an available-by-default feature at all projects (T262331)
  2. Work on "1." is blocked by T280599
  1. Work on this ticket will likely be prioritized as part of making the Reply Tool available as an available-by-default feature at all projects (T280599)

You mean T275256?

  1. Work on this ticket will likely be prioritized as part of making the Reply Tool available as an available-by-default feature at all projects (T280599)

You mean T275256?

Ah, good catch – thank you for saying something. I meant T262331. T259864#7226156 should now be accurate.

ppelberg renamed this task from Enable wikis to customize the syntax used to indent comments posted with Reply Tool to Enable Reply Tool to adapt to indentation syntax used at ru.wiki.EditedJan 10 2022, 6:40 PM
ppelberg updated the task description. (Show Details)

Path Forward
In a meeting the Editing Team had on 15-Dec-2021, we came to think a good first step would be to implement an approach similar to the mimic mode @Jack_who_built_the_house described in T259864#6931828.

Doing the above would mean all new comments people people using the Reply Tool at ru.wiki would be indented using * EXCEPT in cases where the comment being responded to was indented with an :. In this latter case, the Reply Tool would indent the comment being posted with a colon.

We think this approach will increase the likelihood that the Reply Tool will indent comments with syntax Senior Contributors will expect without introducing the number of things Juniors will need to think about/question when drafting comments.

I've updated the task description's ===Implementation Details section with the above.

In a meeting the Editing Team had on 15-Dec-2021, we came to think a good first step (see "Thinking" below) would be to implement an approach similar to the mimic mode @Jack_who_built_the_house described in T259864#6931828.

Doing the above would mean all new comments people people using the Reply Tool at ru.wiki would be indented using * EXCEPT in cases where the comment being responded to was indented with an :. In this latter case, the Reply Tool would indent the comment being posted with a colon.

Just want to note that the current behavior of CD's mimic mode is to repeat the indentation of the previous comment when posting a comment at the first level (i.e., replying to a topic), not the indentation of the comment being responded to when replying to a reply. The broad idea behind that is:

  • There can be different indentation styles on the same wiki. For example, you can often see topics at EnWP's Village pump where people use * indentation despite that in most other places, : is the convention.
  • On default settings, at least for the first level comments, the tool should work as users expect on the wiki. So, mimicking the style already used is the safest way.

But when replying to a reply, CD always uses the default character. This came out of the observation that even though the indentation style of first level comments can differ on a wiki, replies to replies are usually more consistent on the whole-wiki scale (as opposed to the individual-user scale). E.g., at Vllage pump that I mentioned above, first level comments can have * while replies to them have *: or ::. This is not a firm decision though and can be changed.

Thanks for the extra explanations @Jack_who_built_the_house.

I started looking into matching your implementation of indentationCharMode: 'mimic', but then I realized that Russian Wikipedia uses the 'unify' mode, which already matches the behavior of DiscussionTools, as far as I can tell. Am I missing something?

Although 'mimic' is the default in Convenient Discussions, no one else has been asking us to implement that behavior, so I think we can skip this work entirely (at least until someone asks for it). I'll update the task description.

So we just need to have a way to change the reply syntax, matching CD's defaultIndentationChar: '*'. I'm updating my old patch for this: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/672430.

Change 672430 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Enable wikis to customize the syntax used for replies

https://gerrit.wikimedia.org/r/672430

Change 753190 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Ensure the marker appears in a reasonable place when replying with a bullet

https://gerrit.wikimedia.org/r/753190

Change 753192 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] DiscussionTools: Use bullet indentation on ruwiki

https://gerrit.wikimedia.org/r/753192

Change 753194 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Add tests for bullet indentation

https://gerrit.wikimedia.org/r/753194

I started looking into matching your implementation of indentationCharMode: 'mimic', but then I realized that Russian Wikipedia uses the 'unify' mode, which already matches the behavior of DiscussionTools, as far as I can tell. Am I missing something?

No, that's correct. I just thought you came to a conclusion that mimicking the comment being replied to is better than simple unify from the perspective of the junior-senior contributor dynamic and wanted to clarify the meaning of mimic in CD :-)

Change 672430 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Enable wikis to customize the syntax used for replies

https://gerrit.wikimedia.org/r/672430

Change 753190 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Ensure the marker appears in a reasonable place when replying with a bullet

https://gerrit.wikimedia.org/r/753190

Change 753194 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add tests for bullet indentation

https://gerrit.wikimedia.org/r/753194

The next steps (next week) are to ensure the code from patches above is deployed (backporting if necessary), then deploy the config change https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/753192.

Change 754915 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@wmf/1.38.0-wmf.17] Enable wikis to customize the syntax used for replies

https://gerrit.wikimedia.org/r/754915

Change 754916 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@wmf/1.38.0-wmf.17] Ensure the marker appears in a reasonable place when replying with a bullet

https://gerrit.wikimedia.org/r/754916

Change 754915 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.38.0-wmf.17] Enable wikis to customize the syntax used for replies

https://gerrit.wikimedia.org/r/754915

Change 754916 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@wmf/1.38.0-wmf.17] Ensure the marker appears in a reasonable place when replying with a bullet

https://gerrit.wikimedia.org/r/754916

Change 753192 merged by jenkins-bot:

[operations/mediawiki-config@master] DiscussionTools: Use bullet indentation on ruwiki

https://gerrit.wikimedia.org/r/753192

Mentioned in SAL (#wikimedia-operations) [2022-01-19T01:02:33Z] <catrope@deploy1002> Synchronized php-1.38.0-wmf.17/extensions/DiscussionTools: Backport: [[gerrit:754915|Enable wikis to customize the syntax used for replies (T259864)]] and [[gerrit:754916|Ensure the marker appears in a reasonable place when replying with a bullet (T259864)]] (duration: 00m 53s)

Mentioned in SAL (#wikimedia-operations) [2022-01-19T01:07:14Z] <catrope@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:753192|DiscussionTools: Use bullet indentation on ruwiki (T259864)]] (duration: 00m 53s)

Offline, we decide to make an adjustment to how the Reply Tool will look at ru.wiki (and any other wiki where * is used to indent comments rather than :)

Change

  1. Remove the "•" that currently appears next to the "B" within the Reply Tool's source mode:

Screen Shot 2022-01-19 at 11.34.20 AM.png (618×1 px, 81 KB)

Assumptions/Thinking Influencing "Change"

  1. The majority of Senior Contributors at ru.wikipedia use the Reply Tool's source mode [i]
  2. Assumption: the "• " that currently appears within the source mode's real-time preview will be sufficient for helping Senior Contributors to see / understand that the comments they draft with the reply tool will have " • " prepended to them:

Screen Shot 2022-01-19 at 11.36.01 AM.png (766×1 px, 111 KB)


i. While it's not a 1:1 comparison, see that 185 comments have been posted with the reply tool at ru.wiki in the pats 30 days (via https://dtcheck.toolforge.org/dtstats.html) and see that in dec 2021, of all the comments senior contributors posted at ru.wiki by with reply tool, 180 were made with one of the reply tool's two source modes (via https://superset.wikimedia.org/r/1098)

Change 755476 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] When using bullet syntax, hide the marker next to the reply tool

https://gerrit.wikimedia.org/r/755476

Thanks for implementing this change. The implementation is faulty though. Perhaps I should have mentioned this earlier, but it didn't came to my mind and you didn't ask.

Here I wrote

Testing a comment with two lines. First line.
Second line.

The result

*Testing a comment with two lines. First line.
*Second line. [signature]

The whole point of bullets (and probably the reason why it became a convention in RuWP) is that bullets denote comments. One bullet – one comment. This means that if a comment has two lines, the second line goes with : or <br> or even a paragraph, but it doesn't receive a second *.

In this case, I suppose the expected behavior is to post

*Testing a comment with two lines. First line.
:Second line. [signature]

(CD goes with <br> but Reply Tool uses : as I witnessed.)

You can argue that the semantics is faulty here, but well, if we dive into that, we will eventually discover that <dl>s of : are not really description lists and so on.

In this case, you should also account for possible lists in the comment and fall back to : if it has a list at the first line, so that the result is

:* List item.
:* List item.
:Comment ending.

and not

** List item.
:* List item.
:Comment ending.

which would give both semantically and visually wrong result. (And also not

** List item.
** List item.
*Comment ending.

which would make the layout even more confusing than without lists.)

CD has some more logic implicated here, but these considerations are most essential I believe.

In this case, I suppose the expected behavior is to post

*Testing a comment with two lines. First line.
:Second line. [signature]

This should not be done for accessibility reasons. See https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Accessibility#Lists.

Accessibility is actually one reason why some of RuWP users argue for using *, not :, as well, since : are description lists that necessitate the use of <dt> (; in the wiki markup). I haven't conducted research on how <ul>s (*) and <dl>s are actually treated by screen readers and such, and that information is welcome.

So, the accessibility concern in this particular case could be addressed in at least two ways that come to my mind:

  • Use <br> instead of :. It doesn't come down to just RuWP and * problem as it also applies to :-only indentation, and it's actually interesting which is better in terms of accessibility. Visually they currently differ in Vector only in that : creates a 1–2 pixel vertical gap while <br> creates none, so this can be neglected. There are some difficulties in mixing <br>s with lists inside comments, but those could be overcome. <p>...</p> can also be used instead of <br> but this would need additional tweaks to be made to make sure the discussion structure is consistent.
  • Do a special transformation on talk pages of such markup, keeping it in the wikitext but tweaking it for the parsed form.

CD does both things, using <br>s and merging adjacent <dl>s and <ul>s (only those used for comment indentation) together and reducing them to one form.

If this is too complex at this stage of development, and if the accessibility concern is considered valid (although it may need additional research, and if accessibility really is to be taken seriously, much would need to be rethough), I could suggest falling back to : intentation if the comment has more than one line, as starting each line with * is IMHO much more misleading and potentially annoying than choosing : indentation for a whole comment, since it violates the principle "bullets denote comments". (As a side note, this doesn't affect CD users as they see thread lines on the side of comments, not bullets or plain indentation, see example.)

Change 755476 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] When using bullet syntax, hide the marker next to the reply tool

https://gerrit.wikimedia.org/r/755476

@Jack_who_built_the_house: first off, the clear and timely feedback you continue to share helps us to ensure the Reply Tool works in ways volunteers at ru.wiki expect and value...thank you!

Now, to the issues you raised in T259864#7634915: it's clear the Editing Team has some more thinking to do about how the Reply Tool can be configured to meet the needs of volunteers at ru.wiki.

With the above in mind, here is what I'm thinking we will do next:

  1. Until we – volunteers at ru.wiki and the Editing Team – converge on an approach to indentation syntax that we are both satisfied with, the Reply Tool will pause any plans to make the Reply Tool available by default at ru.wiki
  2. The Editing Team is going to draft the requirements we understand any approach to indentation syntax will need to satisfy for the Reply Tool to be made available by default at ru.wiki and propose a set of a approaches we think could satisfy said requirements
  3. Once "2." is done, we will share these requirements and approaches with you, and other volunteers at ru.wiki, to ensure we have a shared understanding of the requirements and see if you all are comfortable with any of the approaches we are proposing.

...does any of what I've described above bring any questions or concerns to mind for you?

@Jack_who_built_the_house Thanks for bearing with us.

We were aware of the issues with multi-line comments, but I think we underestimated how much the ru.wp community cares about them, and wanted to avoid implementing more special cases if possible (or at least, I was and I did, not sure if I can speak for everyone :) ). I guess it's not possible to avoid, so we should do that.

(I didn't actually think of the extra-special special cases for comments starting with lists, thanks for bringing up that in particular. I found that you have some test cases for these behaviors in https://github.com/jwbth/convenient-discussions/blob/master/tests/parseCommentText.test.js, I'm going to borrow them.)

As for semantics and accessiblity of * and : and <dl> and <ul>: As far as I know, they're both equally awful, and it doesn't really matter which one we use. Mixing them in one comment is probably making it worse, but I don't think that's the main problem with accessibility of talk pages. (In my own experience trying to use Windows Narrator, the most infuriating thing was hearing the fancily formatted signatures spoken aloud.)

It looks like switching from * to : is the easiest thing to implement in our code (adding <br> or <p>...</p> markup would be trickier), and it's already used widely on ru.wp and we're not planning to introduce it elsewhere, so that is my current preference, in spite of the ugly / non-semantic / non-accessible markup it generates.

We've talked about this in the engineering meeting today, and @cscott had a new idea: what if we used : for indentation, but added a little bit of CSS styling to display bullet markers at the beginning of each comment? We now have indicators for that in the HTML (the <span data-mw-comment-start …> elements), generated by DiscussionTools, so styling them with CSS actually becomes possible (it wasn't before).

This is, of course, assuming that ru.wp folks care about how the page looks in read mode, rather than what exact markup it uses.

Something like this could work:

dd span[data-mw-comment-start] {
	display: list-item;
	position: absolute;
	top: unset;
	margin-top: -1em;
	padding-top: 1em;
	list-style-image: url(/w/skins/Vector/resources/common/images/bullet-icon.svg);
	pointer-events: none;
}

But if you do care about the exact markup, I also took a stab at implementing the required mix of * and :: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/757011

It is not pretty, but it seems feasible to do this as well. We'd very much prefer the other solution, though.

Next steps

  • @Whatamidoing-WMF is going to share, and invite feedback about, the approaches proposed above at ru.wiki