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

Fix bugs in WordPress 5.8 related to withColors and modernize code in blocks #369

Open
wants to merge 17 commits into
base: feature/wp-scripts-restructure
Choose a base branch
from

Conversation

acketon
Copy link
Member

@acketon acketon commented Jan 23, 2025

  • Bug fix: Intro Paragraph block's onSplit function wasn't working to add a paragraph block when the user hits enter.
  • Bug Fix: Intro Paragraph block was retaining the dropcap when switching Block Styles. Had to change how className was used since the old approach from the beta version of Gutenberg conflicts with current attribute and property usage of className.
  • Multiple blocks were using the "full" image size in the Background component. This has been changed now to the large size instead. This should be a safe change for most blocks but may result in some layout bugs. Loading the full size however is not acceptable as the files sizes can be extreme.
  • Block Color Palette Options WP 5.8 bug fixes:
    • Stats color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Modal color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Leadin color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Drawer color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Intro Paragraph color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Button block color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Pullquote block color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code
    • Aside Block color options fixed
      • Fix 5.8 color palette issues in withColors(), add Example for inserter, remove 4.9 fallback code

@acketon acketon marked this pull request as ready for review January 24, 2025 19:41
@acketon acketon self-assigned this Jan 24, 2025
@acketon acketon changed the title Dakota/bu blocks replace cgb scripts 203 Fix bugs in WordPress 5.8 related to withColors and modernize code in blocks Jan 24, 2025

Choose a reason for hiding this comment

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

const getColorSlug = ( color ) => { ... }; is repeated at least 7 times, let's pull this out into a common library.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I was contemplating this. I think I can add it to the ThemeOptions component but I'll have to modernize that component file too. I can make that change to the PR.

Choose a reason for hiding this comment

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

Maybe becomes an imported component?

Copy link

@timkingbu timkingbu left a comment

Choose a reason for hiding this comment

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

Everything looks good. I was able to run npm run build with no errors (but lots of warnings). A quick check of the editor and frontend - everything appears to be working.

I did not do any VRTs against the current version of BU Blocks.

Other things to note:

  • npm audit produces 19 vulnerabilities (6 low, 3 moderate, 10 high)
  • npm run lint:js produces 229 problems (226 errors, 3 warnings)

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.

2 participants