GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Edit Task
  • Edit Related Tasks...
  • Create Subtask
  • Edit Parent Tasks
  • Edit Subtasks
  • Merge Duplicates In
  • Close As Duplicate
  • Edit Commits
  • Edit Mocks
  • Mute Notifications
  • Protect as security issue
  • Mobile
  • (MobileFrontend specific)
  • MediaWiki-Page-editing

This view

  • Original page
  • New address

GeezerVison is showing phabricator.wikimedia.org — T362467 Section link should be added to the edit summary when editing the lead section

Page MenuHomePhabricator
Log In
Create Task
Maniphest T362467

Section link should be added to the edit summary when editing the lead section
Closed, ResolvedPublicFeature
Actions

  • Edit Task
  • Edit Related Tasks...
  • Create Subtask
  • Edit Parent Tasks
  • Edit Subtasks
  • Merge Duplicates In
  • Close As Duplicate
  • Edit Related Objects...
  • Edit Commits
  • Edit Mocks
  • Mute Notifications
  • Protect as security issue
Assigned To
matmarex
Authored By
Warudo
Apr 13 2024, 1:41 PM2024-04-13 13:41:02 (UTC+0)
Project Tags
  • Mobile (MobileFrontend specific)
  • MediaWiki-Page-editing (Backlog)
  • Desktop
  • MobileFrontend (MobileFrontend (Editor)) (Triaged)
  • MW-1.46-notes (1.46.0-wmf.26; 2026-04-28)
  • MW-1.47-notes (1.47.0-wmf.3; 2026-05-19)
Referenced Files
None
Subscribers
Aklapper
• bzimport
Jackmcbarn
jayvdb
jeremyb-phone
Markhurd
matmarex
View All 12 Subscribers

Description

Feature summary (what you would like to be able to do and where):
On mobile, using the edit button to edit the lead does not add a section link to the edit summary. Compare that with desktop where, if one uses the "Add an [edit] link for the lead section of a page" gadget, "/* top */" is added to the beginning of the edit summary. Mobile's behaviour should match desktop's, and its own when editing any other part of an article where a section link is added to the beginning of the edit summary.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Benefits (why should this be implemented?):
For the same reason this is implemented for the other section edit buttons. So it's obvious to anyone reading the revision history that the edit they are looking at only modified the lead section.

Details

Related Changes in Gerrit:
SubjectAuthorRepoBranchLines +/-
Respect initial edit summary on mobileBartosz Dziewońskimediawiki/extensions/VisualEditormaster+1 -9
Prefill edit summary for section=0 with "/* */ " if not specifiedBartosz Dziewońskimediawiki/extensions/VisualEditormaster+5 -2
Prefill edit summary for section=0 with "/* */ " if not specifiedBartosz Dziewońskimediawiki/coremaster+9 -3
Prefill edit summary for section=0 with "/* */ " if not specifiedBartosz Dziewońskimediawiki/extensions/DiscussionToolsmaster+14 -4
Prefill edit summary for section=0 with "/* */ "Bartosz Dziewońskimediawiki/extensions/MobileFrontendmaster+6 -3
Customize query in gerrit

Related Objects
Search...

  • Task Graph
  • Mentions
  • Duplicates
StatusSubtypeAssignedTask
OpenNoneT50719 Issues related to section editing (tracking)
OpenFeatureNoneT2156 Allow editing the lead section of a page
ResolvedFeaturematmarexT362467 Section link should be added to the edit summary when editing the lead section
Mentioned Here
T412472: Allow formatting empty autocomments in edit summaries
T280308: Android app is adding page titles as /* section links */ in summaries for edits to lead sections
Duplicates Merged Here
T20004: Add a default edit summary for section 0

Event Timeline

Warudo created this task.Apr 13 2024, 1:41 PM2024-04-13 13:41:02 (UTC+0)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 13 2024, 1:41 PM2024-04-13 13:41:13 (UTC+0)
Warudo updated the task description. (Show Details)Apr 13 2024, 1:41 PM2024-04-13 13:41:48 (UTC+0)
Xaosflux subscribed.Apr 13 2024, 2:57 PM2024-04-13 14:57:50 (UTC+0)
Comment Actions

Please clarify what you mean by "on mobile". Are you using the Wikipedia app, if so for what operating system? Are you using the Mobile Web?

Please provide a diff of the edit that was made, and information on what you think it should have said instead.

Warudo added a comment.Edited · Apr 13 2024, 3:38 PM2024-04-13 15:38:38 (UTC+0)
Comment Actions

