Web: Update Gitcoin Email Designs

Created on 7 Mar 2018  ยท  27Comments  ยท  Source: gitcoinco/web

Designs https://github.com/gitcoinco/web/issues/454#issuecomment-371242271

Issues Email.png

Newsletter Email.png

Emails to Update:

    url(r'^_administration/email/new_bounty$', retail.emails.new_bounty, name='new_bounty'),
    url(r'^_administration/email/roundup$', retail.emails.roundup, name='roundup'),
    url(r'^_administration/email/new_tip$', retail.emails.new_tip, name='new_tip'),
    url(r'^_administration/email/new_match$', retail.emails.new_match, name='new_match'),
    url(r'^_administration/email/new_work_submission$', retail.emails.new_work_submission, name='new_work_submission'),
    url(r'^_administration/email/new_bounty_rejection$', retail.emails.new_bounty_rejection, name='new_bounty_rejection'),
    url(r'^_administration/email/new_bounty_acceptance$', retail.emails.new_bounty_acceptance, name='new_bounty_acceptance'),
    url(r'^_administration/email/bounty_expire_warning$', retail.emails.bounty_expire_warning, name='bounty_expire_warning'),
    url(r'^_administration/email/start_work_expire_warning$', retail.emails.start_work_expire_warning, name='start_work_expire_warning'),
    url(r'^_administration/email/start_work_expired$', retail.emails.start_work_expired, name='start_work_expired'),
    url(r'^_administration/process_accesscode_request/(.*)$', tdi.views.process_accesscode_request, name='process_accesscode_request'),

Bounty

  • Update all of the above emails to match @PixelantDesign s design
  • Designs must be responsive (desktop, tablet, mobile)

Reference Material

  • Design files can be found here
Gitcoin Emails community member design-help needs design

Most helpful comment

Just commenting here to satisfy the Gitcoin bot that I am still working on this issue. I don't think it noticed #746 ๐Ÿ˜›๐Ÿ˜„

All 27 comments

__This issue now has a funding of 0.12 ETH (88.32 USD @ $736.0/ETH) attached to it.__

  • If you would like to work on this issue you can claim it here.
  • If you've completed this issue and want to claim the bounty you can do so here
  • Questions? Get help on the Gitcoin Slack
  • $6536.08 more Funded OSS Work Available at: https://gitcoin.co/explorer

I'm gonna try to come up with something here before the weekend is over!

Will @PixelantDesign prepare the design for the rest of the emails?

Will @PixelantDesign prepare the design for the rest of the emails?

I think that updating the general email template (and the design of the email/bounty.html module) should suffice.. but it definitely wouldnt hurt to eyeball each of the individual emails (this can easily be done in the admin via the routes i posted) to make sure theres nothing glaringly broken in them

@PixelantDesign does that sound okay to you?

I'm good with using this task as a general template update. We'll need evaluate which of the emails require more TLC and scope designing those out.

@hipzoep

@PixelantDesign @owocki @olafghanizadeh Super pumped for this... I'm going to up my personal priority for #448 to align on timing here to get something cool together!

@olafghanizadeh are you still working on this?

__Work has been started on the 0.12 ETH (50.68 USD @ $422.33/ETH) funding by__:

  1. @jakerockland

__Please work together__ and coordinate delivery of the issue scope. Gitcoin doesn't know enough about everyones skillsets / free time to say who should work on what, but we trust that the community is smart and well-intentioned enough to work together. As a general rule; if you start work first, youll be at the top of the above list ^^, and should have 'dibs' as long as you follow through.

On the above list? Please leave a comment to let the funder (@owocki) and the other parties involved what you're working, with respect to this issue and your plans to resolve it. If you don't leave a comment, the funder may expire your submission at their discretion.

I would like to work on this, @owocki is that alright? First time using the issue explorer to start working on a funded issue so want to make sure I'm doing things right ๐Ÿ˜…

yes please! glad to have you @jakerockland

@jakerockland Feel free to reach out to me on Slack if you have any questions!

@jakerockland let me know if you have questions about the design.

Made some initial progress on this last night. However, I am having a problem previewing the following emails:

    url(r'^_administration/email/roundup$', retail.emails.roundup, name='roundup'),
    url(r'^_administration/email/new_tip$', retail.emails.new_tip, name='new_tip'),
    url(r'^_administration/email/bounty_expire_warning$', retail.emails.bounty_expire_warning, name='bounty_expire_warning'),
    url(r'^_administration/process_accesscode_request/(.*)$', tdi.views.process_accesscode_request, name='process_accesscode_request'),

@owocki When I try to view them on my local Docker instance I get bad request responses from Django.

@jakerockland Is there a stacktrace or just a 404?

Ah yes.

For /roundup:

Environment:


