-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add a guest confirmation message #190
Conversation
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
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.
LGTM 🚀
{!isLoggedIn && enableGuestMessage ? ( | ||
<FormattedMessage | ||
id="store/header.guest-email" | ||
values={{ | ||
lineBreak: <br />, | ||
userEmail: <strong className="nowrap">{profile.email}</strong>, | ||
}} | ||
/> | ||
) : ( | ||
<FormattedMessage | ||
id="store/header.email" | ||
values={{ | ||
lineBreak: <br />, | ||
userEmail: <strong className="nowrap">{profile.email}</strong>, | ||
}} | ||
/> | ||
)} |
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 noticed that both store/header.guest-email
and store/header.email
keys are using the same string value. Since the component is set up to conditionally render one of these based on isLoggedIn
and enableGuestMessage
, I was wondering if there’s a specific scenario where these two messages are intended to be different?
As it currently stands, it seems that the same text will be displayed regardless of the user's login state. Could you clarify the objective here? Is the intention to eventually have different messages for logged-in and guest users?
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.
Yes, we duplicated the message for now just to enable having two different Ids so the merchant is able to differentiate those messages using the Graphql Layer when needed.
If the PT has already an idea to differentiate this message we could open a separate PR since this will need to be sent to the localization team. What do you think?
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.
@beatrizmaselli thanks for your answer!
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.
@wagnerlduarte yes, as Beatiz said by default these two messages are same, but customer can assign their own text via GraphQL. I've added a comment in the code to clarify it! Thank you!
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.
LGTM
Your PR has been merged! App is being published. 🚀 After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
What is the purpose of this pull request?
To add a separate message for guest users to the order confirmation message component. This way, logged in users will see the default message (store/header.email) and guest users will see a different message (store/header.guest-email).
What problem is this solving?
Some of customers want to show different confirmation messages depends on "is user logged in" state
How should this be manually tested?
https://devalex--dunnesstoresqa.myvtex.com/checkout/orderPlaced/?og=50506720
Screenshots or example usage
Types of changes