Repository navigation
feat(promotions): hub with counts and tabs, stepped builder, redemptions screen and promotion cards - #131
Closed
roncodes wants to merge 20 commits into
Closed
feat(promotions): hub with counts and tabs, stepped builder, redemptions screen and promotion cards#131roncodes wants to merge 20 commits into
roncodes wants to merge 20 commits into
Conversation
The dummy app never ran: ember-classic-decorator (unused) crashes on Ember 5, lazy loading kept the engine's modules out of the test bundle, and the host services, config and intl data the panels need were missing. Mirrors what fleetops already does: eager loading when `ember test` runs from this package, an inert stand-in for the console's extensions module, the API config the core adapter reads at module scope, and the legacy built-in components the engine's templates still use. The dummy intl service ignores missing locale data, since headless Chrome has no number formats for every bundled locale, and the order details and network controller tests stub the host router, fetch and app cache the way the widget tests already do.
… is only found by its own storefront
…rce card Catalog, truck and network index pages use Layout::Resource::CardsGrid with one card each on Layout::Resource::Card, following the Fleet-Ops anatomy: identity and subtitle in the header, media or facts in the body, status, icon actions and meta in the footer, with registry slots at each end. A catalog card shows its categories with product counts, its hours as a seven-day strip (the new Storefront::HoursStrip) and its product total; a draft is dashed. A truck card is a Vehicle::Pill with the online dot, the vehicle photo, where it serves, and a presence badge that says serving, offline, inactive, or online with no catalog. A network card shows the logo on its backdrop, the online state, the currency and member count. "Food trucks" reads "Trucks" in the UI; the food-truck model, routes and permissions keep their names. The catalogs and trucks pages gain the search the header already offered.
…ut a vehicle renders its placeholder
Closed
4 of 7 tasks
roncodes
force-pushed
the
feat/promotions-hub
branch
2 times, most recently
from
October 10, 2026 08:16
512c312 to
0d028a9
Compare
… and crashed createRecord; the store summary is store_summary
…s own sidebar for each - storefront service tracks a network context derived from the network route - StoreSelector becomes the context switcher with a Networks group and create-network - application route loads networks; sidebar rewrites for the network context - network page is a full page with an identity strip; the list hides while one is open - new Trucks section for a network backed by FoodTruckFilter::network - network orders and customers are scoped to the network being viewed, not the active store - createNewNetwork lives on the storefront service
…enu without Networks - trigger: context icon, name, STORE/NETWORK label and caret; blue for a store, indigo for a network; invitation badge - menu: Stores and Networks groups with tiles, currency or member count, a check on the active one, readable in dark mode; footer actions read New store / New network - store navigation follows the design order (Dashboard, Orders, Products, Catalogs, Customers, Trucks, Promotions, Settings); networks live in the switcher, not the menu - network page loses the All networks button; leaving a network is the switcher's job
roncodes
force-pushed
the
feat/promotions-hub
branch
from
October 10, 2026 09:31
0d028a9 to
4c937e0
Compare
…e sidebar re-renders on a switch; networks report their store count
…d an invite panel - network index is now an Overview (stat tiles, members with 7-day share, invitations, recent orders); settings move to networks.index.network.settings - NetworkController gains overview, invitations, resend and revoke; one Invite per recipient carrying category, expiry, message and approval in meta - OrderFilter/CustomerFilter gain a network filter on meta.storefront_network_id; the network orders and customers routes use it - Storefront::Network::InvitePanel (by email, shareable link, add a store you manage) replaces the share-network and add-stores modals - stores page: store identity column via a new store descriptor, All/Online/Offline/Invited tabs, bulk assign category and remove, invitation rows with resend/revoke/invite again - store and network resource descriptors registered with the shared identity registry; SelectOption::Store wrapper; width-style helper
…ost re-export broke console boot before the lazy engine loaded
…ore stacks and next actions - a multi-store checkout is one expandable row (customer, stores, fulfillment, total with tip split, shared driver, least-advanced status) that opens into each store's order - status tabs (needs action, preparing, ready for pickup, out for delivery, completed, canceled) drive the status query param; grouped/flat toggle - new cells: reference, stores (identity stack of store pills), fulfillment, total, driver (inline assign), status, placed, actions (next action promoted, rest behind an ellipsis) - order index resource keeps meta.checkout_id so the console can group
…lide with the networks list's page, sort and query
…ive questions first - header: id, status and store/network badges, the next workflow action promoted to a button, Edit, the rest behind a menu - Storefront::Order::FlowSteps renders the activity flow as steps (custom order configs contribute their own) - Storefront::Order::IdentityStrip: customer, driver with inline assign, fulfillment and timing, total with tip and promotion - tabs: Items (with store block and the other orders of the checkout), Route (with tracking), Payment, Activity (with comments), Customer, Data (metadata and documents); registered tabs still appended - panel widened to 600px
…out rules and a save bar - settings shell: store identity header with copy-store-key, a section rail (General, Branding and media, Locations, Checkout rules, Payment gateways, Notification channels, Alerts, API keys); anchors on the General page, routes for the rest - General page restructured into always-open sections: general, branding and media, checkout rules, alerts - every rule the server honours is a Storefront::SettingRule row with its consequence written under it, detail inputs appear when it is on - sticky save bar with unsaved-change count and the sections touched; Discard rolls back attributes, options and alerts
…f categories, products, hours and who serves it
- new full-page route catalogs.index.edit: categories on the left (add, rename, reorder, remove), the selected category's products in the middle with an in-place picker over the store's products that hides what is already in the catalog, health on the right; Hours (ScheduleManager), Served by (stores and trucks) and Details sections; sticky save bar with a summary of unsaved changes
- a store can now serve a catalog like a truck: Store gains catalog relations, PUT catalogs/{id}/subjects syncs stores and trucks, the catalog resource exposes hours and subjects
- category order persists; the catalog list opens the editor, the create modal only asks for name, description and status, and the card shows who serves the catalog
… issue badges and a save bar - Storefront::Product::Form gains tabs: Details (basics, pricing, flags, a folded More for translations and metadata), Variants and add-ons, Availability, Media (images and videos) - inline validation: missing name or price, sale price not below price, published without category or image; the tab holding the field carries a badge and the save bar links to it - status select moves into the panel header; the save bar counts unsaved changes across the product, its variants, add-ons and queued uploads, with Discard
…Ulaanbaatar zones and food trucks
…ns on one screen
- header rebuilt: photo, name, type and preference badges, copyable id, since-date, and a lifetime strip (orders, spend, average, last order) from a new customers/{id}/insights endpoint scoped to the store or network
- actions: New order for this customer, Edit, copy id/email
- tabs: Overview (contact facts, saved places with the default marked, stores ordered from in network context, recent orders), Orders, Places (set default, open in Fleet-Ops from the pill), Activity and notes (first/last order, cancellations, internal notes via CommentThread); registered tabs keep working
- panel widened to 600px
…builder, a redemptions screen and promotion cards - hub shell: title, subtitle, live counts (active, scheduled, redemptions, discount given) from promotions/hub, one tab strip across promotions, campaigns, segments, pushes and the new Redemptions tab - promotions list: status tabs (all, active, scheduled, paused, ended, draft), cards or table, Storefront::Promotion::Card with value, trigger, window, targets and redemptions, row actions gain duplicate and view redemptions - Storefront::Promotion::Builder replaces the modal: What, When it applies (with codes once saved), Targets (products, categories, exclusions, segment), Schedule and limits, Review and announce; done steps collapse to one line; save draft at any step - Redemptions: PromotionRedemption controller, filter, resource and relations, frontend model, route and table - Storefront::Promotion::Codes extracted from the codes modal so the builder and the modal share it
roncodes
force-pushed
the
feat/promotions-hub
branch
from
October 10, 2026 10:20
4c937e0 to
ad11d02
Compare
Member
Author
|
Superseded by the single overhaul PR (one branch, one PR targeting release/v0.4.25, per maintainer request). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotions hub and builder from design board 6. Stacked on #130; review the top commit.
promotions/hubsummary, and one tab strip across Promotions, Campaigns, Segments, Push notifications and the new Redemptions tab. Replaces the reversedTabNavigationheader.viewquery param),Storefront::Promotion::Card(value, type and trigger, window, targets, redemptions and discount given, actions menu). Row actions gain Duplicate (opens the builder on a draft copy) and View redemptions.Storefront::Promotion::Builder, right panel 620px): five steps that collapse to one line when done so the whole rule stays readable: What (type as radio cards, value, name, description), When it applies (code vs automatic, first order, cart minimums, and the codes manager once saved), Targets (products, categories, excluded products, customer segment), Schedule and limits (window, usage limits, budget, max discount, stackable, priority, public), Review and announce (summary with Edit links, issues, status, "announce after saving" opens the campaign composer). Save draft at any step; Save on the last. Replaces thepromotion-formmodal for create and edit.PromotionRedemptionalready records, listed for the first time: promotion, code, customer, order (opens the order panel), discount, status, redeemed at; filterable by promotion (the card/row action deep-links), status and search. Backend: controller, filter (promotion,customer,status,owner,query), resource,customer()/order()relations,fleetbaseRoutes('promotion-redemptions').Storefront::Promotion::Codesextracted from the codes modal; the modal now renders it.Not here: segment targeting is stored in
applies_to.segmentbut the server'sPromotionEnginedoes not evaluate it yet (flagged for the API); campaigns and segments keep their tables and forms; bulk pause/resume/end; ember-uiForm::Stepsextraction.Related Issue
Storefront UX overhaul, design canvas board 6.
Type of Change
Implementation Notes
The builder shares the form's field semantics with the former modal (same
setField/setMoney/setTargetsbehaviour) so the saved payload is unchanged apart fromapplies_to.segment. The hub counts load once in the parent route.Validation
Documentation Impact
API Reference Impact
API reference notes: internal console endpoints
GET storefront/int/v1/promotions/hub?owner=andstorefront/int/v1/promotion-redemptions(standard index/show with the filters above). No public API change.Documentation Notes
docs/storefront → promotions: the hub, the builder steps, redemptions.
needs-docsfor the series.Risk
promotion-formmodal is no longer opened from the list (file kept).applies_to.segmentis written but not yet honoured at checkout; the field says "Only customers in this segment get the promotion", which becomes true once the engine reads it — flagged in the PR so the API side can follow.Screenshots / Recordings
Design canvas board 6: https://claude.ai/artifact/771ptEFmi4BLmYHBZuUhWF