-
Notifications
You must be signed in to change notification settings - Fork 229
feat: return-item-selection modal on order detail @W-22821837 #3886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sf-jie-dai
merged 15 commits into
feature/264-order-management
from
jie.dai-W-22821837-returnItemSelectionModal
Jun 22, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
143e370
@W-22821837@ Add return-order-modal component
sf-jie-dai 0d638c9
@W-22821837@ Wire return-order-modal into order detail
sf-jie-dai a37667a
@W-22821837@ Update orders.test.js for enabled Return Items CTA
sf-jie-dai 41d6410
@W-22821837@ Regenerate translations and add CHANGELOG entry
sf-jie-dai c5fd8eb
@W-22821837@ Rename return-order-modal to return-items-modal
sf-jie-dai 7313dd8
@W-22821837@ Address review-cc feedback on the return-items modal
sf-jie-dai 0486e33
@W-22821837@ Remove CHANGELOG entry for return-items modal
sf-jie-dai 54b080e
@W-22821837@ Regenerate en-XA pseudo-locale translations
sf-jie-dai cddc1f3
@W-22821837@ Fix stale closure in return-items-modal updateRow
sf-jie-dai 8bafd33
@W-22821837@ Reuse QuantityPicker in return-items modal
sf-jie-dai 59fc68c
@W-22821837@ Drop redundant useProducts call for return-items modal
sf-jie-dai ebc09cd
@W-22821837@ Memoize ReturnableItemRow and stabilize row callbacks
sf-jie-dai eb036e4
@W-22821837@ Move buildReturnProductItems into return-utils
sf-jie-dai 82ad1ea
Merge branch 'feature/264-order-management' into jie.dai-W-22821837-r…
sf-jie-dai 6e3174f
fix(account): a11y review-comment fixes for return-items modal @W-228…
sf-jie-dai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
packages/template-retail-react-app/app/components/return-items-modal/constants.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| /* | ||
| * Copyright (c) 2026, salesforce.com, inc. | ||
| * All rights reserved. | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
| */ | ||
|
|
||
| import {defineMessages} from 'react-intl' | ||
|
|
||
| export const messages = defineMessages({ | ||
| title: { | ||
| defaultMessage: 'Return items from order #{orderNo}', | ||
| id: 'return_items_modal.heading.return_items' | ||
| }, | ||
| subhead: { | ||
| defaultMessage: 'Select the items you want to return and tell us why.', | ||
| id: 'return_items_modal.text.select_items_description' | ||
| }, | ||
| availableToReturn: { | ||
| defaultMessage: 'Up to {count, plural, one {# unit} other {# units}} available to return', | ||
| id: 'return_items_modal.text.available_to_return' | ||
| }, | ||
| quantityLabel: { | ||
| defaultMessage: 'Quantity', | ||
| id: 'return_items_modal.label.quantity' | ||
| }, | ||
| reasonLabel: { | ||
| defaultMessage: 'Reason', | ||
| id: 'return_items_modal.label.reason' | ||
| }, | ||
| reasonFor: { | ||
| defaultMessage: 'Reason for {name}', | ||
| id: 'return_items_modal.label.reason_for' | ||
| }, | ||
| selectReasonPlaceholder: { | ||
| defaultMessage: 'Select a reason', | ||
| id: 'return_items_modal.placeholder.select_reason' | ||
| }, | ||
| cancelButton: { | ||
| defaultMessage: 'Cancel', | ||
| id: 'return_items_modal.button.cancel' | ||
| }, | ||
| reviewButton: { | ||
| defaultMessage: 'Review return', | ||
| id: 'return_items_modal.button.review_return' | ||
| }, | ||
| reviewDisabledHint: { | ||
| defaultMessage: 'Select at least one item and choose a reason to continue.', | ||
| id: 'return_items_modal.hint.review_disabled' | ||
| }, | ||
| loadingReasons: { | ||
| defaultMessage: 'Loading return reasons…', | ||
| id: 'return_items_modal.text.loading_reasons' | ||
| }, | ||
| reasonsError: { | ||
| defaultMessage: 'We could not load the return reasons. Please try again.', | ||
| id: 'return_items_modal.text.reasons_error' | ||
| }, | ||
| retryButton: { | ||
| defaultMessage: 'Retry', | ||
| id: 'return_items_modal.button.retry' | ||
| }, | ||
| itemCheckboxLabel: { | ||
| defaultMessage: '{name}, {count, plural, one {# unit} other {# units}} available to return', | ||
| id: 'return_items_modal.label.item_checkbox' | ||
| } | ||
| }) | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sf-jie-dai Did you get messages for various error scenarios from Sab or are we supposed to show a default message for all errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a W-22821839 especially for error states but I could ask Sab now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reached out here