-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
a bunch of fixes to the daily email PR #6728
Conversation
this is ready for review, would like to get it in if possible to make usre the first new daily email ppl get is good. note: i cant run the linter due to a few upstream issues @sebastiantf @gitcoinco/engineers
|
url = models.URLField(db_index=True) | ||
comment = models.TextField(max_length=255, default='', blank=True) | ||
|
||
@property |
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.
todo in the future, make grants rounds, hackathons, workshops auto create these objects.
upcoming_events.append({ | ||
'event': upcoming_grant, | ||
'title': upcoming_grant.title, | ||
'image_url': upcoming_grant.logo.url if upcoming_grant.logo else f'{settings.STATIC_URL}v2/images/emails/grants-neg.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.
didnt make any sense to show grants by their clr calc date IMHO.
if we want to include trending grants in the future.. we should do it in its own section. @sebastiantf lmk if you waant to work on that.
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.
@sebastiantf another thing i could use help on is that the email takes about 2s to calculate. happy to write a v2 ticket where you do the above and also profile/improve the performance of it so we can send 30k/day (scaling up to 100k in the next year)
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.
didnt make any sense to show grants by their clr calc date IMHO.
if we want to include trending grants in the future.. we should do it in its own section. @sebastiantf lmk if you waant to work on that.
Yeah sure
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.
logging the perf issues here #6729
a few more things i want to do...
- add to subject line: upcoming dates, num notifications, num announcements, etc
- what else?? will know more as this ships.
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.
grants
Codecov Report
@@ Coverage Diff @@
## master #6728 +/- ##
==========================================
+ Coverage 26.67% 26.69% +0.01%
==========================================
Files 293 293
Lines 27817 27863 +46
Branches 4109 4112 +3
==========================================
+ Hits 7420 7437 +17
- Misses 20132 20156 +24
- Partials 265 270 +5
Continue to review full report at Codecov.
|
looks like upstream linter issues have been fixed. thanks @octavioamu |
gs '
<div class="dropdown-menu dropdown-menu-right shadow font-smaller-4 px-0"> | ||
{% if can_pin %} | ||
<a class="pin_activity mr-2 dropdown-item px-3 font-smaller-5" data-toggle="tooltip" title="Pinned post will display at the top of the feed." href=# | ||
data-url="{{row.url}}" | ||
<a class="pin_activity mr-2 dropdown-item px-3 font-smaller-5" data-toggle="tooltip" title="Pinned post will display at the top of the feed." hrefo=# |
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.
hrefo ?
<a class="pin_activity mr-2 dropdown-item px-3 font-smaller-5" data-toggle="tooltip" title="Pinned post will display at the top of the feed." href=# | ||
data-url="{{row.url}}" | ||
<a class="pin_activity mr-2 dropdown-item px-3 font-smaller-5" data-toggle="tooltip" title="Pinned post will display at the top of the feed." hrefo=# | ||
data-url="{{rw.url}}" |
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.
rw ? :P
@@ -287,7 +287,7 @@ | |||
> | |||
<span class="action {% if row.metadata.liked %}open{%endif%}"> | |||
{% if for_email %} | |||
<img class="fa-icon-png" src=""{% static "v2/images/emails/heart-regular.png" %}"> | |||
<img class="fa-icon-png" src="{{base_url}}static/v2/images/emails/heart-regular.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.
Did {% static
not work ?
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.
@@ -152,7 +196,7 @@ <h3>{% trans "Matching your profile" %}</h3> | |||
{% endif %} | |||
|
|||
<p> | |||
{% trans "You are receiving this email because your email address is on the notification list" %}. <a href="{% url 'email_settings' subscriber.priv %}" style="text-decoration: underline;">{% trans "Manage Email Settings" %}</a>. | |||
{% trans "You are receiving this email bc you are subscribed to daily emails." %} <a href="{% url 'email_settings' subscriber.priv %}" style="text-decoration: underline;">{% trans "Manage Email Settings" %}</a> | <a href="{% url 'email_settings' subscriber.priv %}?type=new_bounty_notifications" style="text-decoration: underline;">{% trans "Unsubscribe" %}</a>. |
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.
bc ?
makes a bunch of changes to the new daily email so that itll actually look good in prod:
tested at http://localhost:8000/_administration/email/new_bounty_daily