Page MenuHomePhabricator

Wikidata.org: On mobile, sections stays expanded even it's disabled in settings
Open, Needs TriagePublic

Description

When mobile "Expand all sections" setting in mobile false, sections are not collapsed

This is visible on wikidata.org where wgMFCollapseSectionsByDefault is false.

Steps to Reproduce:
  1. Go to your settings (Special:MobileOptions), and see that "Expand all sections" option appears
  2. Check that option is turned OFF by default
  3. Go to a page with sections. Example: https://m.wikidata.org/wiki/User_talk:1997kB. Observe that the sections are expanded.
Expected behavior

Both pages should have collapsed sections
OR
"Expand all sections" button in Special:MobileOptions should be turned ON by default as wgMFCollapseSectionsByDefault is false

Note: Even though one can access Special:MobileOptions, the actual option is only shown on devices detected to be mobile and also the bug can only be seen there. Sections are always expanded on desktop irrespective of this setting.

Event Timeline

1997kB created this task.Nov 26 2019, 8:34 AM
Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald TranscriptNov 26 2019, 8:34 AM
1997kB updated the task description. (Show Details)Nov 26 2019, 8:36 AM
Addshore added a subscriber: Addshore.EditedNov 26 2019, 10:00 AM

Is this relating to talk pages only?
Does this happen on any other WMF sites? Or only Wikidata?

No it happens on WD:AN and WD:RFD too.

No it doesn't happen on any other WMF sites.

Jdlrobson added a subscriber: Jdlrobson.

According to config wgMFCollapseSectionsByDefault is set to false so MobileFrontend is doing what it's supposed to do here.

Addshore added subscribers: Lydia_Pintscher, thiemowmde.

Indeed

This seems to have been done in https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/179513/

There isn't much of a [paper trail so I don't know / remember exactly why this was done.

@Lydia_Pintscher @thiemowmde any idea?

Ammarpad changed the subtype of this task from "Bug Report" to "Task".Nov 27 2019, 10:15 AM

@Ammarpad Why it's not bug report?

Indeed

This seems to have been done in https://gerrit.wikimedia.org/r/#/c/operations/mediawiki-config/+/179513/

There isn't much of a [paper trail so I don't know / remember exactly why this was done.

@Lydia_Pintscher @thiemowmde any idea?

No unfortunately I don't know either.

@Ammarpad Why it's not bug report?

Because it's not a bug, but a config problem.

@MaxSem That's your patch, isn't it? Do you remember why you commited it?

@Ammarpad Why it's not bug report?

As already well-explained above by multiple people, because this is not a bug. I wonder why you're not seeing this.

That said, this task currently as written is invalid. Unless it's converted to proper request for enabling the collapsing, (which itself will only be valid after getting community consensus or other appropriate means for making such changes to Wikidata)

1997kB added a comment.EditedNov 28 2019, 6:44 AM

@Masumrezarock100 @Ammarpad
Well I'm not seeing this wrong. If you care to go to settings in Mobile site there's a button ''Expand all sections''. And that button doesn't work as it says, so I wonder why it's not bug?

Plus even if I try to see it your way there's no community consensus too to make it that way. Even if there is that button should be hidden then, beacuse it is misleading (maybe another task needed).

So this task is clear that ''there's a button in settings, which doesn't work as it should be".

Ammarpad added a comment.EditedNov 28 2019, 7:07 AM

@Masumrezarock100 @Ammarpad
Well I'm not seeing this wrong. If you care to go to settings in Mobile site there's a button ''Expand all sections''. And that button doesn't work as it says, so I wonder why it's not bug?

I did go before commenting here. I understand what you mean, see below

Plus even if I try to see it your way there's no community consensus too to make it that way. Even if there is that button should be hidden then, beacuse it is misleading (maybe another task needed).

Not all changes on Wikimedia projects have community consensus, especially for preferences that user can disable and even more so in Wikidata project.
Plus, even if there was no consensus, the fact that this was not challenged for five years, is enough to make it a consensus itself.

So this task is clear that ''there's a button in settings, which doesn't work as it should be".

Yeah, this is what I think. A separate task for MobileFrontend: if the settings has been disabled sitewide, don't show this to end-user which gives false impression that a user can change it, when in fact no one could (like we have here).