I've already specified above I'm referring to Mobile Web (EDIT:I did not actually, but I thought I did. I'm sorry about that) So, as you can see in this edit when editing a section, a link to that section is added to the beginning of the edit summary. However, when I edited the lead by using its dedicated button, no such link was added. Instead, no section was added at all as if I was using the "Edit full page" button (like I did here). Here's an example of an edit to the lead section on desktop (done with the gadget I mentioned above). As you can see, a section link to the "top" section is added, which when clicked takes you to the top of the page, aka the lead section.

Xaosflux added a comment.Apr 13 2024, 4:02 PM2024-04-13 16:02:58 (UTC+0)
Comment Actions

There is no actual section on the page called "top" - and no one else would be able to follow it using that link. However, this all seems to be something that your gadget is handling, not part of mobile. Have you checked with the gadget maintainers?

Warudo added a comment.Edited · Apr 13 2024, 4:13 PM2024-04-13 16:13:33 (UTC+0)
Comment Actions
In T362467#9711511, @Xaosflux wrote:

There is no actual section on the page called "top" - and no one else would be able to follow it using that link. However, this all seems to be something that your gadget is handling, not part of mobile. Have you checked with the gadget maintainers?

There is no section named "top" but there is an anchor named top. You can verify this yourself here (EDIT: This revision might make it more obvious) by clicking the link in section "Test2". Note that I tested it while logged out too. The anchor at #top always exists. It's not the gadget that adds it.

Nardog subscribed.Apr 13 2024, 4:15 PM2024-04-13 16:15:30 (UTC+0)
This comment was removed by Nardog.
Warudo added a comment.Apr 13 2024, 4:46 PM2024-04-13 16:46:35 (UTC+0)
Comment Actions

However, this all seems to be something that your gadget is handling, not part of mobile.

If by any chance you're referring to having a button for editing the lead section, then no. That is a feature of mobile (mobile web at least). The gadget only adds that feature to desktop.

Xaosflux added a comment.Edited · Apr 13 2024, 4:47 PM2024-04-13 16:47:22 (UTC+0)
Comment Actions

Ah yes there is that anchor link.

Here's what my testing has found - have you seen otherwise?

In desktop, with that gadget - the script is inserting a special link to the page, with that edit summary built in e.g. "https://en.wikipedia.org/w/index.php?title=Todd_Van_Poppel&action=edit&section=0&summary=/*%20top%20*/%20"

In MOBILE that gadget is not creating that link. Are you seeing that link, but it doesn't work? This seems to be that the gadget didn't rewrite that section of the page, like you expected.

Mobile comes with a built-in, "edit lead" button - that has nothing to do with that gadget.

So some options:

a) You could take this up with your project gadget maintainers
b) This could be changed to a feature request, that you would like the mobile web to inject a special edit summary when using that top edit button.

If we're missing something, please elabortate

Warudo added a comment.Apr 13 2024, 5:00 PM2024-04-13 17:00:44 (UTC+0)
Comment Actions

Yes, I think that's mostly right. The gadget is completely irrelevant to this issue as it's not what's creating the edit button on mobile (afaict it has no effect on the mobile layout AT ALL). I only brought it up as an example of the correct behavior. Note that what you're describing also happens on desktop when you click on any other edit section link. The gadget is only emulating desktop's normal behavior.

Mobile at the moment acts like this. If you click the button to edit any section (other than the lead), the edit summary appears blank in the preview, but when you save, you see that a section link has been added to the beginning of your edit summary (compare that with desktop where you can see the "/* section name */" while saving your edit).
However, this is not done when you use the button to edit the lead section for some reason. This is what I hope is corrected.

PrimeHunter subscribed.Apr 13 2024, 5:01 PM2024-04-13 17:01:23 (UTC+0)
Comment Actions

The original post refers to an enwiki gadget "Add an [edit] link for the lead section of a page" at https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-gadgets.

The gadget makes an edit link like https://en.wikipedia.org/w/index.php?title=Example&action=edit&section=0&summary=/*%20top%20*/%20

summary=/*%20top%20*/ prefills the edit summary with "/* top */ " which makes a link like https://en.wikipedia.org/wiki/Example#top to an anchor called "top". This anchor is near the top of the page in Vector Legacy but is not present in Vector 2022.
Compare https://en.wikipedia.org/wiki/Example?useskin=vector#top
and https://en.wikipedia.org/wiki/Example?useskin=vector-2022#top

