-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
MBS-13815: Enable sending contact emails through new service #3390
Conversation
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.
Thanks for splitting this, I hope we can put it on test/beta soon!
39d62c6
to
9243e06
Compare
Heya, sorry for missing your review @mwiencek! I've implemented the suggestions, although the comment about languages made me realise that this particular one is being sent to two different users with potentially two different languages - I've added comments to that effect, but when we get around to adding the language preference we'll need to decide whether to send the email in different languages to the two participants or to use the initiator or recipient's language. A similar thing applies to the report emails. |
9243e06
to
af68895
Compare
@JadedBlueEyes Thanks so much for the update and sorry for the delay. I just pushed some minor fixes/improvements:
I think it's ready to put on beta, so I'll try to do that tomorrow.
Good point. I think we should change the language depending on the recipient in both cases, but we can revisit that once the preference is added. |
af68895
to
e1102ea
Compare
It should 100% be either each language, or English for now until that's doable if it cannot be done yet. Please make sure you don't end up sending a French email to a non-French speaker or whatnot just because the other user has the site in French, that sounds awful. |
Co-Authored-By: Michael Wiencek <[email protected]>
This page was shown even if the email didn't send: the redirect was unconditional, and the "sent" parameter was always included, which made the `exists` check for that parameter completely useless. Now it reloads the form (preserving what was entered).
e1102ea
to
fefa5e8
Compare
Fixed the Perl::Critic errors here, hopefully without breaking anything else. |
I deployed this to beta and it seems to be working fine (sent a message to Jade as a test). One issue I overlooked, though, is that the message subject is ignored and not sent to the recipient at all. This is a problem with the mb-mail-service template and not the MBS changes here. |
We should aim to fix that before this goes out of beta - or revert this. Are you already looking into it? |
Received!
I've just done this in metabrainz/mb-mail-service@cb44ed0 / 0.3.7, although it might need a bit of design polish :) I've also realised that for the image, we're using |
Thank you @JadedBlueEyes! I'm now wondering if there's a point to having a subject anymore if it's only to display some bold text above the message, and not be used in the actual email subject. I checked how Discogs handles this, and the string they use for the email subject is "Discogs message from {user}: {subject}". What do you think about preserving the subject in the email in a similar way? Would like some feedback from @Aerozol too. :) |
Do you have a suggestion for what size the png should be? (I assume the current CSS will scale it appropriately?) |
Hmm I guess it doesn't hurt to allow the sender to "title" their paragraph, for instance if they are sending multiple messages on different topics to the same user? If "subject" is going to be expected to be in the actual email subject maybe we can change that field to "Title" in the MB end, to avoid confusion. Layout wise (assuming we keep the subject/title) I propose a couple of possible changes:
P.S. The PNG already in the Design System might be about the right size: https://github.com/metabrainz/design-system/tree/master/brand/logos/MusicBrainz/PNG |
In production we currently include the subject in the email subject, which seems useful, but in beta it's now |
If that sounds good, I'll implement those changes tomorrow. This looks good for me, we just need to host it somewhere now :) |
Oh cool, I interpreted this discussion as us not being able to put it in the actual email subject. Now that you mention it, it has sometimes been confusing to get MB emails that are just a random subject... I think my preference for the subject would be: @JadedBlueEyes make sure to use the MusicBrainz_logo_mini.png, not the chonky one. |
Uploaded to https://static.metabrainz.org/logos/MusicBrainz_logo_mini.png. |
Deployed that, thanks! |
Problem
This is the start of enabling
mb-mail-service
incrementally, as a broken-down version of #3363.This adds the configuration option
MAIL_SERVICE_BASE_URL
in DBdefs, and replacessend_message_to_editor
(aka/user/<id>/contact
) with the new template.Testing
This has been manually tested.
Documenting
Further action
Ensure beta.musicbrainz.org is configured correctly before deployingWrite replacement tests for the new code