Page MenuHomePhabricator

Unblock editors by allowing them to disable the "Welcome, Username!" message at the top of the mobile main page
Open, MediumPublic

Description

I would like to ask for changes to the default page-heading on the main page for mobile devices (Minerva skin). Right now, when logged-in, users will see a "Welcome, USERNAME!" at the top of the page, basically imitating the usual page title (while the actual page title "Main page" needs to be hidden via CSS). It is unclear why we need this at all, but if we do, it should at least be configurable locally, otherwise it might clash with the overall main page styling.

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald TranscriptJun 17 2020, 2:29 PM

https://ru.m.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0

Russian hide this too suggesting it's probably not a useful default. I would support at least a config flag allowing this behavior to be turned off.

The line of code is:
https://gerrit.wikimedia.org/g/mediawiki/skins/MinervaNeue/+/f88be3b2c7bf0cfc270401ce997180405be25bb8/includes/Skins/SkinMinerva.php#560

Possibly, this could be as simple as checking if the message is enabled/disabled?

Jdlrobson added a comment.EditedJun 21 2020, 5:07 PM

@XanonymusX actually.. I'm pretty sure blanking the message https://de.m.wikipedia.org/wiki/MediaWiki:Mobile-frontend-logged-in-homepage-notification does the job. Do you want to try?
cc @stjn who I suspect is also interested in this.

Jdlrobson added a subscriber: stjn.Jun 21 2020, 5:08 PM

Gonna try it on Beta, thanks! I guess it could also be formatted differently this way?

Jdlrobson added a comment.EditedJun 21 2020, 7:19 PM

Gonna try it on Beta, thanks! I guess it could also be formatted differently this way?

I think doing this will remove the message text, however we'll need an update in Minerva to check if the message is empty to avoid the margin bottom:

.page-heading {
    margin-bottom: 12px;

I've added patch-welcome if anybody is able to write a patch I will happily merge.

The line of code is:
https://gerrit.wikimedia.org/g/mediawiki/skins/MinervaNeue/+/f88be3b2c7bf0cfc270401ce997180405be25bb8/includes/Skins/SkinMinerva.php#560

Jdlrobson renamed this task from Change Minerva page-heading on main page to Unblock editors by allowing them to disable the "Welcome, Username!" message at the top of the mobile main page.Jun 22 2020, 10:07 PM
Jdlrobson assigned this task to ovasileva.
Jdlrobson added a project: Readers-Web-Backlog.
Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
ovasileva triaged this task as Medium priority.Jun 23 2020, 7:34 AM

Change 607254 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/skins/MinervaNeue@master] Allow projects to disable Mobile welcome message

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

stjn added a comment.Jun 23 2020, 3:13 PM

FYI, currently we’ve done it via MediaWiki:Group-user.css.

Change 607254 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Allow projects to disable Mobile welcome message

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

Thanks for the patch @Ammarpad - this should be ready to test on https://de.m.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Hauptseite soon. Let me know @XanonymusX if that resolves your problem!

@PerfektesChaos: FYI. Thanks for the quick solution, the new main page is coming soon, so this will definitely be taken into consideration for the mobile layout!

https://de.m.wikipedia.beta.wmflabs.org/wiki/Wikipedia:Hauptseite

Before:


After blanking message:

Unfortunately there is small margin at the top of the page due to the empty pre-content element that needs to be fixed stil..

Yep, however it looks like the message needs to be blanked for every language separately! Is that what is expected? Right now we have done it for de, en and it, but we cannot do that for any language a user might have set in their preferences.

If you want to block it on all languages you'd need to use the WikimediaMessages extension.

The new dewiki main page is now live (https://de.m.wikipedia.org/wiki/Wikipedia:Hauptseite). If I’m not mistaken, there is still a larger margin on top, shouldn’t it be gone by now?

It hasn't been fixed yet. Thanks for flagging. That's a bug on our end. An empty h1 is also being outputted :-/