Skip to content

feat(checkout): CHECKOUT-10226 Show Placeholder for Extra Dropdown Field#3162

Merged
bc-peng merged 2 commits into
masterfrom
CHECKOUT-10226
Jul 16, 2026
Merged

feat(checkout): CHECKOUT-10226 Show Placeholder for Extra Dropdown Field#3162
bc-peng merged 2 commits into
masterfrom
CHECKOUT-10226

Conversation

@bc-peng

@bc-peng bc-peng commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What/Why?

Add a clear placeholder to help users select an option from the extra-field dropdown.

Rollout/Rollback

Revert.

Testing

Existing B2B checkout

Screenshot 2026-07-16 at 14 54 49

New Extra Dropdown Field on OOPC

Address

Screenshot 2026-07-16 at 15 15 16

Order

Screenshot 2026-07-16 at 14 59 09

Note

Low Risk
UI-only placeholder behavior for B2B dropdowns plus a dependency bump; the payment test change aligns with SDK response shape and does not alter production payment logic in this diff.

Overview
Adds a localized "Please Select" first option for B2B extra-field dropdowns on address forms and order extra fields at payment, via common.please_select_text and DynamicFormField placeholders in AddressForm and OrderExtraFieldsFieldset.

Bumps @bigcommerce/checkout-sdk to ^1.942.2 and updates a payment integration test mock so order-submit responses expose B2B address IDs under order.b2bMetadata instead of b2bContext.

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

@bc-peng
bc-peng requested review from a team as code owners July 16, 2026 05:29

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Touching this file in order to support the SDK's interface changes.

Comment on lines +144 to +147
if (isExtraField(field) && field.fieldType === DynamicFormFieldType.DROPDOWN) {
return language.translate('common.please_select_text');
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we see any issues in fixing this for custom fields as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Custom fields seem fine as they require a placeholder value(Instructional Text). I must have missed this.
image
image

Comment on lines +124 to +130
it('does not render placeholder for custom dropdown field', () => {
renderAddressFormComponent({ formFields });

expect(screen.getByText('Custom dropdown')).toBeInTheDocument();
expect(screen.queryByText('Please Select')).not.toBeInTheDocument();
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we get rid of this test then?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I say because this feels like custom dropdown will not have placeholder, while we know it will always have a placeholder regardless, not just this placeholder

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agree. Removed. b78e206

@bc-peng
bc-peng merged commit 6d8d567 into master Jul 16, 2026
17 checks passed
@bc-peng
bc-peng deleted the CHECKOUT-10226 branch July 16, 2026 06:30
@bc-launchbay

Copy link
Copy Markdown

checkout-js deployed to Integration US
success 20260716064304 by Launchbay

@bc-launchbay

Copy link
Copy Markdown

checkout-js deployed to Staging US
success 20260716064304 by Launchbay

@github-actions

Copy link
Copy Markdown

⚡️ Lighthouse results

🖥️ Desktop:

Category Score
🟢 Performance 96
🟢 Accessibility 90
🟠 Best practices 78

📱 Mobile:

Category Score
🟠 Performance 75
🟢 Accessibility 90
🟠 Best practices 78

@bc-launchbay

Copy link
Copy Markdown

checkout-js deployed to Production US
success 20260716064304 by Launchbay

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