-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Use blocks instead of widgets in new WordPress installations #1331
Use blocks instead of widgets in new WordPress installations #1331
Conversation
The Twenty Twenty-one theme will need some styling adjustments to accomodate for the different markup. Here's how it looks with widgets: Here's how it looks with blocks: The headings are larger because of a missing The recent post titles are larger because that's how the Latest Posts block styles the list items. I'm not sure if it makes sense to override this in the theme. I could use some guidance from someone who knows all about the default themes. @jasmussen, maybe? 🙂 |
I always appreciate a ping, thank you. In this case, I can only offer limited guidance:
For some actual theme experts, you might want to ping @melchoyce and perhaps @MaggieCabrera. |
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.
Code looks good ✅ Tested with both the new and the old screens and it's working well.
1 => 'categories-2', | ||
2 => 'meta-2', | ||
0 => 'block-5', | ||
1 => 'block-6', |
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.
Shouldn't we still have a meta widget in here?
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 can't decide... would it be weird to have a Legacy Widget block in amongst the default blocks that you see in a new WordPress site? Is it a useful widget to have by default in 2021?
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.
Yeah good point about the Legacy Widget. We can leave it out for now and see if anyone notices 😄
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 think it makes sense to not have this legacy widget on a new install. Why? The default experience of a new install does not include the Meta widget in an active sidebar.
That said, for those who want to use its features, might be good to have a new block version of it.
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.
That makes sense to me. I've kept it removed.
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.
My worry here is that we assume it's not useful. Isn't the meta widget the default front end UX path to wp-admin?
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 would vote for leaving the Meta widget out but would it be possible for it to be available in the inserter and in the Legacy Widget block dropdown list until a new block version is created? (Similar to what we’re looking at doing for the Navigation Menu widget in #32431?)
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.
My worry here is that we assume it's not useful. Isn't the meta widget the default front end UX path to wp-admin?
It already does not show on a new WordPress website because Twenty Twenty-one only has one widget area.
I would vote for leaving the Meta widget out but would it be possible for it to be available in the inserter and in the Legacy Widget block dropdown list until a new block version is created? (Similar to what we’re looking at doing for the Navigation Menu widget in #32431?)
Yes absolutely. Would you mind creating an issue in the Gutenberg repo about adding a block equivalent of Meta? I looked but couldn't find one.
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 prob, made an issue for the block version here: WordPress/gutenberg#32551
Thanks for your useful comment, @jasmussen!
Yeah. I think adding the
Great point! 🌈
This is a really good idea and not one I'd thought of. I tried it, but it doesn't work fully because we also want the heading to appear bold. We could do this by adding
I think this is what we have to do! I've adjust the Twenty Twenty-one styles in 249e2d6. Happy to hear thoughts from everyone. |
249e2d6
to
e29f086
Compare
Unfortunately this breaks just about every unit test we have 😛. I'll start fixing them on Monday. |
Modifies
wp_install_defaults()
so that when you install a new WordPress site you have block in your widget areas, not widgets.Trac ticket: https://core.trac.wordpress.org/ticket/53324
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.