Skip to content

feat(fields) - add transformHtml prop to let custom components transform html to components#992

Merged
gabrielseco merged 10 commits intomainfrom
fields-transformer
May 5, 2026
Merged

feat(fields) - add transformHtml prop to let custom components transform html to components#992
gabrielseco merged 10 commits intomainfrom
fields-transformer

Conversation

@gabrielseco
Copy link
Copy Markdown
Collaborator

@gabrielseco gabrielseco commented May 4, 2026

Note

Low Risk
Low risk additive change that threads an optional transformHtml callback through field metadata; minor refactors to EmailField/NumberField prop wiring could affect custom components if they relied on the previous fieldData shape.

Overview
Custom form field wrappers now pull transformHtml from context via useTransformer() and pass it through to custom field components as part of fieldData, enabling components to render HTML descriptions as React nodes.

This updates all major field types (TextField, TextAreaField, Select/MultiSelect, RadioGroup, Checkbox, Country, DatePicker, FileUpload, Tel, WorkSchedule) and extends FieldDataProps with an optional transformHtml?: (html: string) => React.ReactNode. EmailField and NumberField were slightly refactored to construct a custom*FieldProps object for fieldData while preserving onChange forwarding.

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

@gabrielseco gabrielseco changed the base branch from main to fieldsets-transformer May 4, 2026 09:07
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 211.94 kB 211.85 kB +95 B (+0.0%) 🔴
Total (raw) 572.97 kB 572.56 kB +406 B (+0.1%) 🔴
CSS (gzip) 20.69 kB 20.69 kB 0 B (0%) 🟢
CSS (raw) 107.95 kB 107.95 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 211.94 kB / 250 kB (84.8%)
  • ✅ Total raw: 572.97 kB / 600 kB (95.5%)
  • ✅ CSS gzipped: 20.69 kB / 25 kB (82.8%)

Largest Files (Top 5)

  1. chunk-BQ5YDUNS.js - 13.99 kB (0 B (0%))
  2. styles.css - 10.35 kB (0 B (0%))
  3. index.css - 10.35 kB (0 B (0%))
  4. index.js - 6.08 kB (+10 B (+0.2%))
  5. chunk-TNQKP2XT.js - 5.89 kB (0 B (0%))
View All Files (313 total)
File Size (gzip) Change
chunk-BQ5YDUNS.js 13.99 kB 0 B (0%)
styles.css 10.35 kB 0 B (0%)
index.css 10.35 kB 0 B (0%)
index.js 6.08 kB +10 B (+0.2%)
chunk-TNQKP2XT.js 5.89 kB 0 B (0%)
chunk-L23RCIGG.js 5.81 kB new
chunk-53H4OKEF.js 4.63 kB new
chunk-67T5LPKP.js 4.29 kB new
chunk-RDKCWDI2.js 4.06 kB 0 B (0%)
chunk-ENXNZM2A.js 3.73 kB new

✅ Bundle size check passed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 90.00% 89.97% +0.04% 🟢
Statements 89.68% 89.64% +0.04% 🟢
Functions 87.70% 87.70% 0%
Branches 80.00% 80.00% 0%

Detailed Breakdown

Lines Coverage
  • Covered: 3674 / 4082
  • Coverage: 90.00%
  • Change: +0.04% (15 lines)
Statements Coverage
  • Covered: 3735 / 4165
  • Coverage: 89.68%
  • Change: +0.04% (15 statements)
Functions Coverage
  • Covered: 998 / 1138
  • Coverage: 87.70%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 2268 / 2835
  • Coverage: 80.00%
  • Change: 0% (0 branches)

✅ Coverage check passed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Deploy preview for remote-flows ready!

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

Deployed with vercel-action

@gabrielseco
Copy link
Copy Markdown
Collaborator Author

bugbot run

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 60764e5. Configure here.

@gabrielseco gabrielseco changed the base branch from fieldsets-transformer to main May 5, 2026 10:13
@gabrielseco gabrielseco merged commit 5054057 into main May 5, 2026
10 checks passed
@gabrielseco gabrielseco deleted the fields-transformer branch May 5, 2026 11:42
@gabrielseco gabrielseco mentioned this pull request May 8, 2026
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