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

Add a guest confirmation message #190

Merged
merged 6 commits into from
Aug 27, 2024
Merged

Conversation

efremov-av
Copy link
Contributor

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

guest message logged in user message

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

@efremov-av efremov-av requested review from a team as code owners August 9, 2024 09:10
@efremov-av efremov-av requested review from lucasfp13 and lariciamota and removed request for a team August 9, 2024 09:10
Copy link
Contributor

vtex-io-ci-cd bot commented Aug 9, 2024

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:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

vtex-io-docs-bot bot commented Aug 9, 2024

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@efremov-av efremov-av requested a review from a team as a code owner August 9, 2024 09:39
@efremov-av efremov-av requested review from barbara-celi and removed request for a team August 9, 2024 09:39
Copy link
Contributor

@beatrizmaselli beatrizmaselli left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Comment on lines +31 to +47
{!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>,
}}
/>
)}

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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!

Copy link
Contributor Author

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!

Copy link

@wagnerlduarte wagnerlduarte left a comment

Choose a reason for hiding this comment

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

LGTM

@beatrizmaselli beatrizmaselli merged commit faadc87 into master Aug 27, 2024
7 checks passed
@beatrizmaselli beatrizmaselli deleted the add/guest-email-message branch August 27, 2024 09:07
Copy link
Contributor

vtex-io-ci-cd bot commented Aug 27, 2024

Your PR has been merged! App is being published. 🚀
Version 2.17.2 → 2.18.0

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:

vtex deploy vtex.order-placed@2.18.0

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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.

3 participants