Skip to content

Collect country when subscribing to product updates during setup - #10513

Merged
nopcoder merged 1 commit into
masterfrom
chore/setup-country
Aug 2, 2026
Merged

Collect country when subscribing to product updates during setup#10513
nopcoder merged 1 commit into
masterfrom
chore/setup-country

Conversation

@nopcoder

@nopcoder nopcoder commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Problem

The setup form asks users to subscribe to product and feature updates but captures no region, so subscribers cannot be segmented by geography.

This adds a required country selector that appears once the subscribe box is checked, and carries the value through to the comm-prefs metadata and the stats sender alongside the existing name/email/company fields. The 251 country names are copied verbatim from the marketing master spreadsheet picklist.

Screenshot

The country selector appears only after the updates checkbox is ticked, and is required before setup can be submitted:

Setup screen with the country selector

Prompt log

the setup ui suggest to subscribe for updates. when user selected to subscribe we need would like to have a Country selector and post this information. copy the list of countries into the code from Master Spreadsheet - Country Picklist Values.csv

Agent copied all 251 picklist values verbatim into countries.ts and plumbed country through swagger, the regenerated SDKs, the KV metadata and the stats collector. Worth noting the collector does a direct struct conversion CommPrefsData(CommPrefs), so the field had to land at the same position in both. No server-side validation of the value, matching companyName today.

the country web ui selection takes all the dialog width. based on best practices, set better width for it.

Measured in the browser rather than guessing: the longest name ("South Georgia and the South Sandwich Islands") needs 387px including padding and caret, and md={6} gives 434px — so half width fits every entry and matches the First/Last name fields already in the form.

it can be side by side with the subscription message?
undo my last request - leave it under the subscription

Tried side by side; the checkbox label is long enough that the select collapsed to ~130px below ~1400px viewports. Reverted to the stacked half-width layout.

Related Issue

Closes #10512

Test plan

  • make lint — golangci-lint 0 issues, eslint clean
  • make test-go — full suite, 0 failures
  • make gen-code produces no further diff (generated code in sync)
  • webui npm run build, npm test (72 tests), prettier check
  • e2e against a live lakeFS: setup-validation 7/7 (incl. new country-required case) and common-setup full setup submission
  • Verified country persisted to KV (base64 United States) after a real setup
  • Checked rendering at 1440px and 820px viewports; all 251 names display untruncated

The setup form asks users to subscribe to product and feature updates but
captures no region, so subscribers cannot be segmented by geography. Add a
required country selector that appears once the subscribe box is checked,
and carry the value through to the comm-prefs metadata and stats sender
alongside the existing name/email/company fields.

> the setup ui suggest to subscribe for updates. when user selected to
> subscribe we need would like to have a Country selector and post this
> information. copy the list of countries into the code from
> Master Spreadsheet - Country Picklist Values.csv
Agent copied all 251 picklist values verbatim into countries.ts and plumbed
`country` through swagger, the regenerated SDKs, the KV metadata and the
stats collector. Worth noting the collector does a direct struct conversion
CommPrefsData(CommPrefs), so the field had to land at the same position in
both. No server-side validation of the value, matching companyName.

