Page MenuHomePhabricator

Mobile sections on talk page display edit links even when headings are template generated, and not editable
Closed, ResolvedPublicBUG REPORT

Description

Updated after DiscussionTools mobile deployment

Steps to replicate the issue (include links if applicable):

The rationale:
This bug prevents me from using <h2> in future version of welcome template in Russian Wikipedia. I want to make it accessible to mobile users, but it seems like the mobile sections only work if you mark up the section with == … ==. That causes another issue for desktop users, since it makes the section display an [edit] link that would confuse new users because it goes to a (full-protected) template.

The ideal solution for my use case would be to show the zero section to mobile users, but I’m not sure if that is even in the plans, so at least this bug needs to be fixed so I can provide a good enough experience both on desktop and mobile. (Right now I am considering to hide the edit link with TemplateStyles, but that might possibly open its own can of worms if <templatestyles> would be before the heading.)

Event Timeline

Jdlrobson renamed this task from Mobile sections do not open if headings are marked with <h2> to Mobile sections on talk page do not open if headings are marked with <h2>.Aug 30 2022, 3:11 AM

Not a DiscussionTools bug per-se? (Unless our changes caused it, of course.) It works in DiscussionTools mode, just not in legacy talk-overlay mode.

Jdlrobson changed the task status from Open to Stalled.Sep 8 2022, 11:32 PM
Jdlrobson edited projects, added MobileFrontend (Tracking); removed MobileFrontend.
Jdlrobson subscribed.

There were various issues with certain IDs (I imagine it's the "!" character in this case). My understanding is the long-term goal/strategy around these bugs is to remove this feature altogether and replace it with discussion tools so marking as stalled for now.

I mean, if the problem is in encoding and not in <h2>, then it would’ve definitely needed to be fixed, since I imagine ! and ? characters are used quite a lot in discussions. I don’t think that’s the issue, though, since this talk page experience works fine:
https://en.m.wikipedia.org/wiki/User_talk:Craytonconstanceb

Also, despite DiscussionTools replacing talk pages in Wikipedia, there are still wikis that use MobileFrontend without them right now and that might have the same problem, so if it’s simple enough of a bug to fix, I don’t see how waiting until DT team finishes up with everything is beneficial. I’m updating Welcome template code today to make it more accommodating to mobile users, and at the moment I have to use the workaround that makes the experience for non-mobile users a bit worse so that the template would work fine for everyone.

stjn changed the task status from Stalled to Open.Jun 30 2023, 4:47 AM
stjn added a project: DiscussionTools.

Post-DiscussionTools situation: while the new talk pages are almost perfect, the emphasis is on ‘almost’:
https://ru.m.wikipedia.org/wiki/Обсуждение_участника:Babel_AutoCreate?uselang=en (see first section)

DiscussionTools should not render ‘Edit’ link where it cannot appear on desktop, it gets broken and doesn’t do anything other than closing the section. Re-opening so maybe DiscussionTools team can take a look at it and maybe-maybe fix that (will edit description).

stjn renamed this task from Mobile sections on talk page do not open if headings are marked with <h2> to Mobile sections on talk page display edit links if headings are marked with <h2>.Jun 30 2023, 4:49 AM
stjn updated the task description. (Show Details)

Interesting, it seems to happen only with MobileFrontend + Minerva, not with either of them alone:

Esanders renamed this task from Mobile sections on talk page display edit links if headings are marked with <h2> to Mobile sections on talk page display edit links even when headings are template generated, and not editable.Aug 25 2023, 3:13 PM

Change 952468 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Hide ellipsis menu when the section is uneditable

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

Change 952468 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Hide ellipsis menu when the section is uneditable

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

@Esanders, In trying to test this, the Edit button does not do anything. Nothing in the console as well.

However, the desktop does not show the [edit] link as expected

Screenshot 2023-09-13 at 16.05.16.png (574×2 px, 157 KB)

No affordance for edit is displayed

Screenshot 2023-09-19 at 17.54.08.png (536×1 px, 152 KB)
Screenshot 2023-09-19 at 17.53.40.png (322×630 px, 42 KB)