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

Enhancement/shortcode conversion to block #84

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

MaxwellGarceau
Copy link
Collaborator

@MaxwellGarceau MaxwellGarceau commented Dec 19, 2024

Description of the Change

When a user opens a classic post in the Gutenberg Block Editor there is a "Convert to blocks" option that transforms the Mailchimp mailchimp_sf_shortcode shortcode to a Gutenberg block.
mailchimp-shortcode-transform-to-block

classic-post-to-block.mov

Closes #64

How to test the Change

  • Create a post with classic editor on
  • Insert mailchimp shortcode
  • Turn classic editor off
  • Open post in block editor
  • Click "Convert to blocks" button
  • Shortcode should be transformed into a Gutenberg Mailchimp block

Changelog Entry

Added - Transform from mailchimp_sf_shortcode shortcode to a Gutenberg block

Credits

Props @MaxwellGarceau

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly. No documentation to update
  • I have added tests to cover my change. Small changes using native WP functionality. Limited risk with no attributes to transfer. No changes necessary.
  • All new and existing tests pass. - Having trouble running cypress tests on WSL2

@MaxwellGarceau
Copy link
Collaborator Author

MaxwellGarceau commented Dec 19, 2024

Focusing on other backlog items for now. The main part of this work is done. Next steps outlined in Teamwork.

@MaxwellGarceau MaxwellGarceau marked this pull request as ready for review December 19, 2024 18:07
@github-actions github-actions bot added the needs:code-review This requires code review. label Dec 19, 2024
@jeffpaul
Copy link
Collaborator

@MaxwellGarceau its hard to tell with the GIF attached, but I assume the "shortcode test" text transforms into a paragraph block while the Mailchimp shortcode transforms into the Mailchimp block?

@MaxwellGarceau
Copy link
Collaborator Author

That's correct @jeffpaul. I've attached a better screen capture and I'm updating the PR with the screen capture that shows the paragraph text to paragraph block transformation more clearly.

classic-post-to-block.mov

@qasumitbagthariya
Copy link
Collaborator

QA Update ✅


I have verified this PR in the enhancement/shortcode-conversion-to-block branch which has been fixed and is functioning as intended.

I tested the following on this branch:

  • Classic editor Shortcode should be transformed into a Gutenberg Mailchimp block
Screen.Recording.2025-01-15.at.4.27.13.PM.mov

Testing Environment

  • WordPress: 6.7.1
  • Theme: Twenty Twenty-Five 1.0
  • WooCommerce - 9.5.1
  • PHP: 8.0.30
  • Web Server: Nginx 1.20.2
  • Browser: Chrome
  • OS: macOS 15.2
  • Branch: enhancement/shortcode-conversion-to-block

Steps to Test- As mentioned in the PR description.
Test Results - It is working as expected.
Functional Demo / Screencast -
Special Notes - Ready for code review
Testing Document status:
Cases related to this Issue/PR are added to the Critical Flow Wiki pages:

  • Yes
  • Not Required/Applicable for this PR

Note:
@dkotter

I tried using the Mailchimp block to the Classic Editor, but after enabling the Classic Editor plugin and checking the post, the form shortcode does not appear in the editor. However, the form does appear on the front end.

Screen.Recording.2025-01-15.at.4.37.32.PM.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shortcode conversion to block when opening classic post in block editor
4 participants