metatroncubeswdev a2c78d703f
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
feat: close DS study coverage gaps (inventory exclusion, live checkout re-validation, per-day cap, payment fn, checkout ext)
Audited the implementation against DS_Delivery_Date_Time_App_Study.docx and
closed the actionable gaps (see IMPLEMENTATION_REVIEW_2026-09-04.md).

Core (code + unit tests, 156 green):
- Wire excludeLocationsWithoutStock into resolveAvailabilityRequest; widget
  now sends variantIds so inventory-based location exclusion actually runs.
- Live slot re-validation at checkout: new checkout-snapshot.server.ts writes
  a shop-metafield capacity snapshot; validation-slot's evaluateCheckout
  rejects a complete selection that has since filled / blacked out / closed /
  hit the daily cap / left the schedule. Refreshed on order webhooks and
  slot/blackout/location/enforcement edits.
- Scopable checkout enforcement: Shop.enforcementMode (all|tagged|off) +
  enforcementTag, new app.settings.tsx admin page, honoured via the snapshot.
- Per-day order cap: Location.dailyOrderCap threaded through getAvailability
  (dailyCap + consumedPerDate); admin field on the location screen.
- Product-rule slot blocking: ProductRule.blockedStartMins, unioned in
  resolveProductRuleConstraints, enforced in the engine and resolveHoldRequest;
  admin field on the product rules screen.
- Product-page placement: product-availability.liquid block + widget
  data-mode="preview" (read-only earliest-date line).
- Second locale: datetime-widget fr.json / fr.schema.json.
- Migration 20260904120000_review_gaps (apply with prisma migrate deploy).

New Functions (source + unit tests; need `shopify app deploy` to ship):
- extensions/payment-customization: cart.payment-methods.transform.run — hides
  cash-on-delivery / pay-in-store gateways on SHIPPING orders.
- extensions/checkout-datetime/src: restored from a gitignored dist-only state
  — Plus native picker + Thank you / Order status confirmation blocks, all
  calling the existing checkout.scheduling.* routes (one capacity pool).
  tsconfig ships checkJs:false pending reconciliation with live checkout types.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 01:31:02 -04:00

122 lines
2.2 KiB
CSS

.dd-widget {
display: flex;
flex-direction: column;
gap: 0.75rem;
font-family: inherit;
min-height: 3.5rem; /* reserves space before JS renders content, to avoid layout shift */
}
/* Cart-page auto-injection (datetime-widget.ts's maybeAutoPlaceOnCart) lands
the widget as a sibling immediately before the theme's own Checkout
button, which can be inside a narrow flex/inline-sized wrapper — force
full width and give it breathing room so it doesn't get visually
squeezed regardless of that wrapper's own layout rules. */
.dd-widget--cart-injected {
width: 100%;
margin-block: 1rem;
}
.dd-widget__heading {
font-size: 1rem;
font-weight: 600;
margin: 0;
}
.dd-widget__row {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.dd-widget__pill {
border: 1px solid currentColor;
border-radius: 999px;
background: transparent;
padding: 0.4rem 0.9rem;
font-size: 0.875rem;
cursor: pointer;
color: inherit;
}
.dd-widget__pill[aria-pressed="true"] {
background: currentColor;
color: Canvas;
}
.dd-widget__status {
font-size: 0.875rem;
opacity: 0.75;
margin: 0;
}
.dd-widget__confirmation {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 0.9rem;
}
.dd-widget__link {
background: none;
border: none;
padding: 0;
text-decoration: underline;
cursor: pointer;
color: inherit;
font: inherit;
}
.dd-widget__input {
border: 1px solid currentColor;
border-radius: 4px;
background: transparent;
padding: 0.4rem 0.75rem;
font-size: 0.875rem;
color: inherit;
font-family: inherit;
min-width: 10rem;
}
.dd-widget__map {
width: 100%;
height: 220px;
border-radius: 8px;
overflow: hidden;
}
.dd-order-confirmation {
border: 1px solid currentColor;
border-radius: 8px;
padding: 0.75rem 1rem;
display: inline-flex;
flex-direction: column;
gap: 0.15rem;
}
.dd-order-confirmation__label {
font-size: 0.75rem;
opacity: 0.75;
margin: 0;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.dd-order-confirmation__value {
font-size: 1rem;
font-weight: 600;
margin: 0;
}
.dd-widget__preview {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.dd-widget__preview-item {
font-size: 0.9rem;
}