-
Notifications
You must be signed in to change notification settings - Fork 522
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
AO3-6548 Use pseud helpers in comment emails and fix kudos image display #4691
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.
Small note: This sets the red color on both the <b>
tag and the <a>
tag. But I don't think this matters, batch_subscription_notification.html.erb
does it too. If it does matter then this could use tag.strong
instead of style_bold
.
background: url("/images/imageset.png") no-repeat -111px -580px; | ||
width: 55px; | ||
height: 54px; |
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.
background: url("/images/imageset.png") no-repeat -111px -580px; | |
width: 55px; | |
height: 54px; | |
background: url("/images/imageset.png") no-repeat -110px -580px; | |
width: 55px; | |
height: 55px; |
This matches more what is in the png.
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 can confirm that the Furthermore, the text flows differently if it's long (= many kudos by users): I don't know whether that's okay. Also, the |
app/helpers/mailer_helper.rb
Outdated
@@ -186,7 +186,7 @@ def commenter_pseud_or_name_link(comment) | |||
elsif comment.by_anonymous_creator? | |||
style_bold(t("roles.anonymous_creator")) | |||
else | |||
style_link(comment.comment_owner_name, polymorphic_url(comment.comment_owner, only_path: false)) | |||
style_bold(style_link(comment.comment_owner_name, polymorphic_url(comment.comment_owner, only_path: false))) |
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.
@sarken pointed out to me that we have a helper that can help here:
otwarchive/app/helpers/mailer_helper.rb
Lines 37 to 44 in 93184ce
def style_pseud_link(pseud) | |
style_link("<img src=\"" + root_url + "favicon.ico\" style=\"border:none;display:inline-block;font-weight:bold;height:16px;padding-right:3px;vertical-align:-3px;width:16px;\">" + | |
pseud.byline, user_pseud_url(pseud.user, pseud)) | |
end | |
def text_pseud(pseud) | |
pseud.byline + " (#{user_pseud_url(pseud.user, pseud)})" | |
end |
style_bold
but we're fine as long as one of the icon or bold is there
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.
Oh, wait, my mistake! commenter_pseud_or_name_text
also needs to be updated to use text_pseud
(the plain text equivalent of style_pseud_link
).
Bilka can't access GitHub right now, but he pointed out we forgot some mailers 🤦 In
|
Pull Request Checklist
as the first thing in your pull request title (e.g.
AO3-1234 Fix thing
)until they are reviewed and merged before creating new pull requests.
Issue
https://otwarchive.atlassian.net/browse/AO3-6548
Purpose
Fix email style in AO3-6548
Testing Instructions
See JIRA ticket
Credit
EchoEkhi (He/him)