Page MenuHomePhabricator

Enable line numbering in all namespaces for all wikis
Open, Needs TriagePublicFeature

Description

Feature summary:
I would like the line numbering implemented per T267911 to be enabled on all namespaces on all wikis, since I believe there are no issue reported for first wikis after T280027.

Use case(s):
Diffs show line number of changes. This useful indication is also requested for inline diff too per T347013.
However, there is no easy way to find the matching line in the editor, if you want to correct the changes.

Also, that would be much easier to quote an issuing line in talk pages, improving discussions about articles, especially for formatting/technical needs (wikifying).

Benefits:
All wikis would gain this nice feature, especially small wikis which are not aware they can request it.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
MusikAnimal subscribed.

I agree it makes sense to include line numbers in all namespaces, given we reference them elsewhere such as in diffs.

This is currently a configuration setting ($wgCodeMirrorLineNumberingNamespaces) so it can easily be changed now without issue. That said, I wanted to mention I'm about ~30% of the way done with the CodeMirror 6 upgrade (T259059). As part of this, I'm wondering if we should remove the config setting altogether?

I'm wondering if we should remove the config setting altogether?

  • I think it will be probably useless, indeed.
  • However, some communities may dislike line numbering. If they request their removing, keeping this config may be helpful.

So I would not spent time to remove this config setting. Just my 2 cents…

That seems to be fixed with MW 1.42-wmf.24 (7e9d90bb5256 I guess), but I’m not sure that was expected.

Change #1015169 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CodeMirror@master] Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5

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

That seems to be fixed with MW 1.42-wmf.24 (7e9d90bb5256 I guess), but I’m not sure that was expected.

Eek, no it was not! The patch above should restore the expected behaviour. I don't think this warrants UBN or as a train blocker but we will get this backported ASAP.

I personally am with you, and believe line numbering should be the default behaviour, but I think we need a bit more input first. Perhaps this little mishap will bring us some feedback! Hopefully not negative, as it was not an intentional change. My apologies.

Thank you for the patch @MusikAnimal.

May we consider not backporting it until we get negative feedbacks? One week testing may be an interesting crashtest. 🤭

Change #1015186 had a related patch set uploaded (by Tim Starling; author: MusikAnimal):

[mediawiki/extensions/CodeMirror@wmf/1.42.0-wmf.24] Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5

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

Change #1015169 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@master] Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5

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

Change #1015186 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@wmf/1.42.0-wmf.24] Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5

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

Mentioned in SAL (#wikimedia-operations) [2024-03-28T03:56:39Z] <tstarling@deploy1002> Started scap: Backport for [[gerrit:1015186|Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5 (T347211)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-28T03:59:09Z] <tstarling@deploy1002> tstarling: Backport for [[gerrit:1015186|Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5 (T347211)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-28T04:11:09Z] <tstarling@deploy1002> Finished scap: Backport for [[gerrit:1015186|Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5 (T347211)]] (duration: 14m 30s)

Sorry, what was being shipped was in fact a bug, not just a misconfiguration. So it needed to be fixed. From here however we should keep the conversation going :)

@Lena_WMDE Do you have any opposition to fulfilling this task? I can ask around people from group2 wikis to see what they think, if that helps.

MusikAnimal raised the priority of this task from High to Needs Triage.Mar 28 2024, 4:27 AM

@MusikAnimal thanks for the ping. No opposition from us to fulfilling the task. Asking group2 wikis sounds like a good next step, and would also suggest talking to @ppelberg from the Editing Team as a stakeholder in this decision.

@ppelberg is away for a while (E1732) but I did consult the Editing team and there were no technical objections. It was mentioned that line numbering could be confusing to new users, but this is less of a concern right now that CodeMirror is not on by default. T359498 will also later provide a means for users to selectively toggle individual features as they so desire. When that time comes, communities can decide what the default features they want, and having CodeMirror on by default I think will be more realistic.

So for now, I think what we're planning is to ship line numbering in all namespaces for each new wiki that we deploy CodeMirror 6 to (see rollout task at T357795 -- there will likely be more pilots, FYI!). This begins with Hebrew Wikipedia which I hope to deploy to today or tomorrow.

Change #1023501 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[operations/mediawiki-config@master] [hewiki] enable CodeMirrorV6 and CodeMirrorLineNumberingNamespaces

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

Change #1023501 merged by jenkins-bot:

[operations/mediawiki-config@master] [hewiki] enable CodeMirrorV6 and CodeMirrorLineNumberingNamespaces

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

Mentioned in SAL (#wikimedia-operations) [2024-04-24T16:42:41Z] <hmonroy@deploy1002> Started scap: Backport for [[gerrit:1023501|[hewiki] enable CodeMirrorV6 and CodeMirrorLineNumberingNamespaces (T357795 T347211)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-24T16:45:07Z] <hmonroy@deploy1002> musikanimal and hmonroy: Backport for [[gerrit:1023501|[hewiki] enable CodeMirrorV6 and CodeMirrorLineNumberingNamespaces (T357795 T347211)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-24T17:03:00Z] <hmonroy@deploy1002> Finished scap: Backport for [[gerrit:1023501|[hewiki] enable CodeMirrorV6 and CodeMirrorLineNumberingNamespaces (T357795 T347211)]] (duration: 20m 36s)