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

Add Block: Title #11553

Open
DevOnWheels opened this Issue Nov 6, 2018 · 14 comments

Comments

4 participants
@DevOnWheels
Copy link

DevOnWheels commented Nov 6, 2018

Hey, this is just a question/ idea:
I tried to insert HTML in my posts title. It does work, but the HTML is actually written out in the edit field of the title. This looks awkward. Is there any possibility to interpret the HTML in post titles in the same way as in the rest of Gutenberg. Like some kind of a "post title block"?

Reason for the question is that I would like to have overlines in my h1 tag without using ACF for that purpose. If this tracker is not the place for ideas/ enhancements, just drop me a note and close the ticket :)

Best regards, Matt

@designsimply

This comment has been minimized.

Copy link
Contributor

designsimply commented Nov 6, 2018

Great question! There's some related discussion in #8469 where it is mentioned in the comments that future plans include making the title area into a block which likely means you would be able to add HTML to it. I checked the New Block label and didn't see one made for that specifically though, so I'm updating the title here so we can use this request for tracking. Thanks for raising the issue!

@designsimply designsimply changed the title HTML in post title Add Block: Title Nov 6, 2018

@designsimply

This comment has been minimized.

Copy link
Contributor

designsimply commented Nov 6, 2018

Related: #8824 (and noting a kicker block may not be needed if title becomes a block that can be reordered within a post)

@designsimply

This comment has been minimized.

Copy link
Contributor

designsimply commented Nov 6, 2018

Noting another relevant quote about title (and other things) eventually becoming blocks:

Eventually, the title, the date, the author, etc, will all just be blocks you can place in whatever order around the content.

Source: #4482 (comment) (worth noting this one is in the "To Do in Phase 2" project)

@mapk

This comment has been minimized.

Copy link
Contributor

mapk commented Jan 7, 2019

I'd really like to see the title block come to fruition in Phase 2. I'll add it to the milestone. We'll need some design input on this though... for instance, where does the meta info that the title provided go?

@DevOnWheels

This comment has been minimized.

Copy link

DevOnWheels commented Jan 8, 2019

I'd really like to see the title block come to fruition in Phase 2. I'll add it to the milestone. We'll need some design input on this though... for instance, where does the meta info that the title provided go?

@mapk what exactly do you mean by "meta info that the title provided"? Happy to help :)

@mapk

This comment has been minimized.

Copy link
Contributor

mapk commented Jan 8, 2019

what exactly do you mean by "meta info that the title provided"? Happy to help :)

The permalink is what I mean here. It comes from the Title.

screen shot 2019-01-08 at 2 38 02 pm

Would the Title block still incorporate the permalink info as it does now? Would that move to the sidebar? Just some things to consider. If there is not Title Block, what happens?

@DevOnWheels

This comment has been minimized.

Copy link

DevOnWheels commented Jan 11, 2019

Yes, the current place is the "correct" one, I would say. A few thoughts on the "title block" here:
The block should be available only once, so there cannot be confusion between different titles. Additionally I would like to have a field for a "working title" so that I can have a short title in my admin lists, but a long title with HTML etc. in the title block. For example "This is my super awesome frontpage! Check it out!" in the block, but only "Static Frontpage" in the page list. And for these reasons I would like to have the settings directly at the block.

@mapk

This comment has been minimized.

Copy link
Contributor

mapk commented Jan 11, 2019

The block should be available only once, so there cannot be confusion between different titles.

Definitely possible. But what if the user doesn't want a title block on their page? Then how do we define the URI?

@DevOnWheels

This comment has been minimized.

Copy link

DevOnWheels commented Jan 11, 2019

Good question. This would be a reason to exclude the settings to the options bar of the document. On the other hand, I really get headache about the fact that an article wouldn't have a title, but that's a SEO problem and not related to this issue.

@swissspidy

This comment has been minimized.

Copy link
Member

swissspidy commented Jan 11, 2019

Definitely possible. But what if the user doesn't want a title block on their page? Then how do we define the URI?

WordPress uses the post ID for the URL by default if there's no title set. Unless the user manually overrides the permalink with their own liking.

@DevOnWheels

This comment has been minimized.

Copy link

DevOnWheels commented Jan 11, 2019

WordPress uses the post ID for the URL by default if there's no title set. Unless the user manually overrides the permalink with their own liking.

Exactly, but if you don't have the title block in your document (and the permalink option would be tied to the block settings) you will not have the settings either.

@mapk

This comment has been minimized.

Copy link
Contributor

mapk commented Jan 11, 2019

A common problem I've experienced is the homepage. I want a homepage, and want the URL to reflect /home or /welcome in the URL, but I don't want to have a title that says that... and I definitely don't want a random number.

@DevOnWheels

This comment has been minimized.

Copy link

DevOnWheels commented Jan 11, 2019

@mapk a solution then would be to put the settings of the title into the document tab of the document so that the user doesn't have to define a title for the document at all.

@mapk

This comment has been minimized.

Copy link
Contributor

mapk commented Jan 11, 2019

put the settings of the title into the document tab

I think this is the best solution right now and feel the document tab is a perfect fit for it, but I'd love to hear if others have any more suggestions. Also, @DevOnWheels, are you able to mock this up for us?

@DevOnWheels

This comment has been minimized.

Copy link

DevOnWheels commented Jan 11, 2019

I would love to try, but never worked with this area of WordPress before ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment