# 0.39.0 (/docs/changelog/0-39-0)



<Callout type="info" title="Native change: iOS app update and tab bar only">
  `@app-brew/app-update` and `@app-brew/tab-bar` change Swift code on iOS.
  Update checks now always get the current App Store version, and the tab bar
  passes touches outside itself through and no longer smears the selected
  icon during the tap animation. These fixes reach an app with its next iOS
  store build. Android has no native changes, and every other change in this
  release is JavaScript only.
</Callout>

## Breaking [#breaking]

These affect only custom code that reads or calls the platform's state slices
directly. App configs and the built-in blocks need no change.

**A closing sheet keeps its modal state until it is dismissed.**
`closeModal()` no longer clears the modal state itself; `modalState.openedModal`
stays set until the sheet reports it has closed, with the new `closing` flag
set in between. Code that reads `openedModal` right after `closeModal()` should
check `closing`. `openBottomSheetModal` now returns a boolean, `false` when the
same modal for the same product is already open.

**Cart calls return only blocking warnings.** The `warning` on a
`cartCreate`, `cartLinesAdd` or `cartLinesUpdate` result no longer carries
discount warnings (codes starting `DISCOUNT`). Discount messages stay on the
cart itself.

**`collectTabScreenIds` from `@gauntlet/types` skips hidden tabs.** Tabs marked
`hide: true` are left out by default. Pass `{ skipHidden: false }` for the old
list.

**`config.enterPreviewMode` takes the theme name as a second argument**, and
`config.refresh` now resolves to a boolean that says whether the refresh
landed.

## New [#new]

**Vertical tab bars.** Set a tabbed screen's `options.tabBar.orientation` to
`vertical` to show the tabs as a sidebar beside the pages instead of above
them. Vertical tabs scroll, switching does not slide, and swiping between pages
is off. The default stays `horizontal`.

**A cap on the total number of items in the cart.** Set `maxCartQuantity` in
the global settings. `maxCartQuantityExclude` (`{ tags, handles }`) leaves
matching products out of the count. Add to cart is blocked at the cap,
quantity selectors stop at what is left, and checkout is refused above it with
the code `MAX_CART_QUANTITY`. `maxCartQuantityMessage` and
`maxCartQuantityCheckoutMessage` set the messages, with a `{{limit}}` token.
`useCartQuantityLeft` returns what is left. With no `maxCartQuantity`, or 0,
there is no cap.

**A navigation can choose its screen transition.** Pass `screenAnimation` in
the route params: `default`, `fade`, `fade_from_bottom`, `flip`, `none`,
`simple_push`, `slide_from_bottom`, `slide_from_right`, `slide_from_left`,
`ios_from_right` or `ios_from_left`. Unknown values are ignored, and the
screen's usual transition returns once it has appeared, so going back looks as
before.

**Your own items between products in a collection grid.** Register a
component for the `plp-grid` slot in `slotRegistry` from `@gauntlet/brewery`.
It receives `{ collectionId, onItems }` and calls `onItems` with
`[{ key, afterProduct, element }]`; each element renders full width on the row
after that product. Search results have no slot. With nothing registered the
grid is unchanged.

**Bold subscriptions.** The subscriptions integration takes `bold` as a
provider, with `accessToken` and an optional `shopIdentifier`. New blocks
manage a subscription in the app: `subscription-list-v2`,
`subscription-details-v2`, and modals to confirm, add a note, and change the
frequency, a future order, the payment method, the shipping method or the
products. A list refetch keeps the list on screen, and detail screens no
longer refetch on mount.

**Xeno loyalty and Qwikcilver gift cards.** Two new packages.
`@gauntlet/xeno` (`registerXenoBlocks`) adds `xeno-points-summary` (available
and pending points, tier and a link button) and `xeno-points-history`.
`@gauntlet/qwickcilver` (`registerQwickcilverBlocks`) adds
`qwickcilver-wallet-balance`, `qwickcilver-add-gift-card`,
`qwickcilver-wallet-history` and `qwickcilver-gift-card-purchase`. A gift card
balance is spent in Shopify checkout. Blocks from both hide for guests.

**Location capture searches less and knows quick-commerce cities.**
`autocompleteMinChars` (default 3) and `autocompleteDebounceMs` (default 600)
stop each keystroke from costing a request. With Ola Maps, a six-digit pincode
leads with that pincode's area. `useIsQcCity()` and `useIsQcExperience()` tell
a block whether the shopper's location is a quick-commerce city, and after
signing in from the picker it reopens on the same screen.

**Haptic on the app-bar cart icon.** Set `options.enableHapticTouch` to `true`
on the cart element; `options.hapticTouchValue` picks the pattern (default
`soft`). Off unless set.

**Navigation arrow icons from config.** `options.icon` on
`single-level-navigation` and `profile-menu` sets the icon at the end of each
row, as an icon id or a remote icon URL. Unset keeps the chevron, and `""`
hides it.

**Two-level navigation titles can be limited to a number of lines.**
`options.titleNumberOfLines` and `options.subNavigationNumberOfLines` end longer
titles with an ellipsis. Unset, titles wrap as before.

**Multi-tier cart goals can fill the current tier by progress.** Set
`options.progressBarOptions.proportionalProgress` to `true` on progress styles
2, 7 and 10. The default keeps the halfway fill.

**Screens can pad for a floating bottom bar.** Set `behavior.padContent: true`
on the bottom bar. When the bar floats (`position: 'absolute'` with a `bottom`
above 0), lists get padding for the bar's height plus `behavior.contentGap`
(default 16), and a screen footer sits above the bar.