> the country web ui selection takes all the dialog width. based on best
> practices, set better width for it.
Measured in the browser rather than guessing: the longest name ("South
Georgia and the South Sandwich Islands") needs 387px including padding and
caret, and md={6} gives 434px, so half width fits every entry and matches
the First/Last name fields already in the form.

> it can be side by side with the subscription message?
> undo my last request - leave it under the subscription
Tried it side by side; the checkbox label is long enough that the select
collapsed to ~130px below ~1400px viewports. Reverted to the stacked
half-width layout.
@nopcoder nopcoder added include-changelog PR description should be included in next release changelog mostly-ai labels Aug 2, 2026
@nopcoder nopcoder self-assigned this Aug 2, 2026
@github-actions github-actions Bot added area/API Improvements or additions to the API area/testing Improvements or additions to tests area/UI Improvements or additions to UI area/auth IAM, authorization, authentication, audit, AAA, and integrations with all those area/sdk/python labels Aug 2, 2026
nopcoder added a commit to nopcoder/lakeFS that referenced this pull request Aug 2, 2026
@nopcoder
nopcoder requested a review from a team August 2, 2026 13:03
@@ -0,0 +1,255 @@
// Country picklist values, copied verbatim from the marketing master spreadsheet.
// Order matches the source sheet; keep it in sync when the picklist changes.
export const COUNTRIES: string[] = [

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.

Does the user also have the option to select something which is not here?

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.

Nope - closed list.

@nopcoder
nopcoder merged commit 0205987 into master Aug 2, 2026
137 of 140 checks passed
@nopcoder
nopcoder deleted the chore/setup-country branch August 2, 2026 13:41
nopcoder added a commit that referenced this pull request Aug 3, 2026
The country selector added in #10513 only appeared once the user ticked
"I'd like to receive product and feature updates", so country was captured
for subscribers only. We want the region for every install, regardless of
whether the user opts in to updates.

Move the selector out of the subscribe-gated block and place it between the
email and company name fields. It is now shown and required for everyone,
and the selected value is sent whether or not the user subscribed.

> apply a fix to the country field - we would like to show and accept the
> 'country' field; no matter if the user subscribed or not. place the field
> after the details field, before the subscribe checkbox and make sure we
> send the selected.
Agent moved the field and dropped the `checked &&` from the validation
gate. It also removed the setCountry('') reset in handleChecksChange, which
only existed because the field used to be hidden - leaving it would have
silently wiped a chosen country when toggling the checkbox off. No backend
change was needed: the Setup and SetupCommPrefs handlers already read
body.Country independent of featureUpdates. Verified by capturing the real
request with the box unchecked ("featureUpdates":false,"country":"Japan")
and confirming the value reached the KV store.

> place the country field between the Email and the Company name fields.
Straight reorder of the JSX rows. Also reordered the e2e page object to
fill in the same order and corrected a stale comment that described the
old position.
nopcoder added a commit that referenced this pull request Aug 3, 2026
The country selector added in #10513 only appeared once the user ticked
"I'd like to receive product and feature updates", so country was captured
for subscribers only. We want the region for every install, regardless of
whether the user opts in to updates.

Move the selector out of the subscribe-gated block and place it between the
email and company name fields. It is now shown and required for everyone,
and the selected value is sent whether or not the user subscribed.

> apply a fix to the country field - we would like to show and accept the
> 'country' field; no matter if the user subscribed or not. place the field
> after the details field, before the subscribe checkbox and make sure we
> send the selected.
Agent moved the field and dropped the `checked &&` from the validation
gate. It also removed the setCountry('') reset in handleChecksChange, which
only existed because the field used to be hidden - leaving it would have
silently wiped a chosen country when toggling the checkbox off. No backend
change was needed: the Setup and SetupCommPrefs handlers already read
body.Country independent of featureUpdates. Verified by capturing the real
request with the box unchecked ("featureUpdates":false,"country":"Japan")
and confirming the value reached the KV store.

> place the country field between the Email and the Company name fields.
Straight reorder of the JSX rows, with the e2e page object filling in the
same order.

> instead of the two tests just verify that 'country' is required like
> email. 'country' is not optional and remove also the code comment.
Collapsed the country tests into a single "country is required" case
mirroring the email one, and dropped the conditional around selectOption in
the page object so country is always selected.
nopcoder added a commit that referenced this pull request Aug 3, 2026
The country selector added in #10513 only appeared once the user ticked
"I'd like to receive product and feature updates", so country was captured
for subscribers only. We want the region for every install, regardless of
whether the user opts in to updates.

Move the selector out of the subscribe-gated block and place it between the
email and company name fields. It is now shown and required for everyone,
and the selected value is sent whether or not the user subscribed.

> apply a fix to the country field - we would like to show and accept the
> 'country' field; no matter if the user subscribed or not. place the field
> after the details field, before the subscribe checkbox and make sure we
> send the selected.
Agent moved the field and dropped the `checked &&` from the validation
gate. It also removed the setCountry('') reset in handleChecksChange, which
only existed because the field used to be hidden - leaving it would have
silently wiped a chosen country when toggling the checkbox off. No backend
change was needed: the Setup and SetupCommPrefs handlers already read
body.Country independent of featureUpdates. Verified by capturing the real
request with the box unchecked ("featureUpdates":false,"country":"Japan")
and confirming the value reached the KV store.

> place the country field between the Email and the Company name fields.
Straight reorder of the JSX rows, with the e2e page object filling in the
same order.

> instead of the two tests just verify that 'country' is required like
> email. 'country' is not optional and remove also the code comment.
Collapsed the country tests into a single "country is required" case
mirroring the email one, and dropped the conditional around selectOption in
the page object so country is always selected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/API Improvements or additions to the API area/auth IAM, authorization, authentication, audit, AAA, and integrations with all those area/sdk/python area/testing Improvements or additions to tests area/UI Improvements or additions to UI include-changelog PR description should be included in next release changelog mostly-ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capture country when users subscribe to product updates during setup

2 participants