The mobile version already has an edit link for the lead section so the enwiki gadget doesn't do anything there. I don't think mobile should add a link to an English anchor which isn't even in the current default skin. If the poster wants the enwiki gadget to add such an anchor for mobile by modifying the already present lead section edit link in mobile then it can be suggested at https://en.wikipedia.org/wiki/MediaWiki_talk:Gadget-edittop.js.

Warudo added a comment.Edited · Apr 13 2024, 5:10 PM2024-04-13 17:10:00 (UTC+0)
Comment Actions

Isn't even in the current default skin

This is false, I tested Vector2022 while logged out and the anchor is there. (EDIT: To add to this, I tested the example you provided as well and it scrolled up, so your own example debunks what you said)

English anchor

The anchor is in English, but that shouldn't be a problem aince the anchor exists on non English wikipedias too. If you think editors will be puzzled by it I don't agree with that either because the gadget is also available on non English wikipedias. E.g. I know for a fact that the Greek Wikipedia has the gadget and that using it there adds "/* top */" to your edit summary. If it were such a confusing name, don't you think those editors would have either removed the gadget from their WP, or asked for internationalized versions of the anchor?

Nardog added a comment.Edited · Apr 13 2024, 5:10 PM2024-04-13 17:10:54 (UTC+0)
Comment Actions

summary=/*%20top%20*/ prefills the edit summary with "/* top */ " which makes a link like https://en.wikipedia.org/wiki/Example#top to an anchor called "top". This anchor is near the top of the page in Vector Legacy but is not present in Vector 2022.
Compare https://en.wikipedia.org/wiki/Example?useskin=vector#top
and https://en.wikipedia.org/wiki/Example?useskin=vector-2022#top

But a link to #top scrolls to the top of the page, even if there's no element with the anchor/ID top, which AFAIU is a legacy/non-standardized browser feature. The default signature links to #top when inserted on your own user talk page (presumably to avoid the selflink bolding).

PrimeHunter added a comment.Apr 13 2024, 5:34 PM2024-04-13 17:34:16 (UTC+0)
Comment Actions

https://en.wikipedia.org/wiki/Example?useskin=vector#top goes to NEAR the top of the page, between the tabs and heading since the html says <a id="top"></a> there.

https://en.wikipedia.org/wiki/Example?useskin=vector-2022#top goes to the absolute top of the page since there is no such anchor on the page. The html does not say id="top" anywhere so #top is ignored.

You reported this as a mobile issue at Phabricator. This indicates you want the mobile version of all MediaWiki installations in all languages to make a link ending with #top when the lead section is edited. I strongly oppose that. The link goes to a non-existent anchor in the default skin and I cannot imagine wikis in non-Latin scripts would want such a link which does nothing. If your concern is only with the behaviour of the enwiki gadget then the discussion belongs at https://en.wikipedia.org/wiki/MediaWiki_talk:Gadget-edittop.js and not here. Specific gadgets are not part of MediaWiki which only provides the ability to make gadgets.

Nardog added a comment.Apr 13 2024, 5:44 PM2024-04-13 17:44:18 (UTC+0)
Comment Actions

https://en.wikipedia.org/wiki/Example?useskin=vector-2022#top goes to the absolute top of the page since there is no such anchor on the page. The html does not say id="top" anywhere so #top is ignored.

It's not ignored. If you focus the address bar and press Enter/Return it scrolls to the top of the page. That doesn't happen with #foo or whatever.

Warudo added a comment.Apr 13 2024, 5:46 PM2024-04-13 17:46:13 (UTC+0)
Comment Actions

The html does not say id="top" anywhere so #top is ignored.

That's not how that works. If #top were ignored, it wouldn't scroll up when clicking on it. Try it on my sandbox. #top and #Top scroll up, #asd goes nowhere because it doesn't exist. This is how it works on every skin. Mobile, Vector legacy and Vector2022 all act the same exact way.

I cannot imagine wikis in non-Latin scripts would want such a link which does nothing.

Have you been reading what I'm saying? The Greek WP (non-latin in case you didn't know) already has the gadget and therefore already has links to #top in its edit summaries. If those editors didn't want that, they'd have disabled the gadget.

Nardog added a comment.Apr 13 2024, 5:58 PM2024-04-13 17:58:23 (UTC+0)
Comment Actions

FWIW AWB also adds /* top */ if only the lead section was modified.

PrimeHunter added a comment.Apr 13 2024, 6:44 PM2024-04-13 18:44:00 (UTC+0)
Comment Actions

