Skip to content

add date pick up option and infer ui extension cdn urls#1405

Merged
wcole1-godaddy merged 1 commit into
mainfrom
support-date-only-pickup
Jul 8, 2026
Merged

add date pick up option and infer ui extension cdn urls#1405
wcole1-godaddy merged 1 commit into
mainfrom
support-date-only-pickup

Conversation

@pbennett1-godaddy

@pbennett1-godaddy pbennett1-godaddy commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds explicit local pickup scheduling modes so checkout can support date-only pickup without relying on missing time slots or legacy pickupWindowInDays behavior.

This introduces a new optional pickupMode value on store operating hours:

  • asap — no date/time selectors; fulfillment uses ASAP behavior.
  • dateOnly — shows a pickup date selector only; no time selector or “No available time slots” warning.
  • dateAndTime — existing scheduled pickup behavior with date + selectable time slots.

Backwards compatibility is preserved: if pickupMode is omitted, checkout keeps the existing behavior where pickupWindowInDays: 0 means ASAP-only and any non-zero window means scheduled date/time
pickup.

This also hardens UI extension script loading by no longer trusting cdnUrl from API responses. Instead, UI extension bundle URLs are derived from the trusted apiHost configured on
GoDaddyProvider.

Changeset

  • Changeset added (docs)

Test Plan

  • Added/updated pickup mode tests covering:

    • legacy pickupWindowInDays: 0 ASAP behavior
    • explicit asap
    • explicit dateOnly
    • explicit dateAndTime
    • date-only availability
    • date-only payload generation
    • timezone handling for date-only and scheduled pickup
    • UI behavior for date-only pickup: date selector shown, time selector hidden, no unavailable-slots warning
  • Added/updated UI extension runtime tests covering:

    • script URLs are derived from apiHost
    • API-provided cdnUrl is ignored
    • runtime loads from the derived CDN URL

Validated with:

pnpm --filter @godaddy/react typecheck                                                                                                                                                                  
pnpm --filter @godaddy/react test -- generate-pickup-time-slots.test.ts build-pickup-payload.test.ts checkout-pickup-selection.test.tsx                                                                 
pnpm --filter @godaddy/react test -- script-url.test.ts dom-bundle-runtime.test.ts target.test.tsx                                                                                                      

For the checkout-api schema changes, validated with:

pnpm --dir /Users/philbennett/Projects/checkout-api/apis/graphql typecheck                                                                                                                              
pnpm --dir /Users/philbennett/Projects/checkout-api/apis/graphql test -- src/schemas/__tests__/sessions.test.ts                                                                                         
pnpm --dir /Users/philbennett/Projects/checkout-api/services/core test -- src/session/__tests__/local-pickup.test.ts                                                                                    

@pbennett1-godaddy pbennett1-godaddy requested a review from a team as a code owner July 7, 2026 14:43
@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b8dd7fe

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

This PR includes changesets to release 2 packages
Name Type
@godaddy/react Patch
nextjs 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

@wcole1-godaddy wcole1-godaddy left a comment

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.

Reviewed locally and approved. Verification run in a detached temp worktree: @godaddy/localizations build, @godaddy/react typecheck, targeted Vitest suites, @godaddy/react build, @godaddy/react lint, and git diff --check.

@wcole1-godaddy wcole1-godaddy merged commit 5a0ed65 into main Jul 8, 2026
3 checks passed
@wcole1-godaddy wcole1-godaddy deleted the support-date-only-pickup branch July 8, 2026 14:59
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