Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block audit: Heading #8230

Closed
2 of 7 tasks
sarahmonster opened this issue Jul 26, 2018 · 3 comments
Closed
2 of 7 tasks

Block audit: Heading #8230

sarahmonster opened this issue Jul 26, 2018 · 3 comments
Assignees
Labels
[Block] Heading Affects the Headings Block [Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@sarahmonster
Copy link
Member

sarahmonster commented Jul 26, 2018

Note: We'll be doing these audits in waves and editing this as we work through the blocks, so this text will be updated and fleshed out as we progress. See the full picture here.

Overview

screenshot 2018-07-26 17 41 33

Name: Heading
Description: Insert a headline above your post or page content.
Category: Common blocks
CSS class: None on frontend, wp-block-heading in editor
Can be converted to: Quote, cover image, paragraph

States

Empty:
screenshot 2018-07-26 17 41 57
Blinking prompt

Selected:
screenshot 2018-07-26 17 42 13

Unselected:
screenshot 2018-07-26 17 42 21

Placeholder:
screenshot 2018-07-26 17 41 43

If you click through without adding any text, you'll see greyed-out text that says "Write heading...":

Primary (toolbar) settings

H2, H3, H4, bold, italic, strikethrough, link

Secondary (sidebar) settings

Heading settings: H1, H2, H3, H4, H5, H6
Text alignment: left, centre, right
Advanced: Additional CSS Class, HTML Anchor

Frontend appearance

Gutenberg starter theme:

screen shot 2018-07-31 at 1 57 18 pm

Atomic Blocks

screen shot 2018-07-31 at 1 52 43 pm

twentyseventeen:

screen shot 2018-07-31 at 2 28 39 pm

twentyten:

screen shot 2018-07-31 at 2 26 59 pm

Documentation

No devdocs in https://github.com/WordPress/gutenberg/tree/master/core-blocks/heading

Suggestion for user-facing docs:

Performance on mobile

Accessibility

Bugs/errors

Individual issues will be opened for these soon

Suggestions

Individual issues will be opened for these soon

@sarahmonster sarahmonster added [Type] Task Issues or PRs that have been broken down into an individual action to take [Feature] Blocks Overall functionality of blocks labels Jul 26, 2018
@sarahmonster sarahmonster self-assigned this Jul 26, 2018
@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Jul 27, 2018

In the paragraph block, alignments are in the primary toolbar. Here, they're in the secondary toolbar. They should be consistent (I'd go with the primary toolbar.)

I think the term everybody uses is "inspector" or "block inspector", rather than secondary toolbar.

Subheadings should remain separate from the Heading block, in my opinion. Just to be clear, a Subheading is something that should not use the <h1> to <h6> tags. They are commonly used as leads or little statements below the title of the article, though I think I have seen them used the headings of each section of an article, albeit rarely.

https://minecraft.net is the first example that comes to my mind as an example of posts using subheadings. Hover over the blog posts in the masonry layout and a subheading will appear below the title. The subheading is also shown below the title when you go to a blog post.

The HTML 5.2 specification shows some other uses of the Subheading block, including cases where you would have multiple subheadings following a single heading.

https://www.w3.org/TR/html52/common-idioms-without-dedicated-elements.html#common-idioms-without-dedicated-elements

Notably, I think the Subheading block, in the context of using it for short blurbs of text below the title (like on news sites), may not even belong in post_content, and should be placed in the same area as the title heading. Of course, Gutenberg can not yet edit that area (though it will be able to in the future).

That said, the Subheading block is still useful for situations where you have a subheading below each section heading in your post or page.

You might wonder why you could not just use a Paragraph block to accomplish the same thing. Well, you could. But the Subheading block is slightly more semantic, meaning that:

  • Themes could provide special styles to the Subheading block, including multiple styles you could switch between, without exposing them to normal Paragraph block styles and vice-versa.
  • If a <subheading> element was ever added to HTML, existing Subheading blocks could be retroactively updated to use the new element, providing increased semantics to existing websites.
  • When Gutenberg gets the ability to edit stuff outside of post_content, there will already be a Subheading block that can be used there and would presumably already have a bit more theme/plugin support than it would if it were added later.

@kjellr
Copy link
Contributor

kjellr commented Jul 30, 2018

In the paragraph block, alignments are in the primary toolbar. Here, they're in the secondary toolbar. They should be consistent (I'd go with the primary toolbar.)

Related: #3785

@sarahmonster
Copy link
Member Author

All issues here have been filed as individual issues, so I'm going to go ahead and close out this tracking bug. Feel free to comment on if I missed anything, or open new issues as needed! 💪

@sarahmonster sarahmonster added the [Block] Heading Affects the Headings Block label Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Feature] Blocks Overall functionality of blocks [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

3 participants