Request Method: GET
Request URL: http://0.0.0.0:8000/_administration/email/roundup

Django Version: 2.0.3
Python Version: 3.6.4
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'whitenoise.runserver_nostatic',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django.contrib.sitemaps',
 'django.contrib.sites',
 'app',
 'retail',
 'rest_framework',
 'bootstrap3',
 'marketing',
 'economy',
 'dashboard',
 'faucet',
 'tdi',
 'gas',
 'github',
 'legacy',
 'chartit',
 'email_obfuscator',
 'linkshortener',
 'credits',
 'gitcoinbot',
 'external_bounties']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'ratelimit.middleware.RatelimitMiddleware',
 'github.middleware.GithubAuthMiddleware']



Traceback:

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/code/app/retail/emails.py" in roundup
  472.     response_html, _, _ = render_new_bounty_roundup(settings.CONTACT_EMAIL)

File "/code/app/retail/emails.py" in render_new_bounty_roundup
  319.             'obj': Bounty.objects.get(current_bounty=True, github_url='https://github.com/ipld/js-cid/issues/38'),

File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
  82.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in get
  403.                 self.model._meta.object_name

Exception Type: DoesNotExist at /_administration/email/roundup
Exception Value: Bounty matching query does not exist.

For /new_tip:

Environment:


Request Method: GET
Request URL: http://0.0.0.0:8000/_administration/email/new_tip

Django Version: 2.0.3
Python Version: 3.6.4
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'whitenoise.runserver_nostatic',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django.contrib.sitemaps',
 'django.contrib.sites',
 'app',
 'retail',
 'rest_framework',
 'bootstrap3',
 'marketing',
 'economy',
 'dashboard',
 'faucet',
 'tdi',
 'gas',
 'github',
 'legacy',
 'chartit',
 'email_obfuscator',
 'linkshortener',
 'credits',
 'gitcoinbot',
 'external_bounties']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'ratelimit.middleware.RatelimitMiddleware',
 'github.middleware.GithubAuthMiddleware']



Traceback:

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/code/app/retail/emails.py" in new_tip
  356.     response_html, _ = render_tip_email(settings.CONTACT_EMAIL, tip, True)

File "/code/app/retail/emails.py" in render_tip_email
  44.     warning = tip.network if tip.network != 'mainnet' else ""

Exception Type: AttributeError at /_administration/email/new_tip
Exception Value: 'NoneType' object has no attribute 'network'

For /bounty_expire_warning:

Environment:


Request Method: GET
Request URL: http://0.0.0.0:8000/_administration/email/bounty_expire_warning

Django Version: 2.0.3
Python Version: 3.6.4
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'whitenoise.runserver_nostatic',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django.contrib.sitemaps',
 'django.contrib.sites',
 'app',
 'retail',
 'rest_framework',
 'bootstrap3',
 'marketing',
 'economy',
 'dashboard',
 'faucet',
 'tdi',
 'gas',
 'github',
 'legacy',
 'chartit',
 'email_obfuscator',
 'linkshortener',
 'credits',
 'gitcoinbot',
 'external_bounties']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'ratelimit.middleware.RatelimitMiddleware',
 'github.middleware.GithubAuthMiddleware']



Traceback:

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/code/app/retail/emails.py" in bounty_expire_warning
  436.     response_html, _ = render_bounty_expire_warning(settings.CONTACT_EMAIL, Bounty.objects.last())

File "/code/app/retail/emails.py" in render_bounty_expire_warning
  182.     num = int(round((bounty.expires_date - timezone.now()).days, 0))

Exception Type: AttributeError at /_administration/email/bounty_expire_warning
Exception Value: 'NoneType' object has no attribute 'expires_date'

For /process_accesscode_request:

Environment:


Request Method: GET
Request URL: http://0.0.0.0:8000/_administration/process_accesscode_request/

Django Version: 2.0.3
Python Version: 3.6.4
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'whitenoise.runserver_nostatic',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django.contrib.sitemaps',
 'django.contrib.sites',
 'app',
 'retail',
 'rest_framework',
 'bootstrap3',
 'marketing',
 'economy',
 'dashboard',
 'faucet',
 'tdi',
 'gas',
 'github',
 'legacy',
 'chartit',
 'email_obfuscator',
 'linkshortener',
 'credits',
 'gitcoinbot',
 'external_bounties']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'ratelimit.middleware.RatelimitMiddleware',
 'github.middleware.GithubAuthMiddleware']



Traceback:

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  21.                 return view_func(request, *args, **kwargs)

File "/code/app/tdi/views.py" in process_accesscode_request
  222.     obj = WhitepaperAccessRequest.objects.get(pk=pk)

