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

[#130] Block clean up and refactor #138

Merged
merged 33 commits into from
Aug 19, 2024
Merged

Conversation

nathan-schmidt-viget
Copy link
Contributor

@nathan-schmidt-viget nathan-schmidt-viget commented Jul 29, 2024

Summary

  • Adding some nice defaulting settings
  • Setting widths for all blocks
  • Updated the default setting of all the blocks so you can set a bg color and it is full width, but the content is constrained. (does not apply to the alert banner)
  • Fixing light text with a dark background on a few blocks
  • Updating the page template - removing block spacer and adding padding
  • Removing the simple block patterns and putting them in the render template array.
  • Adding glob to load CSS files with ./**/*.css
  • Updating all the plop templates to match our new file structure.

Issues

Testing Instructions

  1. Add a block to a page (any of our custom ones but the alert banner).
  2. Set a bg color and make sure it is full width but the content is constrained.
  3. Make sure you can save/update blocks without any errors.
  4. Use plop ddev npm run plop block and add a new block.

Screenshots

New file structure.

Screenshot 2024-08-14 at 10 02 07 AM

Blocks now default to full-width bg color.

wpstarter ddev site_this-is-a-link_sample-page_

@nathan-schmidt-viget nathan-schmidt-viget self-assigned this Jul 29, 2024
@nathan-schmidt-viget nathan-schmidt-viget force-pushed the ns/130-block-clean-refactor branch 3 times, most recently from 12b7b01 to 14c240e Compare July 30, 2024 18:48
@nathan-schmidt-viget nathan-schmidt-viget force-pushed the ns/130-block-clean-refactor branch 3 times, most recently from dbe5fee to cf9008b Compare August 1, 2024 22:27
@nathan-schmidt-viget nathan-schmidt-viget force-pushed the ns/130-block-clean-refactor branch from 2ba5d99 to b1b8134 Compare August 2, 2024 14:29
@nathan-schmidt-viget nathan-schmidt-viget force-pushed the ns/130-block-clean-refactor branch from b1b8134 to a275e30 Compare August 2, 2024 19:16
@nathan-schmidt-viget
Copy link
Contributor Author

@bd-viget Refactored on main with the twig files changing from attribute to block. Tried to figure it out but I think I am missing something.

@nathan-schmidt-viget nathan-schmidt-viget marked this pull request as ready for review August 14, 2024 16:07
Copy link
Contributor

@bd-viget bd-viget left a comment

Choose a reason for hiding this comment

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

Ok, just a few notes, but overall this is great and a ton of work! One recurring comment was just the hard-coding of alignwide and not the ability to configure that using the block editor settings.

@bd-viget
Copy link
Contributor

Let's push out a release after this is merged!

@nathan-schmidt-viget nathan-schmidt-viget force-pushed the ns/130-block-clean-refactor branch 2 times, most recently from d598e73 to 7f59f23 Compare August 15, 2024 16:53
@apply mx-auto;
}

.entry-content > .alignfull {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to add the > otherwise we could not nest blocks inside of other blocks.

@apply mt-0;
}

.entry-content > *:not(.alignfull),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this to target entry-content so just the main content items and not the header/footer.

@nathan-schmidt-viget nathan-schmidt-viget force-pushed the ns/130-block-clean-refactor branch from 7f59f23 to 6d7c797 Compare August 15, 2024 16:57
@nathan-schmidt-viget
Copy link
Contributor Author

@bd-viget Going to merge this! We may have a few small things to fix but we can do that in new PRs.

@bd-viget
Copy link
Contributor

@nathan-schmidt-viget Sounds good!

@bd-viget bd-viget merged commit b085d80 into main Aug 19, 2024
@bd-viget bd-viget deleted the ns/130-block-clean-refactor branch August 19, 2024 17:53
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