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

38 create a block specific build pattern so scss and css can be local to the block folder #44

Conversation

guzmandrade-dev
Copy link

@guzmandrade-dev guzmandrade-dev commented Aug 11, 2023

Closes

#38

#WDSUS-37

What type of PR is this? (put an x to all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Link to test

Description

This PR adds to the block created with the WP-CLI command wp wds create_portable_block starter styles and changes how styles are built, so single style files are created per each block.

Example:

Run the following to create the block myblock (double-check you don't have a folder named myblock under blocks):

wp wds create_portable_block myblock --title="This is myblock" --desc="This block is used for wds." --keyword="myblock" --icon="table-row-before"

add markup and style code to your block, such as:

Screenshot 2023-08-11 at 12 55 29 PM

and run npm run buld or npm run start. This should result, after adding the custom block to a post or page, in the following:

on the Frontend
Screenshot 2023-08-11 at 12 56 20 PM

Editor page
Screenshot 2023-08-11 at 12 56 02 PM

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help (more like time)

Added to documentation?

  • 📜 README.md
  • 📓 Confluence
  • 🙅 no documentation needed

Others

  • 🦮 Is this issue accessible? (Section 508/WCAG 2.0AA) -- would depend on the markup of new blocks created
  • 🙌 Does this issue pass all the linting? (PHPCS, ESLint, SassLint)

[optional] Are there any post-deployment tasks we need to perform?

Copy link
Contributor

@khleomix khleomix left a comment

Choose a reason for hiding this comment

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

@guzmandrade-wds LGTM! Thanks!!!

@khleomix khleomix merged commit 5f0ea99 into main Aug 14, 2023
4 checks passed
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