Repository navigation
Conversation
Contributor
|
@hsusul is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
🦋 Changeset detectedLatest commit: eb24024 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue or discussion
Fixes #3944
What this changes
<Preview>renders a<title>next to its hiddendata-skip-in-textdiv. Plain-text conversion skipped the div but kept the title. When the title rendered inside<body>, as it does on React 18 with<Preview>inside<Body>, or on React 19 without<Html>, the preview text became the first paragraph of the plain text.This adds
titleto the skipped selectors intoPlainTextand toSKIPPED_TAGSinunstableToPlainText, so both converters drop it. A<title>in<head>was already left out, so that output doesn't change.Tests:
render-node.spec.tsxrenders a<title>withplainTextandunstableTextConversionboth off and on.unstable-to-plain-text.spec.tsruns both converters on React 18 markup, with the title inside<body>.preview.spec.tsxcovers<Preview>itself.Verification on canary
e1c0044aplus this branch:vitest runinpackages/render: 113 passed.vitest runinpackages/react-email: 418 passed, 2 failed. The failures areexport-esbuild-plugins.spec.tsand theoutDir with glob syntaxcase inexport.spec.ts. They fail the same way on canary here: the first can't startpnpm, the second can't findcss-tree.biome checkat the root: clean apart from one existing warning inapps/web/src/app/editor/editor-overrides.css.I didn't run anything on React 18. That case is covered with the markup it produces.
Checklist
Summary by cubic
Fixes plain text conversion so a
<title>rendered inside the email body no longer appears as the first paragraph of the plain-text version. This happened with<Preview>on React 18, where React hoists the title into<body>.titleto the skipped selectors intoPlainTextandSKIPPED_TAGSinunstableToPlainText.<title>elements in<head>were already excluded, so output there is unchanged.<body>, plus<Preview>end-to-end.Written for commit eb24024. Summary will update on new commits.