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

Create styled email for reset password instructions #13157

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

drummer83
Copy link
Contributor

What? Why?

Until now the email which was sent to users who forgot their password wasn't styled at all and it contained plain text only. To unify with our other emails I've now created a styled version of it.

Before

image

After

image

What should we test?

  • Visit the main page.
  • Click Login.
  • Select 'Forgot Password?'
  • Enter your email address.
  • Click 'Reset password'.
  • Check the design of the email which is sent to you.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

@drummer83 drummer83 self-assigned this Feb 16, 2025
@sigmundpetersen
Copy link
Contributor

Nice 🙂 Is this also handling case 1 in openfoodfoundation/wishlist#357 ?

@drummer83
Copy link
Contributor Author

According to my notes the language is selected properly already.
The styling is added in my PR, so yes, probably that case should be solved then. 🙏🏻

I'm stuck on the failing spec currently though. 😕

@dacook dacook self-requested a review February 17, 2025 22:39
Hmm, in different specs it gets called 'mail', 'email', 'message'. The object is a Mail::Message object. The method to generate the object is called `mail`, so I went with that.
Now that it's a multi-part email, we have to select the html part for the test.
Another option is to simply check mail.to_s, but this also includes mail headers so doesn't specifically test the body.
@dacook
Copy link
Member

dacook commented Feb 18, 2025

Nice 🙂 Is this also handling case 1 in openfoodfoundation/wishlist#357 ?

Looks like that was solved in

I've updated the bottom of the issue description to say "remaining issues list", which now implies that other cases have already been solved :)

@dacook dacook marked this pull request as ready for review February 18, 2025 05:24
@drummer83
Copy link
Contributor Author

Ahhh, thank you, @dacook!
I stumbled across that 'raw' part but didn't realize that's where the solution was.
Thank you so much! 🤗

@sigmundpetersen
Copy link
Contributor

I've updated the bottom of the issue description to say "remaining issues list", which now implies that other cases have already been solved :)

I don't think all the other cases are covered by the remaining issues though 🙂

@dacook
Copy link
Member

dacook commented Feb 18, 2025

I don't think all the other cases are covered by the remaining issues though 🙂

Oh, yes sorry I didn't read the whole thing. I've reverted my change. We probably need to review the whole issue to see what's still relevant.

@drummer83
Copy link
Contributor Author

Nevermind, I'm working my way through the emails and will update the remaining issues afterwards. 👍🏻

@mkllnk mkllnk added the user facing changes Thes pull requests affect the user experience label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user facing changes Thes pull requests affect the user experience
Projects
Status: Test Ready 🧪
Development

Successfully merging this pull request may close these issues.

4 participants