Skip to content

PLU-591: [show-multiple-rows-1]: add helper functions#1536

Open
m0nggh wants to merge 1 commit intodevelop-v2from
feat/find-multiple-rows/table-var-format-utility
Open

PLU-591: [show-multiple-rows-1]: add helper functions#1536
m0nggh wants to merge 1 commit intodevelop-v2from
feat/find-multiple-rows/table-var-format-utility

Conversation

@m0nggh
Copy link
Copy Markdown
Contributor

@m0nggh m0nggh commented Apr 10, 2026

TL;DR

Added utilities for converting table data to HTML format for transactional emails and hex encoding/decoding for variable modifiers.

What changed?

Created two new utility modules:

  1. format-table-variable.ts - Converts table data from execution steps into HTML tables for email compatibility:

    • Validates table data structure with proper TypeScript interfaces
    • Supports column selection through selectedColumnIds option
    • Generates HTML with inline CSS styling (alternating row colors, borders)
    • Includes XSS protection through HTML escaping
    • Returns structured success/error results with detailed error messages
  2. hex-encoding.ts - Provides hex encoding/decoding functions for variable modifiers:

    • hexEncode() converts UTF-8 strings to hexadecimal representation
    • hexDecode() converts hex strings back to UTF-8
    • Designed for safe regex parsing of table variable syntax like table:col1,col2

How to test?

  1. Table formatting: Import formatTable and test with sample table data containing rows and columns arrays
  2. Column selection: Test with selectedColumnIds option to verify column filtering works correctly
  3. Error handling: Test with invalid data structures, missing columns, or empty column lists
  4. Hex encoding: Test hexEncode('table:col1,col2') and hexDecode() with the resulting hex string

Why make this change?

These utilities enable table variable functionality in transactional emails by providing a robust way to convert execution step data into properly formatted HTML tables, while the hex encoding ensures safe and predictable parsing of variable modifiers in email templates.

Copy link
Copy Markdown
Contributor Author

m0nggh commented Apr 10, 2026


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.

@m0nggh m0nggh marked this pull request as ready for review April 10, 2026 13:13
@m0nggh m0nggh requested a review from a team as a code owner April 10, 2026 13:13
@m0nggh m0nggh changed the title add helper functions PLU-591: [show-multiple-rows]: add helper functions Apr 10, 2026
@linear
Copy link
Copy Markdown

linear bot commented Apr 10, 2026

@m0nggh m0nggh changed the title PLU-591: [show-multiple-rows]: add helper functions PLU-591: [show-multiple-rows-1]: add helper functions Apr 10, 2026
@m0nggh m0nggh force-pushed the feat/find-multiple-rows/table-var-format-utility branch 2 times, most recently from ed039e8 to 6cc7c10 Compare April 11, 2026 02:11
@m0nggh m0nggh force-pushed the feat/find-multiple-rows/table-var-format-utility branch from 6cc7c10 to 7e46416 Compare April 15, 2026 02:47
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.

1 participant