An anchor is certain code in the html. There is no anchor saying "top" in Vector 2022. However, I didn't know the HTML specification https://html.spec.whatwg.org/multipage/browsing-the-web.html#scrolling-to-a-fragment:top-of-the-document-2 says:
"10. If decodedFragment is an ASCII case-insensitive match for the string top, then return the top of the document."

So #top does do something different if it's clicked on the page itself: Go to the top instead of staying. If it's clicked from another page, as it usually would be in an edit summary, then it does the same as if there was no anchor: Go to the top of the linked page.

The Greek and Latin alphabet are similar. Here are three lowercase letters of the Greek alphabet: τορ. Uppercase version: ΤΟΡ. I can understand the Greek gadget hasn't removed "top". Even if it may not mean the same in Greek, it's clearly letters to them, and English is taught in Greek schools so I assume most Greeks (maybe not old Greeks) know the English word "top". Most non-Latin scripts are completely different and I imagine "top" in edit summaries would look weird in a lot of wikis.

Warudo added a comment.Apr 13 2024, 6:49 PM2024-04-13 18:49:40 (UTC+0)
Comment Actions

"Τορ" would be pronounced "Tor" in Greek. Just because the letters look similar does not mean they perform the same function. In any case that's irrelevant. I used Greek as an example because it's my native language. The Chinese WP also has the Gadget and no such argument can be made for their writing system. If you're still concerned, how about you ask those editors themselves. I think that their inclusion of the gadget in their WPs shows that your concerns are overblown.

Warudo added a comment.Apr 13 2024, 7:15 PM2024-04-13 19:15:11 (UTC+0)
Comment Actions

I checked a few more. The Japanese, Korean and Farsi WPs all have the gadget too. I stopped checking after that.

Xaosflux unsubscribed.Apr 13 2024, 8:45 PM2024-04-13 20:45:50 (UTC+0)
jeremyb-phone subscribed.Apr 14 2024, 5:10 PM2024-04-14 17:10:37 (UTC+0)
Pppery added projects: MobileFrontend, MediaWiki-Page-editing.Apr 17 2024, 12:09 AM2024-04-17 00:09:01 (UTC+0)
Warudo added a project: Desktop.Apr 22 2024, 1:31 PM2024-04-22 13:31:46 (UTC+0)
Comment Actions

This also applies to desktop since someone might change the URL by hand to point to the lead as suggested in an English WP help page.

Jdlrobson moved this task from Untriaged to Team:Editing on the MobileFrontend board.Jan 2 2025, 9:48 PM2025-01-02 21:48:16 (UTC+0)
Warudo added a comment.Jun 14 2025, 10:40 AM2025-06-14 10:40:02 (UTC+0)
Comment Actions

Apparently this has been added to the Android app since the last time I checked here. However, the implementation appears to be buggy since the link to top is added to the edit summary even if other parts of the article have been edited. For example https://en.wikipedia.org/wiki/Special:Diff/1295508800 is an edit in the Excitebike article that has top in the summary even though both the lead and the "Gameplay" section were edited.

Nardog added a comment.Jun 14 2025, 1:00 PM2025-06-14 13:00:33 (UTC+0)
Comment Actions

The Android app has been adding top for quite some time, see T280308. That seems like a bug that needs to be opened for Wikipedia-Android-App in and of itself.

Jdlrobson-WMF edited projects, added: MobileFrontend (MobileFrontend (Editor)); removed: MobileFrontend.Sep 10 2025, 10:29 PM2025-09-10 22:29:55 (UTC+0)
Jdlrobson-WMF moved this task from Backlog to Triaged on the MobileFrontend (MobileFrontend (Editor)) board.Oct 9 2025, 4:39 PM2025-10-09 16:39:59 (UTC+0)
Jdlrobson-WMF moved this task from Needs triage to MobileFrontend specific on the Mobile board.Oct 9 2025, 8:15 PM2025-10-09 20:15:58 (UTC+0)
matmarex merged a task: T20004: Add a default edit summary for section 0.Mar 30 2026, 11:08 AM2026-03-30 11:08:35 (UTC+0)
matmarex added subscribers: • bzimport, Xaosflux, Perhelion and 3 others.
matmarex subscribed.
Comment Actions

(I merged the older task into this one, since this one has more discussion.)

matmarex added a parent task: T2156: Allow editing the lead section of a page.Mar 30 2026, 11:09 AM2026-03-30 11:09:39 (UTC+0)
matmarex added a comment.Mar 30 2026, 11:15 AM2026-03-30 11:15:24 (UTC+0)
Comment Actions

