-
Notifications
You must be signed in to change notification settings - Fork 182
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: Clean up for Theme Repo #149
Conversation
tt1-blocks/readme.txt
Outdated
|
||
== Changelog == | ||
|
||
= 1.0 = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what to do about the version number here. Should we start below 1.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. Updated in 582d892.
Works for me, thanks! PR is updated. |
I just pushed up archive and search results templates:
Note that the search and archive page titles are static because dynamic blocks for those titles don't exist yet. That will eventually be handled by the "Query Title" block as noted in WordPress/gutenberg#22724. I'm not 100% sure about the query block markup there, but it seems to work in my testing. Also note that I think Gutenberg 9.6 is required to get these queries working. |
If those templates look good, I think this will now close #140. |
I tested the Archive and Search templates against GB master, and looks good to me. |
Is there a reason that we need these extra templates? If we need them, maybe we could create another template part which contains the code that is shared across all these templates? |
Until the page headers are dynamic, I'm not sure it makes sense to include these additional templates at all — they're basically just the same as the index template (I can easily modify the query there instead of on these two pages, and it will work in all contexts). @carolinan, you'd included these two templates in your list here. What do you think? |
- Tidy up the query itself. - Fix wide/full styles for inner content in the query block.
tt1-blocks/style.css
Outdated
@@ -46,7 +46,8 @@ body { | |||
} | |||
|
|||
.wp-site-blocks > *:not(.wp-block-post-content), | |||
.wp-site-blocks .wp-block-post-content > * { | |||
.wp-site-blocks .wp-block-post-content > *, | |||
.wp-block-query-loop li > *:not(.entry-content):not(.alignwide):not(.alignfull) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did this creep in by mistake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I just added that. Previously, all content of the query block was showing up as standard width, even when it was wide/full. 😩 I noticed this when I moved the default query into its own template part, and had to do this to fix it.
Here's an example, where the Media & Text block is supposed to be wide width:
Before f4a0131 | After I placed the query block in the full-width template part. | Final result, after I added this css. |
---|---|---|
(I really can't wait until this alignments stuff "just works" 😞).
BTW, I fixed the global query in f4a0131 by using the usual query block markup, and ensuring that it was set to |
These are already defined in theme.json.
Thanks, should be fixed now.
I don't think there is anymore. The alignments came from here originally, but they've been rewritten by @scruffian recently. The rest of the base of the theme was just built from scratch or copy/pasted from the original Twenty Twenty-One.
Good call. 👍 This should be ready for another review! |
There are functions in the removed header.php and footer.php files that are needed to pass theme check for the upload to the theme directory. |
@Otto42 since this theme will be added to the theme directory from the wordpressorg account does it still need to pass theme check? |
The post comments block uses comments_template so the theme still needs a comments.php file:
Update: |
It's possible I added those intentionally and forgot why over the holidays. 😄 In any case, even with those files, the theme fails ThemeCheck with a ton of errors: So if it does need to pass ThemeCheck, we need to add many more (unused) selectors and functions. If possible, it would be a much better solution to fix ThemeCheck so it doesn't require all this stuff for block based themes. |
Without finalized requirements we can't update Theme Check -we won't know what it needs to check for. I estimate that to take at least 3 months. (The required CSS classes listed there has been removed but that plugin version has not been released yet.) |
There are other Block Themes in the directory that didn't pass the check... |
Ah, no that is not how the theme upload works, you have have to pass Theme Check once. That is why I wanted to ask Otto because I believe he mentioned that there is an exception for default themes. This is not a default or bundled theme but it will be uploaded from the same account. |
Ok cool. I think the plan was to upload a generic theme with the TT1 Blocks name to start with (a version that passes ThemeCheck), and then once a moderator enables that special case, we can upload the actual version. That should work, right? |
Yes. |
Cool. If that's the case, I think we can leave out those |
I was hoping to be able to merge this now but when I view an archive or search result I see the following:
Line 45 is the per page setting: In index.html, the per page setting is I am not sure if it has been discussed already but the default value for $posts_per_page is 10 and I think this should reflect that. |
Update the perPage setting in the query
Has the lack of query pagination been discussed? Is not including pagination something you feel as strongly about as the comments? The pagination does not have a CSS class on the front so we can not add any styles for it until the block is updated. But navigating between the archive pages technically works. |
There are a couple of open issues for pagination: |
Yes but they do not address why the block is not being used in the theme. |
I created an issue to add the block to this theme: #158 |
There's a simple answer actually: I tried adding it a while back, but it didn't seem to work. 😂 Let's look at sorting that out in another PR — maybe it's working now. |
Takes care of a few of the checklist items from #140 (comment):
I also added a first draft of a readme.txt. Please suggest any edits!
For the screenshot, this was a (very) quick version. @melchoyce I'm curious if you have any ideas. I'm not sure how totally different we want the screenshot, considering it's meant to be the exact same theme visually. 😄