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

Convert short code to drupal equivalent #160

Merged
merged 9 commits into from
Feb 19, 2025

Conversation

mattsqd
Copy link
Collaborator

@mattsqd mattsqd commented Feb 3, 2025

Jira ticket

DIGITAL-41

Purpose

When the 'content' of the markdown files are migrated, they contain shortcode tags that look like {{< name >}}. Each of these has been migrated into a corresponding Drupal functionality. Most are embedded content entities, but some are media and, some are just simple things like links. This functionality shows how we can send this text through Drupal and replace it.

Includes the following PRs that must be merged first

Deployment and testing

Local Setup

lando rebuild -y && lando si

QA/Testing instructions

We've made a testing page in Hugo that showcases all the short codes that we are migrating. You can find that file here.
What you will want to do is take the contents of that file and paste it into http://digitalgov.lndo.site/admin/convert-text with 'Fields like body that summary or body that will contain HTML and Markdown' selected. This will mimic the same thing that will happen during the migration, where every field with shortcodes in it will be processed with this functionality.

What should you see?
Take the text in 'Converted Text' and paste it into the 'Source' of the body of a basic page. You should see something VERY similar to http://digitalgov.lndo.site/short-code-test-page. Note that somethings require other migrations to be run, so there is only placeholders.
The page should look the same as the demo except one's that require place holders.

Checklist for the Developer

  • A link to the JIRA ticket has been included above.
  • No merge conflicts exist with the target branch.
  • Automated tests have passed on this PR.
  • A reviewer has been designated.
  • Deployment and testing steps have been documented above, if applicable.

Checklist for the Peer Reviewers

  • The file changes are relevant to the task objective.
  • Code is readable and includes appropriate commenting.
  • Code standards and best practices are followed.
  • QA/Test steps were successfully completed, if applicable.
  • Applicable logs are free of errors.

@mattsqd mattsqd force-pushed the feature/DIGITAL-41-short-code-to-drupal branch from 40e59c4 to bf94b72 Compare February 3, 2025 17:27
@omerida
Copy link
Contributor

omerida commented Feb 5, 2025

@mattsqd this should wait until #164 is merged, no?

@mattsqd
Copy link
Collaborator Author

mattsqd commented Feb 5, 2025

@mattsqd this should wait until #164 is merged, no?

It doesn't have to, whichever gets in first. I'm fine with 164 going first, then figuring out how we're going to make the short code demo un-conflicted.

@rayestrada
Copy link
Contributor

@mattsqd can you resolve the conflicts so I can test?

…-short-code-to-drupal

# Conflicts:
#	composer.lock
#	composer.log
#	web/modules/custom/convert_text/src/ConvertText.php
#	web/modules/custom/default_content_config/content/node/fd186b65-70b7-499a-a9be-050562561209.yml
…nkItMarkup uses the Html class to load and serialize.
…reate ul, not a entity embed. Changed the format of various entity embeds to match the new specs. Support featured resource external. Implemented equivalent for quote block.
@mattsqd mattsqd requested a review from rayestrada February 13, 2025 17:48
@mattsqd
Copy link
Collaborator Author

mattsqd commented Feb 13, 2025

@rayestrada the conflicts have been fixed and this is ready to test again.

Copy link
Contributor

@omerida omerida left a comment

Choose a reason for hiding this comment

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

I used convert text with the sample page and then took that HTML and created a page. Shortcodes looked correct

@omerida omerida merged commit d14f8d4 into develop Feb 19, 2025
2 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.

3 participants