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

Feature/wdsus 7 implement wp cli #1006

Merged

Conversation

guzmandrade-dev
Copy link

@guzmandrade-dev guzmandrade-dev commented Apr 28, 2023

Closes #WDSUS-7

Adds initial support for WP-CLI command wp abs create_portable_block.

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

On a terminal run the following WP-CLI command

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

Which should create a new folder blocks/myblock (the command will fail if the folder already exists) with block.json and other files used to register the ACF Block.

the block should be available on the block selector under the category WDS Blocks:

Screenshot 2023-06-02 at 4 04 54 PM

Description

Call To Action Example (included in this PR) was created with:

wp abs create_portable_block call-to-action --title='Call to Action' --desc='This block is used for wds.' --keyword='call-to-action' --icon='megaphone'

Edit page:

Screenshot 2023-05-26 at 4 33 56 PM

Frontend and preview:

Screenshot 2023-06-02 at 4 06 39 PM

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

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

Others

  • 🦮 Is this issue accessible? (Section 508/WCAG 2.0AA)
  • 🙌 Does this issue pass all the linting? (PHPCS, ESLint, SassLint)

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

Base automatically changed from release/WDSUS-2-4.0-Theme-Revamp to main May 19, 2023 19:51
@guzmandrade-dev guzmandrade-dev marked this pull request as ready for review May 26, 2023 21:46
@khleomix khleomix changed the base branch from main to release/WDSUS-2-4.0-Theme-Revamp June 1, 2023 16:51
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 Thanks! I'ved added in some comments, we will need to remove any styles from the generator. Also there's a function that was added by Inna: register_wds_category if you can hook into that so that any generated block will automatically be added to that category. Thanks!

blocks/call-to-action/editor.css Outdated Show resolved Hide resolved
blocks/call-to-action/editor.js Outdated Show resolved Hide resolved
blocks/call-to-action/index.js Outdated Show resolved Hide resolved
blocks/call-to-action/script.js Outdated Show resolved Hide resolved
blocks/call-to-action/style.css Outdated Show resolved Hide resolved
inc/wpcli/block-starter/editor.js Outdated Show resolved Hide resolved
inc/wpcli/block-starter/script.js Outdated Show resolved Hide resolved
inc/wpcli/block-starter/style.css Outdated Show resolved Hide resolved
inc/wpcli/class-blocks-scaffold.php Outdated Show resolved Hide resolved
inc/wpcli/class-blocks-scaffold.php Outdated Show resolved Hide resolved
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.

LGTM @guzmandrade-wds

@khleomix khleomix merged commit f8d2827 into release/WDSUS-2-4.0-Theme-Revamp Aug 4, 2023
@khleomix khleomix deleted the feature/WDSUS-7-Implement-WP-CLI branch August 4, 2023 17:51
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