Regarding the concerns about the "top" anchor name being English/Latin text, and links to #top behaving differently based on the skin: in T412472 I added the ability to use the empty anchor in the edit summary instead – that is, /* */ – which now links to #, and avoids language-specific text and behaves consistently everywhere (linking to the top of the page).

gerritbot added a comment.Mar 30 2026, 11:30 AM2026-03-30 11:30:01 (UTC+0)
Comment Actions

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

[mediawiki/core@master] Prefill edit summary for section=0 with "/* */ " if not specified

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

gerritbot added a project: Patch-For-Review.Mar 30 2026, 11:30 AM2026-03-30 11:30:02 (UTC+0)
gerritbot added a comment.Mar 30 2026, 11:34 AM2026-03-30 11:34:28 (UTC+0)
Comment Actions

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

[mediawiki/extensions/VisualEditor@master] Prefill edit summary for section=0 with "/* */ " if not specified

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

gerritbot added a comment.Mar 30 2026, 11:48 AM2026-03-30 11:48:37 (UTC+0)
Comment Actions

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

[mediawiki/extensions/DiscussionTools@master] Prefill edit summary for section=0 with "/* */ " if not specified

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

gerritbot added a comment.Mar 30 2026, 12:04 PM2026-03-30 12:04:00 (UTC+0)
Comment Actions

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

[mediawiki/extensions/MobileFrontend@master] Prefill edit summary for section=0 with "/* */ "

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

gerritbot added a comment.Apr 14 2026, 7:40 AM2026-04-14 07:40:18 (UTC+0)
Comment Actions

Change #1264584 merged by jenkins-bot:

[mediawiki/core@master] Prefill edit summary for section=0 with "/* */ " if not specified

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

ReleaseTaggerBot added a project: MW-1.46-notes (1.46.0-wmf.26; 2026-04-28).Apr 14 2026, 8:00 AM2026-04-14 08:00:55 (UTC+0)
gerritbot added a comment.Apr 14 2026, 8:10 AM2026-04-14 08:10:33 (UTC+0)
Comment Actions

Change #1264591 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Prefill edit summary for section=0 with "/* */ "

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

gerritbot added a comment.Apr 14 2026, 2:16 PM2026-04-14 14:16:30 (UTC+0)
Comment Actions

Change #1264588 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Prefill edit summary for section=0 with "/* */ " if not specified

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

gerritbot added a comment.Apr 14 2026, 7:27 PM2026-04-14 19:27:14 (UTC+0)
Comment Actions

Change #1264585 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Prefill edit summary for section=0 with "/* */ " if not specified

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

Maintenance_bot removed a project: Patch-For-Review.Apr 14 2026, 7:30 PM2026-04-14 19:30:50 (UTC+0)
matmarex closed this task as Resolved.Apr 20 2026, 5:23 PM2026-04-20 17:23:58 (UTC+0)
matmarex claimed this task.
matmarex reopened this task as Open.May 6 2026, 12:08 AM2026-05-06 00:08:00 (UTC+0)
Comment Actions

I noticed that the prefilling does not work on the mobile visual editor (although it works on mobile wikitext, and desktop visual modes). https://en.wikipedia.beta.wmcloud.org/w/index.php?title=T362467_test&action=history

The next patch fixes that issue. I hope it's the last one.

gerritbot added a comment.May 6 2026, 12:08 AM2026-05-06 00:08:40 (UTC+0)
Comment Actions

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

[mediawiki/extensions/VisualEditor@master] Respect initial edit summary on mobile

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

gerritbot added a project: Patch-For-Review.May 6 2026, 12:08 AM2026-05-06 00:08:42 (UTC+0)
gerritbot added a comment.May 13 2026, 12:32 AM2026-05-13 00:32:57 (UTC+0)
Comment Actions

Change #1283116 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Respect initial edit summary on mobile

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

ReleaseTaggerBot added a project: MW-1.47-notes (1.47.0-wmf.3; 2026-05-19).May 13 2026, 1:00 AM2026-05-13 01:00:10 (UTC+0)
matmarex closed this task as Resolved.May 13 2026, 1:17 AM2026-05-13 01:17:29 (UTC+0)
Maintenance_bot removed a project: Patch-For-Review.May 13 2026, 1:31 AM2026-05-13 01:31:07 (UTC+0)
zdev updated the task description. (Show Details)Sep 4 2026, 3:32 PM2026-09-04 15:32:36 (UTC+0)
Log In to Comment
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.