Open mushon opened 8 years ago
Graph and map cannot be dynamically generated--you know, since it's email. To make this feasible, we need to manually add images of a map of spots and projection graphs and so on. Embedding webfonts can be possible in some mail clients;
And projection data also should be added in spots table in administration page.
mail template can be modified in /app/views/deposit_mailer/deposit_mail.html.erb
Yes, I know the maps and graphs should be rendered on the server and served in the email. Mapbox has an API for rendering static image maps from GL. Either way, we can always prepare the hotspots in advance (basically create screenshots manually). My main question is whether you think this is something we should do, or is it too much work at this point. Otherwise I'm open to other solutions.
Mushon Zer-Aviv Mushon.com | Shual.com | @Mushon
On Oct 29, 2016, at 05:10, Wonyoung So notifications@github.com wrote:
mail template can be modified in /app/views/deposit_mailer/deposit_mail.html.erb
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I think showing water projection data of invested spots will strengthen our works little bit because through pouring experience we can know what's happening around the world about the water. But I don't know..crafting email is basically annoying task so..
We can pretender the hotspots and basically also pretender the percentile projections, then just link to pre-rendered images, no?
Yes, if you make some of the graphs and maps of hotspots and send them to me, then I can upload them to somewhere in cloud and point them.
Ok. The hotspots will be easier than the graphs, but maybe I can think of something. Maybe we can use bars instead and render them in simple HTML.
Mushon Zer-Aviv Mushon.com | Shual.com | @mushon
On Oct 29, 2016, at 23:57, Wonyoung So notifications@github.com wrote:
Yes, if you make some of the graphs and maps of hotspots and send them to me, then I can upload them to somewhere in cloud and point them.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Rendering graph in email natively may be challenging although it's simple, because in some email clients they misinterpret <div>
tag and all of css should be inline. We need to take simple approach..
@wonyoungso can we simply pre-render all of the maps and graphs (in percentage) as PNGs on the server and then include them in the email?
Image URL structure:
https://api.mapbox.com/styles/v1/mushon/cittuq85x000s2irqfdmd1kdr/static/127.523067,36.346416,5.46,0.00,0.00/600x400?access_token=pk.eyJ1IjoibXVzaG9uIiwiYSI6IjY1bHhhTkEifQ.DhW2zcurHHBtmnc2FsMBqg
images are done, but I seriously think it is feasible in serverside rendering in graph..
Not sure I understood your previous response. So you think it IS feasible? Or not?
Mushon Zer-Aviv Mushon.com | Shual.com | @Mushon
On Nov 3, 2016, at 05:59, Wonyoung So notifications@github.com wrote:
images are done, but I seriously think it is feasible in serverside rendering in graph..
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
not feasible. (oh I wrote in completely opposite way..) it's heavy since it should be done in serverside and I need to install nodejs thing in heroku server and it's gonna be messed up. maybe we'll do it in just simple
except that, almost done.
Fair enough. How about this bar graph:
after @wonyoungso implements #33 @mushon will generate static images for graphs, push them to assets/images and reference them into the admin
Ideally it would be great to have the email come with small maps and graphs projecting the revenue. Something like this:
With the limits of the email system we're using and the limits of the technology, would that be feasible? And if not, what would?