Orders 7764 render create return page with context#2673
Conversation
|
cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b838233. Configure here.
b838233 to
156a8e7
Compare
For context, what change do we need to make on the BCApp side to get redirection to work? |
@matt-evangelidis Good catch, updated description. The redirection fix is dependant on: ORDERS-7825
|
c1e7b3e to
3f4ab78
Compare
a12175b
into
feature/PROJECT-7525-new-returns-flow
What?
Massive refactoring for new return flow to use updated stencil page context(order details, reasons and resolutions) and use the new /create-return route
Requirements
Tickets / Documentation
Jira: ORDERS-7764
Screenshots (if appropriate)
All pages load fine:
###Orders listing page:

###Order details page:

###Add returns page:
When both flags(legacy
returns_enabledand newreturns_v2_enabled) off:Orders list and Order details page don't show returns items and new_return route redirects to orders list page:


Existing add Return page (when only legacy returns_enabled):
Add return page when only new flag
returns_v2_enabledenabled:Redirects to orders list page. Currently BC app doesn't support redirection when legacy returns is disabled. We need to fix this as part of ORDERS-7825
Add Return page with new content(when returns_v2_enabled or both enabled):
New Design after consultation with JW and JH:

Note
Medium Risk
Changes which account routes load which return UI and how v2 is reached relative to feature flags; submission is not wired yet, but mis-routing could affect shoppers on the wrong template.
Overview
Moves the returns v2 UI off
account/add-returnonto a dedicatedcreate-returnroute and page type, wired to stencil context (order, per-linereturnableQuantity/price, and sharedreasons/resolutions).Routing & JS:
app.jsloadscreate-return.jsforcreate_returnand routesaccount_new_returnback to the generic account bundle.add-return-new.jsis removed in favor ofCreateReturn, which validates submit from select controls (qty/resolution/reason), drops the quantity stepper, and exposesbuildReturnInput()for the upcoming Storefront GQL submit (still a TODO).Templates:
add-return-new.htmlis deleted;add-return.htmlno longer branches onreturns_v2_enabledand only renders the legacy POST return form (with small a11y/table copy tweaks).create-return.htmlimplements the new layout: column headers on large screens, qty dropdowns capped byreturnableQuantity, and dynamic reason/resolution options.Styles & copy:
.newReturnstyles move fromaddReturninto a newcreateReturnSCSS component (header buttons, column alignment, select widths).en.jsonadds/updates strings for the new return request UX.Reviewed by Cursor Bugbot for commit 4ee19ec. Bugbot is set up for automated code reviews on this repo. Configure here.