Last modified: 2014-04-07 17:27:36 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 T40487, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38487 - Remove button for <big> from toolbar
Remove button for <big> from toolbar
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
unspecified
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.w3.org/TR/2012/WD-html5-di...
: javascript
: 24488 (view as bug list)
Depends on:
Blocks: html
  Show dependency treegraph
 
Reported: 2012-07-19 09:02 UTC by Michael M.
Modified: 2014-04-07 17:27 UTC (History)
11 users (show)

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


Attachments

Description Michael M. 2012-07-19 09:02:45 UTC
In HTML5 <big> is deprecated, so I do not see any reason to have a button for it in the toolbar. The probably only reason why it is there is consistency with <small>, but since HTML5 isn't consistent in that point the toolbar needn't to be either.
Comment 2 Helder 2013-02-28 15:08:03 UTC
Instead of removing the button, its code could be changed to this:
------------------------------------------------------------------
'big': {
	'labelMsg': 'wikieditor-toolbar-tool-big',
	'type': 'button',
	'icon': 'format-big.png',
	'offset': [2, 2],
	'action': {
		'type': 'encapsulate',
		'options': {
			'pre': "<span style=\"font-size: larger;\">",
			'periMsg': 'wikieditor-toolbar-tool-big-example',
			'post': "</span>"
		}
	}
},
------------------------------------------------------------------

A gadget could try to do this until the bug is fixed, but
------------------------------------------------------------------
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
	'section': 'advanced',
	'group': 'size',
	'tool': 'big'
} ).wikiEditor( 'addToToolbar', {
	'section': 'advanced',
	'group': 'size',
	'tools': {
		'big': {
			'labelMsg': 'wikieditor-toolbar-tool-big',
			'type': 'button',
			'icon': 'format-big.png',
			'offset': [2, 2],
			'action': {
				'type': 'encapsulate',
				'options': {
					'pre': "<span style=\"font-size: larger;\">",
					'periMsg': 'wikieditor-toolbar-tool-big-example',
					'post': "</span>"
				}
			}
		}
        }
} );
------------------------------------------------------------------
would put the button in the wrong position...
Comment 3 Helder 2013-02-28 18:49:27 UTC
(In reply to comment #2)
> A gadget could try to do this until the bug is fixed
Here is another way:
------------------------------------------------------------------
// Workaround for [[bugzilla:38487]]
function fixBigButton(){
  $( '.tool-button[rel=big]' )
    .off( 'click' )
    .on( 'click', function( e ){
      e.preventDefault();
      $( '#wpTextbox1' ).textSelection(
        'encapsulateSelection', {
          'pre': '<span style="font-size: larger;">',
          'peri': mw.msg( 'wikieditor-toolbar-tool-big-example' ),
          'post': '</span>'
        }
      );
    } );
}

if ( $.inArray( mw.config.get( 'wgAction' ), ['edit', 'submit'] ) !== -1 ) {
  mw.loader.using( 'user.options', function () {
    if ( mw.user.options.get('usebetatoolbar') ) {
      mw.loader.using( [ 'jquery.textSelection', 'ext.wikiEditor.toolbar' ], function () {
        $( fixBigButton );
      } );
    }
  } );
}
------------------------------------------------------------------
Comment 4 Rahul Maliakkal 2013-03-10 07:18:48 UTC
Gerrit change #53010
Comment 5 Niklas Laxström 2013-03-10 09:20:15 UTC
Wikitext is not HTML. I'm not sure people actually want uglier wikitext.
Comment 6 Nemo 2013-03-10 09:26:16 UTC
(In reply to comment #5)
> Wikitext is not HTML. I'm not sure people actually want uglier wikitext.

Indeed, this should probably be rejected: I suggest WONTFIX. (Sorry Rahul for the unclear status of this bug.)

For instance, I know some Wikimedia wikis where attempts at replacing simple markup with "more correct" HTML by bot were soundly and consistently rejected and forbidden. Wikis which want uglier wikitext can use Helder's solutions above, or bots.
Comment 7 Rahul Maliakkal 2013-03-10 09:42:30 UTC
(In reply to comment #6)

Its okay,i am happy to contribute in any form!
Comment 8 Michael M. 2013-03-11 08:56:07 UTC
(In reply to comment #5)
> [...] I'm not sure people actually want uglier wikitext.

My suggestion was to remove <big> completely, not to replace it with (I agree with you) ugly HTML. I can only see to reasons to user bigger font size than usual:
* headlines, these should use == ... ==, not <big>
* texts in other scripts that are hard to read in normal font size (like Arabic), these should have a lang="..." attribute, handle bidi correctly, etc. Adding some CSS to make them a bit bigger doesn't make things worse (it's inside a template in most cases anyway)

This seems to be not only my opinion: en.wikipedia adds a button for <small> to the old toolbar, but not one for <big> [1], the same is true for a gadget on de.wikipedia [2]

[1] [[MediaWiki:Common.js/edit.js]]
[2] [[de:Wikipedia:Helferlein/Extra-Editbuttons]]
Comment 9 Siebrand Mazeland 2013-03-11 18:19:34 UTC
Gerrit change #53010
Comment 10 Gerrit Notification Bot 2014-02-20 14:59:22 UTC
Change 53010 abandoned by Bartosz Dziewoński:
(Bug 38487) Replaced the <big> with <span> in  jquery.wikiEditor.toolbar.config.js

Reason:
Per consensus on the bug.

https://gerrit.wikimedia.org/r/53010
Comment 11 Derk-Jan Hartman 2014-04-07 17:27:36 UTC
*** Bug 24488 has been marked as a duplicate of this bug. ***

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


Navigation
Links