Not all changes on Wikimedia projects have community consensus, especially for preferences that user can disable and even more so in Wikidata project.

Yeah that's what the issue is, it's not a normal feature which can be enabled/disabled, so IMO a consensus should be there.

Plus, even if there was no consensus, the fact that this was not challenged for five years, is enough to make it a consensus itself.

No I don't agree with you on this. IMO this is not challenged is because lack of use of mobile site by Wikidata users. And even if it not challenged it is really not user friendly, like if somebody go https://m.wikidata.org/wiki/Wikidata:Requests_for_deletions you can't even load that page properly with those sections expanded.

Yeah, this is what I think. A separate task for MobileFrontend: if the settings has been disabled sitewide, don't show this to end-user which gives false impression that a user can change it, when in fact no one could (like we have here).

Yeah, I originally tagged mobileFrontend but somebody removed saying mobileFrontend is doing what should be. So if you have better luck convincing them, feel free to go for another task.

According to config wgMFCollapseSectionsByDefault is set to false so MobileFrontend is doing what it's supposed to do here.

Indeed. But that option in mobile settings shouldn't appear if wgMFCollapseSectionsByDefault is set to false. It looks like a bug if we see it in that way.

Ammarpad added a comment.EditedNov 28 2019, 10:17 AM

OK.... I have looked into this further... I have partly struck my comment in T239195#5699077 as a result.

Summary.

  1. Mobile section collapsing is disabled by default on Wikidata.
wmf-config/InitialiseSettings.php
'wgMFCollapseSectionsByDefault' => [
	'default' => true,
	'wiktionary' => false,
	'wikidata' => false,
],

Why it's disabled is beyond the scope of this task.

  1. Setting "wgMFCollapseSectionsByDefault' => false;" means that, per default sections are to not be collapsed sitewide. BUT a user can still override this setting by going to the Special:MobileOptions and turning on the 'Expand all sections.'
  1. I investigated this by going to https://m.wikidata.org/w/index.php?title=Special:MobileOptions (note: the actual option can only be seen on mobile) and turning off "Expand all sections". It works correctly as expected: Sections are not expanded, EXCEPT on some few pages. These pages where this collapsing is not taking place have something in common, they have a particular template at the top from what I understand. (This is what needs further investigation)
  1. Going to the same special page as above (no. 3) and turning on "Expand all sections" works correctly as expected: Sections are all expanded.

I started rewriting the task description to make the issue clear.

But then I realized, Why should wgMFCollapseSectionsByDefault being false mean that this setting should not appear for "Expanding all sections"?

The current behaviour is:

  • wgMFCollapseSectionsByDefault is false so the sections on pages are not collapsed by default.
  • "Expanding all sections" is false, so MF does no expand any collapsed sections

"Expanding all sections" doesn't however say that when it is disabled, it will actually collapse sections, it will just do nothing, and leave the page as the default, which on wikidata, seems to be expanded.

Pinging @Jdlrobson again to see if he has any thoughts here as I kind of agree that everything is working as expected, but perhaps there is something for having a collapse by default option in the settings or something like that.

Addshore renamed this task from Wikidata: On Minerva skin section always stays expanded even it's disabled in settings to "Expanding all sections" setting and wgMFCollapseSectionsByDefault interaction is slightly unexpected..Nov 28 2019, 10:24 AM
Addshore updated the task description. (Show Details)
Addshore moved this task from needs discussion or investigation to monitoring on the Wikidata board.
Addshore moved this task from Incoming to Monitoring on the Wikidata Mobile board.

Mild comment conflict (at the same time) with @Ammarpad there, but it looks like they investigated more than I did!

Ammarpad renamed this task from "Expanding all sections" setting and wgMFCollapseSectionsByDefault interaction is slightly unexpected. to Wikidata: On mobile, some sections stays expanded even it's disabled in settings .Nov 28 2019, 10:33 AM

Thanks, Addshore. Renamed the task back, this configuration setting is working correctly, the edge case is something else.

Ammarpad updated the task description. (Show Details)Nov 28 2019, 10:49 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptNov 28 2019, 10:49 AM
Ammarpad updated the task description. (Show Details)Nov 28 2019, 10:54 AM

