Page MenuHomePhabricator

Projects can customize their main page heading
Closed, DuplicatePublic

Description

Editors can now alter the title displayed on main page thanks to the changes in T255682.
Example:
https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page?safemode=1 and https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page?safemode=1&uselang=qqx

On the main page, the title corresponds with the name of the page. For example on nl.wikinews the main page is set in https://nl.wikinews.org/wiki/MediaWiki:Mainpage
as Wikinieuws:Hoofdpagina, so when you visit the main page you see this as the title of the page:

Screen Shot 2021-12-02 at 1.59.27 PM.png (342×2 px, 86 KB)

Editors can now alter the heading on these pages to any text they want to for example

Screen Shot 2021-12-02 at 2.01.34 PM.png (358×2 px, 86 KB)

OR
Screen Shot 2021-12-02 at 2.02.12 PM.png (336×2 px, 87 KB)

(excuse the pidgin)

If interested you can edit MediaWiki:Mainpage-title or MediaWiki:Mainpage-title-loggedin

For MediaWiki:Mainpage-title-loggedin you can also reference the username by using the $1 parameter to provide a user customized experience:

Screen Shot 2021-12-02 at 2.03.19 PM.png (324×2 px, 84 KB)

Currently this only impacts Vector skin, but will soon apply to mobile as well.

If your project is hiding the heading on the main page you are not impacted directly by this change.

Event Timeline

If your project is hiding the heading on the main page you are not impacted directly by this change.

I am pretty sure, based on the AC in the other task, that I can remove the last selector in this block in MediaWiki:Vector.css?

Editors can blank the associated message to remove the heading on both Vector and Minerva.
Editors can blank the associated message for logged in users to hide the logged-in user heading

/* Don't display some stuff on the main page */
.page-Main_Page #deleteconfirm,
.page-Main_Page #t-cite,
.page-Main_Page #footer-info-lastmod,
.action-view.page-Main_Page #siteSub,
.action-view.page-Main_Page #contentSub,
.action-view.page-Main_Page #contentSub2,
.action-view.page-Main_Page .firstHeading {
	display: none !important;
}

(Speaking of that block, does it make sense to file a task for any/all of these other selectors also?)

@Izno not yet, but working towards that goal. The core code supports this, but skins (Vector and Minerva) need to make some changes to support that first. Please subscribe to T265892 which is likely where we'll focus our attention next.

We should give an example (changed heading) in this task.

Re: Tech News/user-notice - What wording would you suggest as the content, and When should it be included? Thanks!

"Editors can now alter the title displayed on main page by editing the MediaWiki interface message mainpage-title. If this sounds useful to your project check out [[phab:T296969]]"

@Jdlrobson Thanks for the suggested wording!
When should it be included? If this week, I need to know within the hour. If an unknown future week, please either let me know the week before, or just move it into the User-notice column "Announce in next Tech/News" before the appropriate Friday.

I'm a bit confused by the train right now, but to avoid confusion it's probably best for this to go out /after/ the next train when everyone can actually use the new functionality.

"title displayed on main page" is ambigous - the image given is about header of a page but title also means the <title> displayed in browser.

@Jdlrobson IIUC this is ready to be placed in Tech News (in the "Recent Changes" section).
However, I'd suggest that it would be good to document this new feature onwiki somewhere, both so that we can link the Tech News item to a translatable wikipage, and so the information lives in a more searchable location. (I'm not sure where to suggest placing it, sorry!)

As this is a non-urgent announcement, I will pause on adding the item into Tech News until you have a chance to consider. (and also to answer Bugreporter's question above, which might require rewriting the draft-announcement). Thanks!