Skip to content

feat(contractor-onboarding) - improve pdf viewer#697

Merged
gabrielseco merged 11 commits intomainfrom
improve-react-pdf
Jan 7, 2026
Merged

feat(contractor-onboarding) - improve pdf viewer#697
gabrielseco merged 11 commits intomainfrom
improve-react-pdf

Conversation

@gabrielseco
Copy link
Collaborator

@gabrielseco gabrielseco commented Jan 7, 2026

Details

Improve the contract_preview flow by putting the UI data in the json-schema, that way everything can be controlled from the outside

Demo

Demo.-.pdf.contractor.onboarding.mp4

How to use

You can override the contract_preview different components as they're part of the schema

<ContractorOnboardingFlow
              render={OnBoardingRender}
              employmentId={employmentId}
              externalId={externalId}
              initialValues={{
                pricing_plan: {
                  subscription:
                    'urn:remotecom:resource:product:contractor:standard:monthly',
                },
              }}
              options={{
                jsfModify: {
                  contract_details: {
                    fields: {
                      'payment_terms.payment_terms_type': {
                        'x-jsf-presentation': {
                          Component: (props: JSFCustomComponentProps) => (
                            <Switcher {...props} />
                          ),
                        },
                      },
                    },
                  },
                  contract_preview: {
                    fields: {
                      contract_preview_header: {
                        'x-jsf-presentation': {
                          Component: (props: JSFCustomComponentProps) => (
                            <div>Hello header</div>
                          ),
                        },
                      },
                      contract_preview_statement: {
                        'x-jsf-presentation': {
                          Component: (props: ContractPreviewStatementProps) => (
                            <div>
                              Hello statement{' '}
                              {props.reviewCompleted ? 'true' : 'false'}
                            </div>
                          ),
                        },
                      },
                    },
                  },
                },
              }}
            />

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 174.8 kB 172.11 kB +2.69 kB (+1.6%) 🔴
Total (raw) 461.07 kB 455.7 kB +5.37 kB (+1.2%) 🔴
CSS (gzip) 16.5 kB 16.46 kB +41 B (+0.2%) 🔴
CSS (raw) 89.63 kB 89.35 kB +282 B (+0.3%) 🔴

Size Limits

  • ✅ Total gzipped: 174.8 kB / 180 kB (97.1%)
  • ✅ Total raw: 461.07 kB / 500 kB (92.2%)
  • ✅ CSS gzipped: 16.5 kB / 25 kB (66.0%)

Largest Files (Top 5)

  1. chunk-CR7AIZKA.js - 12.37 kB (0 B (0%))
  2. styles.css - 8.25 kB (+21 B (+0.3%))
  3. index.css - 8.25 kB (+20 B (+0.2%))
  4. index.js - 5.63 kB (+28 B (+0.5%))
  5. chunk-T6Q7IALZ.js - 5.25 kB (0 B (0%))
View All Files (274 total)
File Size (gzip) Change
chunk-CR7AIZKA.js 12.37 kB 0 B (0%)
styles.css 8.25 kB +21 B (+0.3%)
index.css 8.25 kB +20 B (+0.2%)
index.js 5.63 kB +28 B (+0.5%)
chunk-T6Q7IALZ.js 5.25 kB 0 B (0%)
chunk-WAG67DRI.js 4.07 kB 0 B (0%)
chunk-EF3YRMTP.js 3.26 kB new
chunk-Q2XGTGUQ.js 3.26 kB 0 B (0%)
chunk-5XTESWDF.js 3.21 kB new
chunk-HRG5MSVG.js 3.2 kB 0 B (0%)

✅ Bundle size check passed

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Deploy preview for remote-flows-example-app ready!

✅ Preview
https://remote-flows-example-2c76rwga1-remotecom.vercel.app

Built with commit 9f7e2c9.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

Deploy preview for remote-flows ready!

✅ Preview
https://remote-flows-axqwp9cn5-remotecom.vercel.app

Built with commit 9f7e2c9.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

npm warn exec The following package was not found and will be installed: tsx@4.21.0

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 87.39% 87.28% +0.10% 🟢
Statements 87.02% 86.92% +0.10% 🟢
Functions 83.47% 83.26% +0.21% 🟢
Branches 78.57% 78.45% +0.13% 🟢

Detailed Breakdown

Lines Coverage
  • Covered: 2771 / 3171
  • Coverage: 87.39%
  • Change: +0.10% (32 lines)
Statements Coverage
  • Covered: 2823 / 3244
  • Coverage: 87.02%
  • Change: +0.10% (32 statements)
Functions Coverage
  • Covered: 798 / 956
  • Coverage: 83.47%
  • Change: +0.21% (12 functions)
Branches Coverage
  • Covered: 1764 / 2245
  • Coverage: 78.57%
  • Change: +0.13% (17 branches)

✅ Coverage check passed

@remotecom remotecom changed the title Improve react pdf feat(contractor-onboarding) - improve pdf viewer Jan 7, 2026
@remotecom remotecom requested a review from cammellos January 7, 2026 15:55
@remotecom remotecom marked this pull request as ready for review January 7, 2026 15:55
@gabrielseco gabrielseco merged commit b2571b7 into main Jan 7, 2026
6 checks passed
@gabrielseco gabrielseco deleted the improve-react-pdf branch January 7, 2026 18:19
@gabrielseco gabrielseco mentioned this pull request Jan 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.

3 participants