I have updated the task to state what's actually happening here. The templates obstructing the collapsing might be many and that is what needs further investigation. But in brief I found https://www.wikidata.org/wiki/Template:Editnotice and Template:Welcome to be the most common ones.

Now go to a page which DOES NOT have Template:Editnotice at the top but do have sections. Example https://m.wikidata.org/wiki/User_talk:Pigsonthewing. Observe that the sections are collapsed.

@Ammarpad I can't reproduce this. For me it's always expanded on all pages.

1997kB added a comment.EditedNov 28 2019, 12:09 PM

And it looks like this task is turning towards hiding that button if wgMFCollapseSectionsByDefault is false by default, which is not why I filled this report.

Even it's gonna stay false by default, that button in settings should be turned on by default as if someone wants them collapsed they can turn it off.

1997kB updated the task description. (Show Details)Dec 5 2019, 11:09 AM

I have updated the description as I have checked on multiple mobile devices and none have sections collapsed in any state (not even on pages that don't have Template:Editnotice).

Ammarpad removed a subscriber: Ammarpad.Dec 5 2019, 4:36 PM

I started rewriting the task description to make the issue clear.

But then I realized, Why should wgMFCollapseSectionsByDefault being false mean that this setting should not appear for "Expanding all sections"?

The expanding all sections setting is basically a client side JS override of wgMFCollapseSectionsByDefault. If wgMFCollapseSectionsByDefault is false, there is no need for this setting and its existence on Special:MobileOptions is confusing and should likely be removed.

Pinging @Jdlrobson again to see if he has any thoughts here as I kind of agree that everything is working as expected, but perhaps there is something for having a collapse by default option in the settings or something like that.

I'd rather not add further complications here :)

1997kB renamed this task from Wikidata: On mobile, some sections stays expanded even it's disabled in settings to Wikidata: On mobile, sections stays expanded even it's disabled in settings .Dec 12 2019, 10:37 AM

@Addshore Does this require onwiki discussion or discussion here on phab?

Aklapper renamed this task from Wikidata: On mobile, sections stays expanded even it's disabled in settings to Wikidata.org: On mobile, sections stays expanded even it's disabled in settings .Apr 23 2020, 9:50 AM

@Addshore Does this require onwiki discussion or discussion here on phab?

If the desire is to have the default behaviour changed on Wikidata then I will ping @Lea_Lacroix_WMDE and @Lydia_Pintscher here.

If the desire if to only hide the button (which from T239195#5699582 i see it is not) then reading web product should be poked. :)

Jdlrobson added a project: patch-welcome.EditedApr 25 2020, 3:48 PM

If the desire if to only hide the button (which from T239195#5699582 i see it is not) then reading web product should be poked. :)

Happy to review a patch for that

In our wikis, some users are asking about this behavior too. Their expectations are completely as same as @1997kB's comments. More specifically, they are expecting as follows while
$wgMFCollapseSectionsByDefault is disabled:

  • "Expanding all sections" button in settings should be turned on by default to expand sections by default.
  • "Expanding all sections" button SHOULD EXIST in settings, because some users want to collapse sections by default.
    • In other words, users don't hope that this button will be removed.

@Jdlrobson, @Addshore Why do you think that "Expanding all sections button" should be removed? @1997kB didn't say so in any of his/her comments. Please reread them.

@Ochaochaocha3 I am coming at this from a software engineer point of view, not a user point of view. The Wikidata.org situation where sections are expanded by default is different from all other wikis where sections are collapsed by default. Therefore the setting you are using as not been actively tested or designed with that in mind. The setting was only ever designed to expand sections by default not to do the opposite. Therefore to get it to work requires rethinking and possibly completely rewriting what is actually a very little used feature. AS maintainer I have no desire to add additional complexity to the codebase.

So as far as I'm concerned this is a product decision which is what T239195#6079940 suggests. Either Wikidata matches the configuration of other projects and collapses sections on mobile by default or I will have this option removed.

FWIW my personal preference is the former. I would like to remove the wgMFCollapseSectionsByDefault configuration option from MobileFrontend. If that happens the settings you and @1997kB are referring to will work as expected however people who like the sections expanded will now need to set the setting.