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

fix: prevent CMS requirements from leaking into preview email #1297

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

wilr
Copy link
Member

@wilr wilr commented May 30, 2024

Description

When previewing an email template, the current behaviour is to include existing CMS styles which can be misleading.

Manual testing steps

  • Create a HTML template for the email recipient
  • Notice that the HTML template includes CSS when previewing.

Issues

Pull request checklist

  • The target branch is correct
  • All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)
    • Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.
  • The commit messages follow our commit message guidelines
  • The PR follows our contribution guidelines
  • Code changes follow our coding conventions
  • This change is covered with tests (or tests aren't necessary for this change)
  • Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
  • CI is green

Screenshot 2024-05-31 at 10 23 29 AM

@GuySartorelli
Copy link
Member

I've added back the spot from the pull request template where a link to a issue needs to go. Can you please link to an issue? You'll need to create one if there isn't one already.

This is important because it lets us track the issue in Zenhub, which the CMS Squad uses to keep track of the progress of issues. We don't track PRs, so this may not every be reviewed properly if there's no issue for us to track.

@GuySartorelli
Copy link
Member

GuySartorelli commented Jun 4, 2024

Please also retarget this to the 6.2 branch so it can be released as a patch. You may need to reset your commits after retargetting the PR.

@wilr wilr changed the base branch from 6 to 6.2 June 5, 2024 07:13
@wilr
Copy link
Member Author

wilr commented Jun 5, 2024

Rebased on 6.2 now!

@wilr
Copy link
Member Author

wilr commented Jun 5, 2024

This is important because it lets us track the issue in Zenhub, which the CMS Squad uses to keep track of the progress of issues. We don't track PRs, so this may not every be reviewed properly if there's no issue for us to track.

Ah another reason Zenhub should die! Far too much duplication

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

Sorry it's taken so long to review this. Mostly looks good, but should call Requirements::restore() after rendering the template.

@GuySartorelli GuySartorelli self-assigned this Jun 19, 2024
@wilr
Copy link
Member Author

wilr commented Jun 23, 2024

Sorry it's taken so long to review this. Mostly looks good, but should call Requirements::restore() after rendering the template.

Done

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for making that change

@GuySartorelli GuySartorelli merged commit f2cda50 into silverstripe:6.2 Jun 23, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants