Skip to content

fix(core): TRAC-275 align formField.required with field.required for checkbox-group#3005

Merged
mfaris9 merged 4 commits into
canaryfrom
TRAC-275
May 8, 2026
Merged

fix(core): TRAC-275 align formField.required with field.required for checkbox-group#3005
mfaris9 merged 4 commits into
canaryfrom
TRAC-275

Conversation

@mfaris9

@mfaris9 mfaris9 commented May 7, 2026

Copy link
Copy Markdown
Contributor

What/Why?

The checkbox-group branch in DynamicForm's schema builder does not call .optional() for non-required fields. This causes formField.required = true even when BigCommerce reports isRequired: false, putting field.required and formField.required out of sync for this one field type. No visible UI bug today (the render reads field.required directly), but could cause an issue down the line.

Refs: TRAC-275

Testing

Logged field.required vs formField.required for each rendered field on /register to verify the fix.

Before:

[DynamicFormField] {
name: 'customCustomer_Newsletter Topics (O)',
type: 'checkbox-group',
label: 'Newsletter Topics (O)',
'field.required': false,
'formField.required': true,
match: false
}

After:

[DynamicFormField] {
name: 'customCustomer_Newsletter Topics (O)',
type: 'checkbox-group',
label: 'Newsletter Topics (O)',
'field.required': false,
'formField.required': false,
match: true
}

Regression-tested the registration page with four custom fields added in the BC control panel. Field labels marked (O) are configured as optional in BC; (R) is configured as required. All rendered and submitted as expected. Screenshot attached.

Screenshot 2026-05-07 at 4 26 30 PM

Migration

No migration required. This was a simple internal bug fix.

@mfaris9
mfaris9 requested a review from a team as a code owner May 7, 2026 20:47
@changeset-bot

changeset-bot Bot commented May 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a90d3e8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment May 7, 2026 10:09pm

Request Review

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from 24cc310 (2026-05-07).

No bundle size changes detected.

@mfaris9 mfaris9 changed the title fix(core): align formField.required with field.required for checkbox-group fix(core): TRAC-275 align formField.required with field.required for checkbox-group May 7, 2026
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 90 92 91 95

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 79 97 72 85
Accessibility 95 95 95 95
Best Practices 100 100 95 100
SEO 88 88 100 88

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 3.1 s 2.5 s 4.2 s 4.3 s
CLS 0.04 0 0.037 0
FCP 1.2 s 1.2 s 1.2 s 1.2 s
TBT 0 ms 20 ms 20 ms 0 ms
Max Potential FID 50 ms 80 ms 60 ms 50 ms
Time to Interactive 3.3 s 3.4 s 6.1 s 4.3 s

Full Unlighthouse report →

Comment thread core/vibes/soul/form/dynamic-form/schema.ts Outdated
@mfaris9
mfaris9 added this pull request to the merge queue May 8, 2026
Merged via the queue into canary with commit 37e0a7c May 8, 2026
18 of 19 checks passed
@mfaris9
mfaris9 deleted the TRAC-275 branch May 8, 2026 15:31
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