Skip to content

Pbyr 3771 replace transform components with our own implementation#979

Draft
gabrielseco wants to merge 20 commits intomainfrom
pbyr-3771-replace-transform-components-with-our-own-implementation
Draft

Pbyr 3771 replace transform components with our own implementation#979
gabrielseco wants to merge 20 commits intomainfrom
pbyr-3771-replace-transform-components-with-our-own-implementation

Conversation

@gabrielseco
Copy link
Copy Markdown
Collaborator

@gabrielseco gabrielseco commented Apr 29, 2026

https://www.loom.com/share/f1fd14d923f34932b2bdcc1da74cdeb5?focus_title=1&muted=1&from_recorder=1

Loom explanation of how everything works

I will slice this PR to have smaller batches but if you want to know how everything will look / fit, there's the loom to explain it and see the demo

Note

Medium Risk
Introduces an opt-in rendering path that intentionally receives unsanitized HTML; incorrect partner implementations could create XSS risk even though the default behavior remains sanitized. Changes touch shared form rendering and many field components, so regressions would affect broad UI surface area.

Overview
Adds an optional transformHtmlToComponents prop to RemoteFlows and wires it through FormFieldsContext (via new useTransformer) so field descriptions can be rendered as custom React components instead of sanitized HTML.

Updates FormDescription and FieldSetField to use the transformer when present (via a new internal transformDescription helper), and injects transformHtml into fieldData for multiple field components so custom partner components can reuse the same transformation.

Refactors TelField type exports (TelFieldProps vs TelFieldDataProps) and updates/extends unit tests to mock useTransformer and cover transformer vs sanitization behavior; also bumps the example onboarding schema version for Germany and adds a TODO/guide markdown for implementing an Accordion transformer example.

Reviewed by Cursor Bugbot for commit 95136d1. Bugbot is set up for automated code reviews on this repo. Configure here.

@gabrielseco
Copy link
Copy Markdown
Collaborator Author

bugbot run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 212.05 kB 211.33 kB +720 B (+0.3%) 🔴
Total (raw) 573.58 kB 570.58 kB +3 kB (+0.5%) 🔴
CSS (gzip) 20.83 kB 20.69 kB +142 B (+0.7%) 🔴
CSS (raw) 108.49 kB 107.95 kB +538 B (+0.5%) 🔴

Size Limits

  • ✅ Total gzipped: 212.05 kB / 250 kB (84.8%)
  • ✅ Total raw: 573.58 kB / 600 kB (95.6%)
  • ✅ CSS gzipped: 20.83 kB / 25 kB (83.3%)

Largest Files (Top 5)

  1. chunk-EDQSZFYJ.js - 13.94 kB (new)
  2. styles.css - 10.42 kB (+71 B (+0.7%))
  3. index.css - 10.42 kB (+71 B (+0.7%))
  4. index.js - 6.1 kB (+44 B (+0.7%))
  5. chunk-TNQKP2XT.js - 5.89 kB (0 B (0%))
View All Files (313 total)
File Size (gzip) Change
chunk-EDQSZFYJ.js 13.94 kB new
styles.css 10.42 kB +71 B (+0.7%)
index.css 10.42 kB +71 B (+0.7%)
index.js 6.1 kB +44 B (+0.7%)
chunk-TNQKP2XT.js 5.89 kB 0 B (0%)
chunk-GSIZXQA6.js 5.81 kB new
chunk-2YRN77W7.js 4.62 kB new
chunk-3G5CQ3GJ.js 4.29 kB new
chunk-EESP5RLB.js 4.06 kB new
chunk-BOLJOAWP.js 3.73 kB new

✅ Bundle size check passed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 89.99% 89.95% +0.04% 🟢
Statements 89.66% 89.62% +0.05% 🟢
Functions 87.72% 87.69% +0.03% 🟢
Branches 80.03% 80.07% -0.04% 🔴

Detailed Breakdown

Lines Coverage
  • Covered: 3677 / 4086
  • Coverage: 89.99%
  • Change: +0.04% (27 lines)
Statements Coverage
  • Covered: 3738 / 4169
  • Coverage: 89.66%
  • Change: +0.05% (27 statements)
Functions Coverage
  • Covered: 1000 / 1140
  • Coverage: 87.72%
  • Change: +0.03% (3 functions)
Branches Coverage
  • Covered: 2268 / 2834
  • Coverage: 80.03%
  • Change: -0.04% (2 branches)

✅ Coverage check passed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 29, 2026

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-oz65jwizm-remotecom.vercel.app
Latest Commit:bfef372
Inspect:View deployment

Deployed with vercel-action

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 95136d1. Configure here.

Comment thread HTML_TRANSFORMER_TODO.md

**Status**: Ready for example implementation and optional documentation.
**Last Updated**: April 29, 2026
**Next Action**: Create Accordion example in example app
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Development TODO file accidentally committed to repository

Medium Severity

HTML_TRANSFORMER_TODO.md is an internal development tracking document with task checklists, estimated effort, step-by-step implementation instructions, and a "Last Updated: April 29, 2026" timestamp. This file is not project documentation — it's a working scratchpad that was accidentally included in the PR and doesn't belong in the repository.

Fix in Cursor Fix in Web

Triggered by project rule: Code Review Guidelines

Reviewed by Cursor Bugbot for commit 95136d1. Configure here.

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