Skip to content

[EMAIL-PREVIEW-4] PLU-386: Enable email previews in appropriate previous result data#1655

Open
ogp-weeloong wants to merge 2 commits into
claude/preview-button-menubarfrom
claude/postman-email-dataout
Open

[EMAIL-PREVIEW-4] PLU-386: Enable email previews in appropriate previous result data#1655
ogp-weeloong wants to merge 2 commits into
claude/preview-button-menubarfrom
claude/postman-email-dataout

Conversation

@ogp-weeloong
Copy link
Copy Markdown
Contributor

@ogp-weeloong ogp-weeloong commented May 28, 2026

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

Updates the "View" button in "Previous Result" section to support email previews for postman's previous result email:

  1. Adds email to TDataOutMetadatumType
  2. Make the "Previous Result" table use the email preview modal to render the "View" button when the type is email.
  3. Sets postman email's dataout metadatum type to email, so that it launches the email modal when "View" is clicked.

Beedio

Screen Recording 2026-06-02 at 10.36.28 PM.mov (uploaded via Graphite)

Tests

  • Check that I can preview the previous result's email using the new email preview modal
  • [Regression test] Check that other types of previous result previews (e.g. tiles previews) still use their appropriate modal
  • [Regression test] Check that emails from published pipes have variables substituted correctly

Copy link
Copy Markdown
Contributor Author

ogp-weeloong commented May 28, 2026

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.
Learn more


How to use the Graphite Merge Queue

Add 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.

@ogp-weeloong ogp-weeloong changed the base branch from claude/email-preview-button to graphite-base/1655 May 29, 2026 03:16
@ogp-weeloong ogp-weeloong force-pushed the claude/postman-email-dataout branch from 5d075bc to e1db275 Compare May 29, 2026 03:16
@ogp-weeloong ogp-weeloong changed the base branch from graphite-base/1655 to claude/preview-button-menubar May 29, 2026 03:16
Widens TDataOutMetadatumType with 'email' so apps can declare a
dataOut variable should be rendered through the new client-specific
email preview. Switches Postman send-transactional-email's body
variable from type 'html' to 'email'; the routing change in
VariableItemWithModal follows in the next commit.

No exhaustive switches on TDataOutMetadatumType broke, so no stub
branches were needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ogp-weeloong ogp-weeloong force-pushed the claude/postman-email-dataout branch from e1db275 to e192372 Compare June 2, 2026 06:58
@ogp-weeloong ogp-weeloong force-pushed the claude/preview-button-menubar branch from 3453746 to 5a30fef Compare June 2, 2026 06:58
@ogp-weeloong ogp-weeloong changed the title feat: add 'email' to TDataOutMetadatumType and use it for Postman body [EMAIL-PREVIEW-1] PLU-386: Enable email previews in appropriate previous result data Jun 2, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Jun 2, 2026

PLU-386

@ogp-weeloong ogp-weeloong changed the title [EMAIL-PREVIEW-1] PLU-386: Enable email previews in appropriate previous result data [EMAIL-PREVIEW-4] PLU-386: Enable email previews in appropriate previous result data Jun 2, 2026
Adds an 'email' case in VariableItemWithModal that renders
EmailPreviewModal with the variable's value as HTML, and includes
'email' in canOpenModal so the "View" button shows up. Registers
'email' in VARIABLES_WITH_MODALS (so the virtualized list picks
VariableItemWithModal) and in VISIBLE_VARIABLE_TYPES (so the variable
shows up in default rich-text suggestion lists).

End-to-end this means the existing post-test "View" button on Postman's
body dataOut variable now opens the new client-specific preview.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ogp-weeloong ogp-weeloong force-pushed the claude/postman-email-dataout branch from e192372 to 28e5cbd Compare June 2, 2026 14:39
@ogp-weeloong ogp-weeloong marked this pull request as ready for review June 2, 2026 14:39
@ogp-weeloong ogp-weeloong requested a review from a team as a code owner June 2, 2026 14:39
Copy link
Copy Markdown
Contributor

@kevinkim-ogp kevinkim-ogp left a comment

Choose a reason for hiding this comment

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

lgtm!

isOpen={isModalOpen}
onClose={onModalClose}
html={(variable.value as string) ?? ''}
title="View email"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can consider getting the subject from the data out to display as the title?

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.

2 participants