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

Title as a block #2089

Closed
wants to merge 1 commit into from
Closed

Title as a block #2089

wants to merge 1 commit into from

Conversation

ellatrix
Copy link
Member

This is more of a proof of concept at the moment. There are still some issues to be solved.

Benefits:

  • The title becomes optional and filled as you need it.
  • The title does not have to be at the top. Some people may see that as a bad thing, but I think this is actually kind of cool. People can be more creative in their layout. E.g. the can add a short intro or something before the title, or maybe a future block that contains post meta. In that way it goes more into the realm of the Customizer.
  • Permalink moves to the sidebar, as you should be able to edit it without having a title.
  • It becomes part of the table of contents. I event added the error class when other headings are added before the title.
  • We can use an editable component and surface formatting in titles. Currently you'd have to write the HTML in the textarea.
  • MarkDown shortcut!
  • Can be added to the block switcher the user can change some text or a heading to the title.
  • Maybe we should even integrate it with the heading block? [ Title | H2 | H3 | H4 ]?

Issues:

  • We need to convert current titles, and they shouldn't pop up twice for non-Gutenberg themes.

A middle way could be fixing it at the top (for now), but I like the idea of it being a full block.

@ellatrix
Copy link
Member Author

Cc @melchoyce.

@ellatrix
Copy link
Member Author

Other point: a cover image should be able to act as the title?

@ellatrix
Copy link
Member Author

Maybe the title even just becomes a value for listing the document somewhere, much like the except, which may or may not be part of the post/document.

@aduth
Copy link
Member

aduth commented Jul 31, 2017

The title does not have to be at the top. Some people may see that as a bad thing, but I think this is actually kind of cool. People can be more creative in their layout. E.g. the can add a short intro or something before the title, or maybe a future block that contains post meta. In that way it goes more into the realm of the Customizer.

Wouldn't most themes not be able to support these layouts, since the_title and the_content are distinct template tags?

@melchoyce
Copy link
Contributor

Love the idea of having a cover image take the place of a title!

@ellatrix
Copy link
Member Author

@aduth Yeah, that's what I meant with

We need to convert current titles, and they shouldn't pop up twice for non-Gutenberg themes.

The idea is that the_title etc. would go away.

@westonruter
Copy link
Member

Should not the content of this block get source'd from title post field instead of the content field?

@StaggerLeee
Copy link

I could almost swear by my left hand yesterday I saw Link option for Title block. Giving me option to edit Link (Slug, or whatever. Only link option, no other toolbar icons.).

And now I cannot reproduce it, after refresh no more. Some glitch, bug, cannot be sure now. It is Demo Post, I did now add anything to it.

PS: I see now, it is a feature not a glitch. Glitch is that I cannot invoke it in Gutenberg Demo Post. Unless I open it via Posts - Gutenberg menu item. Ok, Beta phase, so not so important now.

/**
* WordPress dependencies
*/
import { __ } from 'i18n';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note with #2172, these need to be updated to prefix the dependencies with @wordpress/. You will need to perform a rebase against the latest version of master and apply your changes:

git fetch origin
git rebase origin/master

/**
* WordPress dependencies
*/
import { __ } from 'i18n';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note with #2172, these need to be updated to prefix the dependencies with @wordpress/. You will need to perform a rebase against the latest version of master and apply your changes:

git fetch origin
git rebase origin/master

@youknowriad
Copy link
Contributor

@iseulde Do you think we should close this and revisit as part of the Template Editor in the customization focus?

@youknowriad youknowriad added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Jan 30, 2018
@ellatrix
Copy link
Member Author

I don't mind closing for now, but I do think it would be interesting to have a movable title.

@ellatrix ellatrix closed this Jan 30, 2018
@ellatrix ellatrix deleted the try/title-as-block branch January 30, 2018 13:38
@danielbachhuber
Copy link
Member

👍 I think this is an interesting idea too, although it runs into some re-world implementation challenges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants