[Possible Feature Claim?] 1) Fix and refactor emails.

58 views
Skip to first unread message

Steven Hancock

unread,
Mar 27, 2012, 3:53:13 AM3/27/12
to diaspo...@googlegroups.com
Also from the wishlist: https://github.com/diaspora/diaspora/wiki/Developer-Feature-Wishlist

I propose that we should use the excellent markerb gem by Jose Valim. It allows us to write our email templates in Markdown+ERB and gives us multipart text and HTML email from a single template. It's also compatible with Devise and ActionMailer out of the box, so it would only really require including the gem and changing the templates and possibly a few lines of code in the mailer classes.

If that's ok with everyone, I'm willing to claim this one too. :)

Maxwell Salzberg

unread,
Mar 27, 2012, 1:02:19 PM3/27/12
to diaspo...@googlegroups.com
Steven,

This gem looks exactly what we need to keep things simple, straight forward, and compatible.  Good find.

-m


--
You received this message because you are subscribed to the Google Groups "diaspora-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/diaspora-dev/-/n40zUQtZnvsJ.
To post to this group, send email to diaspo...@googlegroups.com.
To unsubscribe from this group, send email to diaspora-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diaspora-dev?hl=en.

Steven Hancock

unread,
Mar 28, 2012, 12:21:06 AM3/28/12
to diaspora-dev
Yeah, and it was designed to work with Devise and ActionMailer. It
also uses the same Markdown processor we're already using (redcarpet)
so we won't be pulling in extra dependencies that we shouldn't
need. :)

Only thing that might be a problem is I noticed a few of the email
templates include some CSS, I don't know how that would work if we
convert the templates to Markdown and send them as multipart text +
html.

On Mar 27, 10:02 am, Maxwell Salzberg <maxw...@joindiaspora.com>
wrote:
> Steven,
>
> This gem looks exactly what we need to keep things simple, straight
> forward, and compatible.  Good find.
>
> -m
>

Maxwell Salzberg

unread,
Mar 28, 2012, 12:22:19 AM3/28/12
to diaspo...@googlegroups.com
On Mar 27, 2012, at 9:21 PM, Steven Hancock <steve...@gmail.com> wrote:

> Yeah, and it was designed to work with Devise and ActionMailer. It
> also uses the same Markdown processor we're already using (redcarpet)
> so we won't be pulling in extra dependencies that we shouldn't
> need. :)
>
> Only thing that might be a problem is I noticed a few of the email
> templates include some CSS, I don't know how that would work if we
> convert the templates to Markdown and send them as multipart text +
> html.

Let's nuke the CSS for now, and go back to basics. :)

Steven Hancock

unread,
Mar 28, 2012, 6:03:08 AM3/28/12
to diaspora-dev
Sounds good to me, I was thinking the same thing, but wanted to get
another opinion on that before I do it. :)

On Mar 27, 9:22 pm, Maxwell Salzberg <maxw...@joindiaspora.com> wrote:

Steven Hancock

unread,
Mar 29, 2012, 9:41:20 AM3/29/12
to diaspo...@googlegroups.com
My current work on this feature is at https://github.com/stevenh512/diaspora/tree/refactor-emails

Note that I'll be squashing any commits in this branch and rebasing on top of master before sending this to the main repo (which I think I should do as a pull request so it can be reviewd). :D

I have the markerb gem installed, the mailers are set up to send multipart text+html (not as many changes there as I expected.. nice) and all except the Devise email templates are converted to markerb format (I used the html templates where possible).

Steven Hancock

unread,
Apr 28, 2012, 7:04:15 AM4/28/12
to diaspora-dev
Ok, I've been sidetracked with an insane amount of other work lately
(can't say I didn't need it.. keeps a roof over my head and food on my
plate lol), but I should have some free time again this week so I'm
back on this one. :)

On Mar 29, 6:41 am, Steven Hancock <stevenh...@gmail.com> wrote:
> My current work on this feature is athttps://github.com/stevenh512/diaspora/tree/refactor-emails

Maxwell Salzberg

unread,
May 4, 2012, 5:22:36 PM5/4/12
to diaspo...@googlegroups.com
Wanted to follow up on this.  I'd be happy to help out with this... should we make it branch on diaspora/diaspora?

-m

--
You received this message because you are subscribed to the Google Groups "diaspora-dev" group.

Steven Hancock

unread,
May 5, 2012, 1:36:19 AM5/5/12
to diaspora-dev
I got so busy with other work that by the time I got back to this, it
was easier to start over.. which worked out because I ended up with
better Markdown templates than I originally had. I've updated all the
templates except for invitations (which I think should be discussed a
bit because of the major differences between the current plain-text
and HTML versions of the template).

I was able to test the templates I did change this evening (my ISP is
now connecting to my pod on Heroku again lol) and they seem to render
correctly in GMail and in Mozilla Thunderbird, so I just sent a pull
request.

On May 4, 2:22 pm, Maxwell Salzberg <maxw...@joindiaspora.com> wrote:
> Wanted to follow up on this.  I'd be happy to help out with this... should
> we make it branch on diaspora/diaspora?
>
> -m
>
Reply all
Reply to author
Forward
0 new messages