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

TT1 Blocks: Delete front-page.html #179

Merged
merged 1 commit into from
Jan 29, 2021
Merged

Conversation

carolinan
Copy link
Collaborator

Solves #167

@kjellr
Copy link
Collaborator

kjellr commented Jan 27, 2021

I think we do actually need a separate template here — since Twenty Twenty-One hides the homepage title on the homepage automatically. It should probably have a query block, but with no page title.

@carolinan
Copy link
Collaborator Author

carolinan commented Jan 28, 2021

If we did that, the list of blog posts would also not have titles.

We do not have traditional PHP conditionals, but we do have CSS. We can work around it, but a long term solution
needs to be figured out for the editor.

.home:not(.blog) .wp-block-post-title,
.home:not(.blog) .wp-block-post-comments,
.home:not(.blog) .wp-block-post-comments-form {
display: none;
}

This would leave the .wp-block-separator above the content.
Without a wrapper for the "post header" we can not just target the first separator of the page.

That the main element is missing is also a big problem, I opened a new issue. #180.

Perhaps the solution is to allow themes to use .php files and unlimited PHP.
That this decision has been left to Milestone:7 Gradual Adoption is problematic.

Or, we need to introduce another context for "home" and "blog".

@kjellr
Copy link
Collaborator

kjellr commented Jan 28, 2021

Hmm. That's a good point. Perhaps for now we do remove the front-page.html template, and discuss how to support the separate "single page w/no title" template in a separate issue. cc @scruffian for thoughts too.

@scruffian
Copy link
Collaborator

Yeah we will definitely need to fix this in Gutenberg. I created an issue here: WordPress/gutenberg#28564

Happy to remove the template for now, but I'd rather not fix it with CSS.

Copy link
Collaborator

@kjellr kjellr left a comment

Choose a reason for hiding this comment

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

Sounds good. This should be good to merge in the meantime!

@carolinan carolinan merged commit 468d3dd into master Jan 29, 2021
@carolinan carolinan deleted the tt1-remove-front-page branch January 29, 2021 05:28
@mtias
Copy link
Member

mtias commented Jan 30, 2021

Agreed front-page doesn't make much sense. The relationship between front-page, home, page template, and the static homepage setting are all a bit confusing in WordPress. Would it make sense to have a page-home template for the case of no title?

I think more generally we need make the "hide a title" something much more flexible across the board, for pages and posts alike — maybe a part of the post-title block setting a body-class or post-class.

@scruffian
Copy link
Collaborator

That's what I did here: https://github.com/WordPress/theme-experiments/pull/184/files

ockham added a commit to WordPress/gutenberg that referenced this pull request Feb 9, 2021
Gutenberg's end-to-end tests were broken for a while after TT1 Blocks removed their `front-page` template (WordPress/theme-experiments#179) -- which our e2e tests relied on. This was fixed on the Gutenberg side in #28638.

Per [this discussion](#28692 (comment)), we might be able to avoid a similar situation in the future by pinning our TT1 Blocks dependency to a given version.

See #28692 for more background.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants