Skip to content
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

feat(checkout): CHECKOUT-8824 Add Consignment Not Completed Message #2099

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bc-peng
Copy link
Contributor

@bc-peng bc-peng commented Nov 13, 2024

What?

Show a message when a shopper is trying to create another one but an existing consignment is not finished yet.
Also, hide the message when the previous consignment is done.

Why?

Improve UX.

Testing / Proof

Show the error message when adding a new consignment is not finsihed

Screen.Recording.2024-11-14.at.11.55.29.AM.mov

Show the error message when an existing consignment is not finsihed

Screen.Recording.2024-11-14.at.11.55.04.AM.mov

Hide the error message after selecting shipping method

Screen.Recording.2024-11-14.at.11.53.14.AM.mov

Hide the error message after consignment deletion

Screen.Recording.2024-11-14.at.11.53.39.AM.mov

@bigcommerce/team-checkout

Comment on lines +73 to +75
const errorConsignmentIndex = consignments.findIndex(
(consignment) => !consignment.selectedShippingOption,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the inconsistency of the consignment order, it is better to find the index each time to locate the unfinished consignment.

@bc-peng bc-peng marked this pull request as ready for review November 14, 2024 01:08
@bc-peng bc-peng requested a review from a team as a code owner November 14, 2024 01:08
Copy link
Contributor

@bc-mackxu bc-mackxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor feedbacks

setIsAddShippingDestination(true);
}
if (
consignments.length > 0 &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍹 It appears redundant because it has already checked in hasSelectedShippingOptions

Suggested change
consignments.length > 0 &&

@@ -510,6 +510,7 @@
"select_shipping_address_text": "Please select a shipping address in order to see shipping quotes",
"shipping_address_heading": "Shipping Address",
"multishipping_consignment_index_heading": "Destination #{consignmentNumber}",
"multishipping_consignment_not_completed_error": "Please complete the address, item allocation, and method selection for Destination #{consignmentNumber}.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍹

Suggested change
"multishipping_consignment_not_completed_error": "Please complete the address, item allocation, and method selection for Destination #{consignmentNumber}.",
"multishipping_incomplete_consignment_error": "Please complete the address, item allocation, and method selection for Destination #{consignmentNumber}.",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants