Last modified: 2011-03-10 00:40:19 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29669, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27669 - remove subtitle divs from editing interface
remove subtitle divs from editing interface
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-23 23:07 UTC by Ryan Kaldari
Modified: 2011-03-10 00:40 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch to show subtitle div only on article pages (579 bytes, patch)
2011-03-08 02:02 UTC, Ryan Kaldari
Details

Description Ryan Kaldari 2011-02-23 23:07:49 UTC
The siteSub and contentSub divs serve no purpose on the editing pages and just add lots of extra space above the editing box. I've proposed overriding the CSS for them on the English Wikipedia, but the real solution would be to remove them at the code level.
Comment 1 Ryan Kaldari 2011-03-08 00:45:47 UTC
I tried overriding the edit page CSS on MediaWiki:Common.js/edit.js:
mw.util.addCSS( '#siteSub, #contentSub { display:none; }' );

Unfortunately this causes the divs to disappear after they have been displayed, causing an annoying page jump, so I reverted the change.
Comment 2 Ryan Kaldari 2011-03-08 01:09:55 UTC
Actually, leaving contentSub might be OK since it adds a little bit of padding between the header and WikiEditor, but having the site subtitle there doesn't make sense and is just a waste of screen real estate. The site subtitle is purely for the benefit of readers, and doesn't make sense in the context of the edit page. The header on the edit page isn't even a title, it's a description of what you're doing.
Comment 3 Ryan Kaldari 2011-03-08 02:02:10 UTC
Created attachment 8260 [details]
Patch to show subtitle div only on article pages
Comment 4 Ryan Kaldari 2011-03-08 02:04:06 UTC
I've attached a patch which causes MediaWiki to only show the subtitle div on 'article' pages. MediaWiki's definition of an article also includes user pages, talk pages, main page, MediaWiki pages, etc. Basically everything except Special pages and edit pages.
Comment 5 Ryan Kaldari 2011-03-08 02:10:32 UTC
Interestingly, it looks like most wikis don't even use the subtitle functionality, so this would mainly just affect the English Wikipedia.
Comment 6 Krinkle 2011-03-08 09:21:53 UTC
(In reply to comment #1)

> I tried overriding the edit page CSS on MediaWiki:Common.js/edit.js:
> mw.util.addCSS( '#siteSub, #contentSub { display:none; }' );
> 
> Unfortunately this causes the divs to disappear after they have been displayed,
> causing an annoying page jump, so I reverted the change.

CSS shouldn't be added with JavaScript, that will always make a delay. It should be done in CSS. 

Although I get that edit pages cannot be identified (yet) from a CSS selector in-core, the best solution imho is to add a class to <html> at the top of MediaWiki:Common.js (not in a domready wrap):

if ( $.inArray(wgAction,['edit','submit']) != -1 ) { document.getElementsByTagName('html')[0].className += ' action-edit'; }

And in MediaWiki:Common.css:

.action-edit  #siteSub, .action-edit  #contentSub { display: none; }

That will make it slighty faster than adding a <style>-element to the <head> in a script that is loaded after later ( MediaWiki:Common.js/edit  )

See also bug 4438, which requests to add this in-core with no dependancy on client-side scripting.



(In reply to comment #5)
> Interestingly, it looks like most wikis don't even use the subtitle
> functionality, so this would mainly just affect the English Wikipedia.

What about non-WMF wikis ?
Comment 7 Niklas Laxström 2011-03-08 09:29:37 UTC
As far as I know the site subtitle is hidden by default in MediaWiki.
Comment 8 Ryan Kaldari 2011-03-09 03:10:37 UTC
@Krinkle: I think your suggestion matches my original intentions perfectly. However, after talking about the issue with Trevor, I've changed my thinking on it, and I think implementing the attached patch would be better. Specifically, I think we should leave contentSub as it is and remove siteSub on all non-article pages. The main idea behind the site subtitle is to provide a sort of site branding for articles (especially when mirrored, e.g. http://www.enotes.com/topic/Algebra), which isn't necessary on utility-type pages (and in most cases seems a bit silly). If someone is editing a page or using a Special Page, they probably know what Wikipedia is. I looked through some non-WMF wikis today to see how other sites use the feature, but I wasn't able to find any actually using it.
Comment 9 Krinkle 2011-03-09 22:56:43 UTC
(In reply to comment #7)
> As far as I know the site subtitle is hidden by default in MediaWiki.

Indeed. It's been display:none in Monobook atleast since 2004 and in Vector from the beginning.

@Kaldari: Sounds good to me. Just wanted to make sure, but haven't found any uses of it myself on other wikis either.
Comment 10 Ryan Kaldari 2011-03-10 00:40:19 UTC
Committed patch in r83620.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links