**Required title and review fields, and an inline rating error.** Set
`options.requiredFields` on `add-review` to `['title']`, `['body']` or both. A
submit with no rating now shows "Please select a rating" under the stars
instead of a toast, styled by `style.rating.error`.

**Launch screen on newer builds only.** When a minimum build is set for a
platform in Studio, the launch screen shows only on builds above it. With no
value set, it shows on every build.

**Searchtap results can rank by keyword weight.** In the Searchtap settings,
`productWeightage.enabled` with `scoringValues` (for example
`{ "product_type": 20, "title": 5 }`) re-sorts relevance results by keyword
hits per field. Optional: `pageSizeMultiplier` (default 5),
`minResultsToApply` (default 3) and `relevanceSortKeys`. Off by default.

**Yotpo ways to earn can hide campaigns.** Set `hiddenCampaignIds` on
`yotpo-rewards-ways-to-redeem` to leave out campaigns by id, such as ones
marked hidden in Yotpo. The heading hides when nothing is left.

## Changed [#changed]

**Add to bag gives haptic feedback, on by default.** The add-to-cart button
taps (`impactMedium`) when a variant is added and buzzes (`notificationError`)
when the add fails. It also fires on Android with system touch feedback off.
Set `options.enableHapticTouch` to `false` on the block's add-to-cart options to
turn it off, or `options.hapticTouchValue` to choose another pattern.

**The product quantity limit counts per variant.** When a variant is known,
the per-product limit from 0.38.0 now counts that variant's cart lines, not
every line of the product, so a product capped at 2 allows 2 of each size. Add
to cart, quantity selectors and `cart-list-v2` all count this way.
`getProductQuantityInCart` takes an optional `variantId`.

**Firebase sets the GA4 user ID for signed-in customers.** Both trackers set it
to the base64-encoded email of the signed-in customer, or the Appbrew instance
ID when there is no usable email, the same value the server-side purchase
sends, so GA4 can join the two. Guests are left unset, and it is cleared right
after the `logout` event. Before, the app set no user ID.

**Add-to-carts inside a What a More reel are marked.** The video id on the
cart line gets `:direct` appended when the product is added inside the reel it
is linked to. On by default; set `whatAMore.markDirectAtc` to `false` in the
global settings to keep the plain id.

**WebEngage events carry the screen they happened on.** Both trackers call
`screen()` before `PAGE_VIEW`, so events right after a navigation no longer
carry the previous screen's name. Reports filtered on Screen Name will shift.

**Bitespeed receives no events until the shopper is identified.** Its SDK
throws on events before identify, so the tracker now skips them for guests.

**Purands chat knows the Collections and Account tabs.** They send
`/collections` and `/account` as page context. Screens with no web
counterpart now send an empty context instead of keeping the previous page.

**Signing out keeps a GPS or searched location.** Location capture now clears
the captured location and quick-commerce flags on sign-out only when the
location came from the address book or none was picked.

**English-only input applies on more forms.**
`validationSettings.enforceEnglishOnly` now works on sign-up, OTP sign-up, the
address form and profile edit, which ignored it before. Apps that already set
it will see non-ASCII characters stripped on those forms.

**Keyboard and bottom bar padding no longer add up.** A screen with a bottom
bar inset pads for the keyboard or the bar, whichever applies, not both.

## Fixed [#fixed]

**A sheet opened while another closes now opens.** It is queued and shown once
the close finishes. Android hardware back closes the open sheet instead of
navigating underneath it.

**Hidden bottom-bar tabs open.** A tab marked `hide: true` and reached by a
link no longer redirects away from itself, and the bar still shows on it.

**A previewed theme stays on screen when the live config loads late.** Only
the newest config load updates the screen. The preview footer shows "Loading
preview…" and, on failure, "Couldn't load preview". A failed refresh keeps the
config already on screen.

**Abandoned-checkout links open that checkout on the payment screen.** A link
that opens `payment` passes the screen the checkout to recover. Links cannot set
`checkoutUrlOverride` or `recoveredCheckoutUrl` themselves.

**A signed-in shopper's wishlist and past searches stay with their account.**
Both are stored per account on the device, so the next account on the same
phone starts clean. The first account to sign in after updating keeps the
device's existing wishlist; past searches made before the update stay with the
guest.

**The add-to-cart toast no longer shows a stale discount warning or a negative
stock count.**

**Flat collection grid cards stretch to their row's height again.**

**Tapping Sign in repeatedly sends one OTP.** The button shows a loading state
while the request runs.

**Payment pages no longer throw when a UPI app cannot be opened.** The payment
web views and the Fastrr, GoKwik and Shopflo checkouts catch the failure and
keep the shopper on the payment page.

**Cart attributes reach Fastrr checkout intact.** A value with `&` or `#`, such
as a UTM campaign, no longer cuts checkout short.

**Sold-out products leave recently viewed when `filterOutOfStockProducts` is
on.**

**The order details header shows when the order date is unusable.** It reads
`processedAt` and leaves the date out when it does not parse.

**Hiding the sort-and-filter helper text with `display: 'none'` works.**

**A failed Kwikpass SDK init is caught**, and the sign-in form still becomes
ready.

**The post-purchase screen no longer crashes on a fulfilled item the order
does not list.**

**Nector blocks no longer crash.** Refer-a-friend info waits for the shopper,
and wallet history renders when its theme lacks a style.

**Studio's canvas shows Milo's size chart page in production too.**

## Tooling [#tooling]

**`@app-brew/app-preview` is new.** It builds an app's blocks for the web, for
the Studio preview, and changes nothing that ships in the app.
`@app-brew/build-tools` gains the web stubs it needs.