File "/usr/local/lib/python3.6/site-packages/django/db/models/manager.py" in manager_method
  82.                 return getattr(self.get_queryset(), name)(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in get
  394.         clone = self.filter(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in filter
  836.         return self._filter_or_exclude(False, *args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/db/models/query.py" in _filter_or_exclude
  854.             clone.query.add_q(Q(*args, **kwargs))

File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in add_q
  1253.         clause, _ = self._add_q(q_object, self.used_aliases)

File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in _add_q
  1277.                     split_subq=split_subq,

File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in build_filter
  1215.         condition = self.build_lookup(lookups, col, value)

File "/usr/local/lib/python3.6/site-packages/django/db/models/sql/query.py" in build_lookup
  1085.         lookup = lookup_class(lhs, rhs)

File "/usr/local/lib/python3.6/site-packages/django/db/models/lookups.py" in __init__
  18.         self.rhs = self.get_prep_lookup()

File "/usr/local/lib/python3.6/site-packages/django/db/models/lookups.py" in get_prep_lookup
  68.             return self.lhs.output_field.get_prep_value(self.rhs)

File "/usr/local/lib/python3.6/site-packages/django/db/models/fields/__init__.py" in get_prep_value
  947.         return int(value)

Exception Type: ValueError at /_administration/process_accesscode_request/
Exception Value: invalid literal for int() with base 10: ''

I am guessing it has something to do with me not correctly passing URL parameters to the page but am not _quite_ sure what the issue is. Apologies if this is a simple error on my part ๐Ÿ˜… first time working directly with the repo here and haven't used Django before, only Flask.

Exception Value: 'NoneType' object has no attribute 'network'
Exception Value: Bounty matching query does not exist.

this is because your docker instance doesnt have any bounties loaded in it!

Try importing a few bounties. See the instructions at https://github.com/gitcoinco/web/blob/master/docs/RUNNING_LOCALLY_DOCKER.md#optional-import-bounty-data-from-web3-to-your-database

@owocki hmm it seems that doing so only loads one bounty and my problem persists:

โžœ  web git:(email-designs) docker-compose exec web python3 app/manage.py sync_geth mainnet 400 99999999999
/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
[3/27 15:00] Getting bounty 400

try running sync_geth with the following args instead of the ones in the readme

sync_geth mainnet 40 99999999999

@owocki that worked in syncing bounties but I am still getting the same exceptions for /roundup and /new_tip

Do I need to be passing URL parameters?

@owocki While I don't think this is ready for submission yet, I think we're pretty close. Should I open a PR as a work in progress or what is the best way to get some feedback as to whether this is moving in the right direction?

https://github.com/jakerockland/web/tree/email-designs

I have been trying to stick to only changing stylistic things and not changing much of the HTML outside of the templates but not sure if changing headers/the "You are receiving this email because your email preferences" message is something within the scope of this message.

Do I need to be passing URL parameters?

i think you might want to take a look at these lines in the retail/emails.py file: new_tip, roundup. if you just generate a tip object in the DB (for the former), and adjust which bounties are passed into the roundup (for the latter), you should be good!

Should I open a PR as a work in progress or what is the best way to get some feedback as to whether this is moving in the right direction?

WIP PR pls. and also if you can post screenshots that'd be huge!

I have been trying to stick to only changing stylistic things and not changing much of the HTML outside of the templates but not sure if changing headers/the "You are receiving this email because your email preferences" message is something within the scope of this message.

feel free to take a sledgehammer (as opposed to a scalpel) to the current emails!

Just commenting here to satisfy the Gitcoin bot that I am still working on this issue. I don't think it noticed #746 ๐Ÿ˜›๐Ÿ˜„

__Work for 0.12 ETH (47.83 USD @ $398.61/ETH) has been submitted by__:

  1. @jakerockland

Submitters, please leave a comment to let the funder (@owocki) (and the other parties involved) that you've submitted you work. If you don't leave a comment, the funder may expire your submission at their discretion.

just got the above notification, and it was in the new email design. how meta! yay!

__The funding of 0.12 ETH (47.83 USD @ $398.61/ETH) attached to this issue has been approved & issued to @jakerockland.__

@owocki so meta--same!

screenshot 2018-04-09 12 14 35

side-note, this being my first completed Gitcoin bounty I can now say that the whole UX of using the Gitcoin system is super rad! ๐Ÿ™Œ

side-note, this being my first completed Gitcoin bounty I can now say that the whole UX of using the Gitcoin system is super rad! ๐Ÿ™Œ

if you're not careful.. you might become a testimonial :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  ยท  3Comments

uluhonolulu picture uluhonolulu  ยท  3Comments

abitrolly picture abitrolly  ยท  4Comments

mbeacom picture mbeacom  ยท  4Comments

IgorPerikov picture IgorPerikov  ยท  3Comments