Last modified: 2013-06-26 19:25:01 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 T45334, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43334 - VisualEditor: For article namespace, disable Heading-1s (<h1>), others?
VisualEditor: For article namespace, disable Heading-1s (<h1>), others?
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: Low enhancement
: VE-deploy-2013-06-27
Assigned To: James Forrester
:
: 44780 48955 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-21 22:33 UTC by James Forrester
Modified: 2013-06-26 19:25 UTC (History)
10 users (show)

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


Attachments

Description James Forrester 2012-12-21 22:33:13 UTC
From user suggestion:

| Heading 1 is very rare on enwiki, and indeed on most other installations.
| Where it is used (mostly on project discussion pages), it does not usually
| need to be edited. VisualEditor should not offer it.
Comment 1 James Forrester 2013-02-09 02:27:22 UTC
*** Bug 44780 has been marked as a duplicate of this bug. ***
Comment 2 James Forrester 2013-02-09 02:28:44 UTC
May want to cover content namespaces in general (but provide some way of getting them). Also to consider preventing H6s (and H5s?).
Comment 3 rogerhc 2013-04-15 06:13:59 UTC
Agree--Visual Editor should not use <h1> HTML tags for headings at all because MediaWiki uses <h1> HTML for page name and headings are subordinate to page name. Heading-1 should create <h2> HTML tags, Heading-2 <h3> HTML tags, Heading-3 <h4> HTML tags, etc. Newcomers don't know this. Visual Editor should simply do this correctly without editors needing to know or think about it at all. Offering <h1> HTML in Visual Editor will cause confusion and misuse among the very people Visual Editor is designed to empower. They just wont it to work right.
Comment 4 rogerhc 2013-04-15 06:16:38 UTC
Agree--Visual Editor should not use <h1> HTML tags for headings at all because MediaWiki uses <h1> HTML for page name and headings are subordinate to page name. Heading-1 should create <h2> HTML tags, Heading-2 <h3> HTML tags, Heading-3 <h4> HTML tags, etc. Newcomers don't know this. Visual Editor should simply do this correctly without editors needing to know or think about it at all. Offering <h1> HTML in Visual Editor will cause confusion and misuse among the very people Visual Editor is designed to empower. They just want it to work right.
Comment 5 James Forrester 2013-04-16 23:12:48 UTC
(In reply to comment #4)
> Agree--Visual Editor should not use <h1> HTML tags for headings at all
> because
> MediaWiki uses <h1> HTML for page name and headings are subordinate to page
> name. Heading-1 should create <h2> HTML tags, Heading-2 <h3> HTML tags,
> Heading-3 <h4> HTML tags, etc. Newcomers don't know this. Visual Editor
> should
> simply do this correctly without editors needing to know or think about it at
> all. Offering <h1> HTML in Visual Editor will cause confusion and misuse
> among
> the very people Visual Editor is designed to empower. They just want it to
> work
> right.

Except "Heading 1" is actually create-able on any wiki page ("= Foo ="), it's just discouraged. This is a tension between what the software /lets/ users do and what they /should/ do. I'm not convince that hard and fast global rules are always appropriate.
Comment 6 rogerhc 2013-04-17 04:49:56 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Agree--Visual Editor should not use <h1> HTML tags for headings at all
> > because
> > MediaWiki uses <h1> HTML for page name and headings are subordinate to page
> > name. Heading-1 should create <h2> HTML tags, Heading-2 <h3> HTML tags,
> > Heading-3 <h4> HTML tags, etc. Newcomers don't know this. Visual Editor
> > should
> > simply do this correctly without editors needing to know or think about it at
> > all. Offering <h1> HTML in Visual Editor will cause confusion and misuse
> > among
> > the very people Visual Editor is designed to empower. They just want it to
> > work
> > right.
> 
> Except "Heading 1" is actually create-able on any wiki page ("= Foo ="), it's
> just discouraged. This is a tension between what the software /lets/ users do
> and what they /should/ do. I'm not convince that hard and fast global rules
> are
> always appropriate.

This is not about convincing anyone "that hard and fast global rules are
always appropriate." This is about getting it right for MediaWiki and MediaWiki users. Having "Heading-1" create wrong first level headings is wrong because orrect first level headings are <h2> in MediaWiki, subordinate to the page name <h1> that _is_ 'hard and fast' coded into the wiki page generator because that works well, always has, and is correct HTML. Users should not need to think about HTML at all. VisualEditor should just work right, not wrong. I know = Foo = gives <h1>Foo</h1>. That is an unfortunate wiki markup parser bug. If the VisualEditor team is too week to fix this bug by removing <h1> from the editor, they may implement "Header-0 _deprecated_" as <h1> (and link "_deprecated_" to a mediawiki.org page explaining why it is deprecated and why nevertheless included in VisualEditor). That is the obvious easy way out. However, VisualEditor has no need nor obligation to implement the deprecated and seldom used = Foo =. So remove it now and save everyone the mind drain of "Header-0 _deprecated_". VisualEditor is NOT an HTML editor. It is a MediaWiki page editor.
Comment 7 James Forrester 2013-05-30 15:19:29 UTC
*** Bug 48955 has been marked as a duplicate of this bug. ***
Comment 8 Derk-Jan Hartman 2013-05-31 11:35:41 UTC
Does this really have much to do with the VE to begin with ? It's already allowed. I agree that such is a bad thing but that's a separate story. I guess at most, we could make the H1 option 'non visisble' unless the current element already is exactly of that type.

What would be nice, was if the VE would have more 'guided' heading building. It could warn you about inconsistencies in header levels for instance.
Comment 9 Martijn Hoekstra 2013-05-31 12:52:53 UTC
It is unfortunate that wikitext currently allows h1 elements. It shouldn't. It should be the end aim for the visual editor to have feature parity with wikitext, but at the current point it makes it natural to select a heading 1 when you really never want to do that. I would prefer to see it not available in the visual editor at all, but as a compromise, I could live with renaming Header 1 to Pageheader, and move it all the way to the bottom of markup elements, and rename header 2 to header 1, etc. That way we don't lose an option in the visual editor that is available in wikitext, and at the same time reduce the chance of people thinking it is an option they may want to choose for a header, which it is not.

At the same time, we may want to think about abandoning the option to make h1 headers in wikitext too, but that makes for a different discussion which should take place in a different place than this bug.
Comment 10 ypnypn9 2013-06-13 21:53:18 UTC
(In reply to comment #9)
> It is unfortunate that wikitext currently allows h1 elements. It shouldn't.
> It should be the end aim for the visual editor to have feature parity with
> wikitext, but at the current point it makes it natural to select a heading 1
> when you really never want to do that. I would prefer to see it not available
> in the visual editor at all, but as a compromise, I could live with renaming
> Header 1 to Pageheader, and move it all the way to the bottom of markup
> elements, and rename header 2 to header 1, etc. That way we don't lose an
> option in the visual editor that is available in wikitext, and at the same
> time reduce the chance of people thinking it is an option they may want to
> choose for a header, which it is not.

Instead of messing around with the numbers and having [heading 3 = <h4>], why not rename them "Heading", "Subheading", and "Sub-subheading".
Comment 11 James Forrester 2013-06-13 21:55:24 UTC
(In reply to comment #10)
> Instead of messing around with the numbers and having [heading 3 = <h4>], why
> not rename them "Heading", "Subheading", and "Sub-subheading".

So:

| H1: Title
| H2: Heading
| H3: Sub-heading
| H4: Sub-sub-heading
| H5: Sub-sub-sub-heading
| H6: Sub-sub-sub-sub-heading

It might get a bit ridiculous, but I like the idea.
Comment 12 Brion Vibber 2013-06-18 23:31:00 UTC
Kill the H1s from the editor please. They should really be considered deprecated in the wiki syntax, and aren't something that people should be able to create by accident.
Comment 13 James Forrester 2013-06-18 23:36:15 UTC
(In reply to comment #12)
> Kill the H1s from the editor please. They should really be considered
> deprecated in the wiki syntax, and aren't something that people should be
> able to create by accident.

VE is meant to be able to edit all content that's valid. Lots of wikis (e.g. meta) use H1s quite liberally. Discouraging use is fine, but preventing use feels wrong. (Also, what the hell should VE do when it encounters an H1 in the wild, if they were 'disabled'?)
Comment 14 James Forrester 2013-06-18 23:42:51 UTC
AzaToth's suggestion is to label as follows:

| H1: Title
| H2: Heading
| H3: Sub-heading
| H4: Sub-heading
| H5: Sub-heading
| H6: Sub-heading

The differentiation between H3 - H6 would be only styling. Not sure how I feel about this, but it's certainly "correct".
Comment 15 Martijn Hoekstra 2013-06-19 06:18:09 UTC
> Lots of wikis (e.g.meta) use H1s quite liberally.

I didn't know that, and it seems bad practice. Could you point to some examples? Maybe there is a use case I'm completely overlooking.


> | H1: Title
> | H2: Heading
> | H3: Sub-heading
> | H4: Sub-heading
> | H5: Sub-heading
> | H6: Sub-heading

I'm not so happy about the name "Title", and it being at the top of that list. I would much rather see it buried somewhere at the bottom, maybe as the very last option, and something like "Duplicate page title", or at least something that makes it abundantly clear that it is not something that is meant to be used.
Comment 16 NicoV 2013-06-20 13:49:06 UTC
I believe that the current list of titles  will quickly be a problem if VE is rolled out to unexperienced users on wikipedia: they will probably use Heading 1 because they don't know it shouldn't be used in 99.9...% of edits.
When I tried to add a section, I used Heading 1 by default and only changed back to Heading 2 when I saw that the new title was bigger than what I'm used to.

If you think <h1> titles should be kept in VE, it should be separated from the other titles (after other ones). Eventually, would it be possible to make that configurable on a per wiki basis if some wiki really use <h1> as a normal title ?
Comment 17 Gerrit Notification Bot 2013-06-20 21:59:37 UTC
Related URL: https://gerrit.wikimedia.org/r/69801 (Gerrit Change I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9)
Comment 18 Gerrit Notification Bot 2013-06-20 21:59:41 UTC
Related URL: https://gerrit.wikimedia.org/r/69801 (Gerrit Change I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9)
Comment 19 James Forrester 2013-06-26 19:25:01 UTC
This is now merged and will go out later today.

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


Navigation
Links