Important
This is the sixth release candidate of Shopper 3.0. Filament components now follow the gray palette of the active admin theme, a shipment can be tracked by its public id from the Store API, and the account page no longer crashes when the user model does not support two-factor authentication or passkeys.
Installation
"minimum-stability": "RC",
"prefer-stable": truecomposer require shopper/framework:^3.0.0-rcFeatures
- feat(api): track a shipment by its public id from the store API (#688)
GET /store/shipments/{public_id} returns an order-shippings resource (status, carrier_name, tracking_number, tracking_url, shipped_at, received_at, returned_at) without a customer login, so a tracking page can be opened from a shipping email. ?include=events adds the order-shipping-events timeline (status, description, location, latitude, longitude, occurred_at, created_at) sorted by occurred_at. Any other include returns a 400 and an unknown id a 404. The public id is a ULID, so shipments cannot be enumerated, but the descriptions and locations entered in the admin are readable by anyone holding the link.
The SDK exposes the endpoint as sdk.store.shipment.retrieve(id, params), which returns an OrderShipping.
A shipment can now move from picked_up to out_for_delivery without going through in_transit.
Bug Fixes
- fix(admin): make Filament components follow the active theme gray palette (#687)
Repeater tables, inputs, selects and notifications stayed zinc under the Midnight and Evergreen themes. tokens.css declared fixed --color-gray-* values in @theme inline, which overrode Filament's --color-gray-*: var(--gray-*) mapping. They are removed: Midnight now uses a slate ramp and Evergreen a stone ramp, with darker greens for --gray-700 to --gray-950 in dark mode. A gray registered with FilamentColor::register(['gray' => ...]) now applies as well.
- fix(admin): hide account security sections the user model does not support (#689)
The account page showed the two-factor section on shopper.auth.2fa_enabled alone and the passkeys section on shopper.auth.passkeys_enabled alone. With a user model that does not implement Shopper\Contracts\HasStoreAuthentication or Laravel\Passkeys\Contracts\PasskeyUser, opening the page threw a TypeError. Shopper\Livewire\Pages\Account now checks both the config and the contract before showing each section.
Upgrading
composer update "shopper/*"shopper.css is served with a one year cache (max-age=31536000), so hard refresh the admin once to load the new stylesheet.
A custom theme registered in config/shopper/themes.php should define a --gray-50 to --gray-950 ramp in its [data-theme] block, as midnight.css and evergreen.css do. Without it, Filament components use Filament's default zinc gray.
If you keep your own copy of account.blade.php in resources/views/vendor/shopper/livewire/pages/, replace the config checks with @if ($twoFactorEnabled) and @if ($passkeysEnabled).
@shopperlabs/shopper-types 3.0.0-rc.6 and @shopperlabs/shopper-sdk 1.0.0-rc.3 are published under the beta tag. The SDK requires the types ^3.0.0-rc.3.
npm install @shopperlabs/shopper-sdk@beta @shopperlabs/shopper-types@betaContributors
Full Changelog: v3.0.0-rc.5...v3.0.0-rc.6