Background
I don't know whether this is new.
In desktop you can click edit at a section transcluded from another page. You will then edit the right section on the other page. This doesn't happen in mobile. It was reported at https://en.wikipedia.org/wiki/Talk:Main_Page#Cannot_edit_ITN_from_mobile?
Example:
https://en.wikipedia.org/wiki/Talk:Main_Page#Main_Page_error_reports transcludes https://en.wikipedia.org/wiki/Wikipedia:Main_Page/Errors which has the section "Errors in In the news". In desktop the section edit link at https://en.wikipedia.org/wiki/Talk:Main_Page#Errors_in_In_the_news correctly goes to https://en.wikipedia.org/w/index.php?title=Wikipedia:Main_Page/Errors&action=edit§ion=T-4 which edits the section.
But in mobile at https://en.m.wikipedia.org/wiki/Talk:Main_Page the link goes to https://en.m.wikipedia.org/w/index.php?title=Talk:Main_Page&action=edit§ion=T-4 or https://en.m.wikipedia.org/wiki/Talk:Main_Page#/editor/T-4 and does nothing.
On the transcluded page https://en.m.wikipedia.org/wiki/Wikipedia:Main_Page/Errors the link correctly goes to https://en.m.wikipedia.org/w/index.php?title=Wikipedia:Main_Page/Errors&action=edit§ion=4 or https://en.m.wikipedia.org/wiki/Wikipedia:Main_Page/Errors#/editor/4 and works.
Tested in Firefox on a Windows computer and on an iPad with iOS.
acceptance criteria
- When visiting https://en.m.wikipedia.beta.wmflabs.org/wiki/Transcluded_page clicking "Yo from Transcluded page" edit icon takes the user is able to edit section 1 of "Wikipedia:Transcluded_page"
- When visiting https://en.m.wikipedia.beta.wmflabs.org/wiki/Transcluded_page clicking edit icon in page actions opens #/editor/0 (or #/editor/1 equivalent)
Developer notes
I learned something new today.
- Create a page Wikipedia:Transcluded_page
- On a page https://en.wikipedia.beta.wmflabs.org/wiki/Transcluded_page make sure the content is as follows:
{{Wikipedia:Transcluded_page}}
- Navigate to https://en.wikipedia.beta.wmflabs.org/wiki/Transcluded_page and click edit source and you will be redirected to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Wikipedia:Transcluded_page§ion=T-1&veaction=editsource
- However, navigate to https://en.wikipedia.beta.wmflabs.org/wiki/Transcluded_page and click edit on mobile and it will attempt to edit the existing page in the editor.
We'll need to update Skin::doEditSectionLink to use the $title passed as a parameter to the method rather than using "$this->getTitle()"
The JavaScript will also need to deal with this case. To keep things simple, we could not load the JavaScript editor and instead redirect to the page, however it would be useful to allow editing of that page with out leaving! We should discuss the trade offs in an estimation.