[EMAIL-PREVIEW-3] PLU-386: Add "Preview" button to TipTap toolbar#1659
[EMAIL-PREVIEW-3] PLU-386: Add "Preview" button to TipTap toolbar#1659ogp-weeloong wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label lfg to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Plumb previewType through InputCreator -> RichTextEditor -> Editor -> MenuBar so the TipTap toolbar can render a kind-specific Preview button when the field opts in. The button matches the toolbar's icon-button style (eye icon with kind-specific tooltip). Clicking it substitutes editor.getHTML() through substituteForPreview and opens EmailPreviewModal. .editor__header flips to flex layout so the button can be end-aligned with marginLeft: auto. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bb896d2 to
adda098
Compare
3453746 to
5a30fef
Compare
| </button> | ||
| </Tooltip> | ||
| <Suspense fallback={null}> | ||
| {isOpen && renderPreviewer({ isOpen, onClose, html })} |
There was a problem hiding this comment.
should we render the modal unconditionally and let the isOpen prop control the visibility?
| borderRadius="md" | ||
| bg={isSelected ? 'primary.100' : undefined} | ||
| _hover={{ bg: isSelected ? undefined : 'grey.100' }} | ||
| aria-current={isSelected || undefined} |
There was a problem hiding this comment.
should this be aria-checked?
aria-checked={isSelected}
role="radio"



Problem
We want pipe owners to be able to preview their email across a variety of email clients (Outlook, Yahoo etc).
High-level Approach
See #1652 for more details.
This PR
IMPORTANT
Feel free to comment on the best UX treatment for the preview button. I had a few ideas in mind:
Beedios
Desktop
Screen Recording 2026-06-02 at 2.34.05 PM.mov (uploaded via Graphite)
Mobile
NOTE: Our mobile UX needs some love...
Screen Recording 2026-06-02 at 2.51.19 PM.mov (uploaded via Graphite)
Tests