VisualEditor: For article namespace, disable Heading-1s (<h1>), others?
Closed, ResolvedPublic

Description

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.

Version: unspecified
Severity: enhancement

bzimport set Reference to bz43334.
Jdforrester-WMF created this task.Via LegacyDec 21 2012, 10:33 PM
Jdforrester-WMF added a comment.Via ConduitFeb 9 2013, 2:27 AM
  • Bug 44780 has been marked as a duplicate of this bug. ***
Jdforrester-WMF added a comment.Via ConduitFeb 9 2013, 2:28 AM

May want to cover content namespaces in general (but provide some way of getting them). Also to consider preventing H6s (and H5s?).

bzimport added a comment.Via ConduitApr 15 2013, 6:13 AM

rogerchrisman wrote:

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.

bzimport added a comment.Via ConduitApr 15 2013, 6:16 AM

rogerchrisman wrote:

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.

Jdforrester-WMF added a comment.Via ConduitApr 16 2013, 11:12 PM

(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.

bzimport added a comment.Via ConduitApr 17 2013, 4:49 AM

rogerchrisman wrote:

(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.

Jdforrester-WMF added a comment.Via ConduitMay 30 2013, 3:19 PM
  • Bug 48955 has been marked as a duplicate of this bug. ***
TheDJ added a comment.Via ConduitMay 31 2013, 11:35 AM

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.

Martijn_Hoekstra added a comment.Via ConduitMay 31 2013, 12:52 PM

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.

bzimport added a comment.Via ConduitJun 13 2013, 9:53 PM

ypnypn9 wrote:

(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".

Jdforrester-WMF added a comment.Via ConduitJun 13 2013, 9:55 PM

(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.

brion added a comment.Via ConduitJun 18 2013, 11:31 PM

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.

Jdforrester-WMF added a comment.Via ConduitJun 18 2013, 11:36 PM

(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'?)

Jdforrester-WMF added a comment.Via ConduitJun 18 2013, 11:42 PM

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".

Martijn_Hoekstra added a comment.Via ConduitJun 19 2013, 6:18 AM

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.

NicoV added a comment.Via ConduitJun 20 2013, 1:49 PM

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 ?

gerritbot added a comment.Via ConduitJun 20 2013, 9:59 PM

Related URL: https://gerrit.wikimedia.org/r/69801 (Gerrit Change I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9)

gerritbot added a comment.Via ConduitJun 20 2013, 9:59 PM

Related URL: https://gerrit.wikimedia.org/r/69801 (Gerrit Change I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9)

Jdforrester-WMF added a comment.Via ConduitJun 26 2013, 7:25 PM

This is now merged and will go out later today.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.