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

[MOOSE-130]: Misc Moose updates for WordPress 6.6 compatibility WIP #146

Merged
merged 34 commits into from
Jul 25, 2024

Conversation

dpellenwood
Copy link
Collaborator

@dpellenwood dpellenwood commented Jun 21, 2024

What does this do/fix?

A variety of updates & improvements to Moose. Most of the changes are reflective of improvements WP Core has made with the release of v6.6. A few are just general bug fixes or tweaks to make Moose easier to use.

  • theme.json objects should now be ordered alphabetically to male properties more easy to find.
  • anywhere things in theme.json appear in a "size" array (font sizes, spacer sizes), the smallest size should always display first
  • theme.json now allows you to style block style variations using the variations property - so some styling has been moved out of .scss files and into theme.json to reflect this.
  • Query Pagination styles were somewhat confusing, it should now be properly nested so the hierarchy makes sense.
  • Removes layout styling that we previously needed to override nested Group blocks
  • theme.json version update and related changes. Reference
  • Remove some old, commented out css from our reset that is no longer causing issues.
  • root style selector updates per Core's specificity updates.
  • Remove the injectChanges parameter from BrowserSync config as css injection doesn't work.
  • Update the dist npm script to use the production ENV value so that assets are minified.
  • Add a build npm task to build non-minified assets on demand.
  • Package updates for Composer & NPM (including plugins & WP Core).

GeoffDusome and others added 17 commits June 24, 2024 09:27
Package                      Old  New
@wordpress/create-block   4.39.0  4.44.0
@wordpress/scripts        27.6.0  28.1.0  node_modules/@wordpress/scripts       public
cssnano                    6.1.2   7.0.3  node_modules/cssnano                  public
lefthook                   1.6.9  1.6.18  node_modules/lefthook                 public
postcss-mixins            10.0.0  10.0.1  node_modules/postcss-mixins           public
postcss-preset-env         9.5.4  9.5.14  node_modules/postcss-preset-env       public
…-updates

# Conflicts:
#	CHANGELOG.md
#	composer.json
…-updates

# Conflicts:
#	CHANGELOG.md
#	wp-content/themes/core/blocks/core/image/style.pcss
@dpellenwood dpellenwood marked this pull request as ready for review July 19, 2024 19:52
@GeoffDusome
Copy link
Contributor

This is a pretty huge PR but it was some much needed updates to Moose as well as updates specific to changes made in WP 6.6. If you see some styling removed, it's mostly because it's been moved to theme.json. Alternatively, in some cases, the styling is no longer needed (the layout overrides).

I'm going to bow out of reviewing this PR because I was pretty involved in it, but I'm interested what everyone else thinks of the updates.

Copy link
Contributor

@Vinsanity Vinsanity left a comment

Choose a reason for hiding this comment

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

🟢 Looks Great @dpellenwood 🌮 I added a comment that may be helpful enhancing our variable definitions.

@@ -14,7 +14,7 @@
font-family: var(--wp--preset--font-family--roboto);
font-size: var(--wp--preset--font-size--80);
line-height: 1.1;
font-weight: 700;
font-weight: var(--wp--custom--font-weight--bold);
Copy link
Contributor

Choose a reason for hiding this comment

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

I ended up taking this a step further in the typography/_variables.pcss partial to define this and reference it more easily. I found it very useful since some fonts can technically define things like medium as 500 or 600.

Copy link
Contributor

Choose a reason for hiding this comment

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

`/* -------------------------------------------------------------------------
* Font Weights
* ------------------------------------------------------------------------- */

--font-weight-extra-light: var(--wp--custom--font-weight--extra-light); /* 200 */
--font-weight-light: var(--wp--custom--font-weight--light); /* 300 */
--font-weight-normal: var(--wp--custom--font-weight--regular); /* 400 */
--font-weight-medium: var(--wp--custom--font-weight--medium); /* 500 */
--font-weight-semi-bold: var(--wp--custom--font-weight--semi-bold);  /* 600 */
--font-weight-bold: var(--wp--custom--font-weight--bold); /* 700 */`

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice! I ticketed this as a possible improvement.

Copy link
Contributor

@LayaTaal LayaTaal left a comment

Choose a reason for hiding this comment

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

Works for me! I added a couple of minor comments which aren't blocking.

@@ -0,0 +1,52 @@
# Supported Block Features & Settings
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a great addition. What do you think about linking to it from the main README so that everyone is readily aware of it?

* ------------------------------------------------------------------------- */

/* important added to override WP's editor stylesheet */
.has-global-padding > .alignfull:where(.has-global-padding) > :where(:not(.alignfull):not(.alignwide):not(.aligngrid)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, this is a nice one to be able to remove!

* ------------------------------------------------------------------------- */

/* @TODO: Add documentation on setting up theming to properly utilize */

body {
:root {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would be better handled in a separate PR, but are we opposed to moving these variables out of the block itself? I've had issues here a few times when I want button styles on something outside of the block and the block CSS is not loaded on the page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's an interesting idea. I'd like to explore theming in general a bit to see if we can make it more holistic. I added a ticket to Moose for us to look into it.

@dpellenwood dpellenwood merged commit dd4247e into main Jul 25, 2024
11 checks passed
@dpellenwood dpellenwood deleted the feature/MOOSE-130/wp-6.6-compat-updates branch July 25, 2024 16:39
@dpellenwood dpellenwood mentioned this pull request Jul 25, 2024
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