Skip to content

Commit e00fdda

Browse files
authored
Minor mobile display improvements for weekly report emails. (#4464)
1 parent e2a63ea commit e00fdda

File tree

1 file changed

+32
-26
lines changed
  • src/sentry/templates/sentry/emails/reports

1 file changed

+32
-26
lines changed

src/sentry/templates/sentry/emails/reports/body.html

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
color: #fff;
3939
}
4040

41+
.graph .bar {
42+
margin-bottom: 0;
43+
}
44+
45+
.graph .bar td,
46+
.graph .bar th {
47+
line-height: 0;
48+
}
49+
4150
.issue-graph {
4251
table-layout: fixed;
4352
}
@@ -54,13 +63,13 @@
5463
color: #848296;
5564
}
5665

57-
.legend .all,
58-
.issue-graph-bar .all {
66+
#events-seen .legend .all,
67+
#events-seen .bar .all {
5968
background-color: #ebe9f7;
6069
}
6170

62-
.legend .resolved,
63-
.issue-graph-bar .resolved {
71+
#events-seen .legend .resolved,
72+
#events-seen .bar .resolved {
6473
background-color: #6C5FC7;
6574
}
6675

@@ -93,20 +102,19 @@
93102
vertical-align: middle;
94103
}
95104

96-
.issue-graph, .issue-graph-bar {
105+
.issue-graph, .issue-graph .bar {
97106
margin-bottom: 0;
98107
}
99108

100-
.issue-graph-bar td {
109+
.issue-graph .bar td {
101110
font-size: 0;
102111
}
103112

104113
.project-breakdown {
105-
margin-bottom: 40px;
114+
margin-bottom: 20px;
106115
}
107116

108117
.project-breakdown .graph {
109-
margin-bottom: 10px;
110118
table-layout: fixed;
111119
}
112120

@@ -228,6 +236,10 @@
228236
padding-right: 20px;
229237
}
230238

239+
#history-calendars h4 {
240+
margin-bottom: 0px;
241+
}
242+
231243
</style>
232244

233245
<style type="text/css" inline="false">
@@ -253,7 +265,7 @@
253265
text-align: center !important;
254266
}
255267

256-
.issue-graph-bar .all {
268+
#events-seen .bar .all {
257269
background-color: #6C5FC7 !important;
258270
}
259271

@@ -302,19 +314,11 @@
302314
height: 8px !important;
303315
}
304316

305-
#history-calendars h4 {
306-
margin-bottom: 0px !important;
307-
}
308-
309317
.spectrum {
310318
margin: 20px 0 0 !important;
311319
text-align: center !important;
312320
}
313321

314-
.spectrum .range span {
315-
width: 10px !important;
316-
}
317-
318322
}
319323

320324
</style>
@@ -363,7 +367,7 @@ <h4>Events Seen {{ duration.noun|title }}</h4>
363367
{% with report.series.maximum as max %}
364368
{% for timestamp, metrics in report.series.points %}
365369
<td valign="bottom" style="width: {% widthratio 1 report.series.points|length 100 %}%">
366-
<table class="issue-graph-bar">
370+
<table class="bar">
367371
{% if metrics.resolved or metrics.unresolved %}
368372
<tr>
369373
<td class="all" height="{% widthratio metrics.unresolved max 52 %}px" title="{{ metrics.unresolved }}">&nbsp;</td>
@@ -459,25 +463,27 @@ <h4>Events by Project</h4>
459463
<tr>
460464
{% for timestamp, values in series.points %}
461465
<td valign="bottom" class="bar" style="height: {{ height }}px; width: {% widthratio 1 series.points|length 100 %}%">
462-
<table>
466+
<table class="bar">
463467
{% for key, count in values %}
464468
<tr>
465469
<td height="{% widthratio count series.maximum height %}" style="background-color: {{ key.color }};">&nbsp;</td>
466470
</tr>
467471
{% empty %}
468472
<tr>
469473
<td height="1" style="background-color: #ebe9f7;"></td>
470-
</td>
471-
{% endfor %}
472-
<tr>
473-
<td class="label">
474-
{{ timestamp|date:duration.date_format }}
475474
</tr>
476-
</td>
475+
{% endfor %}
477476
</table>
478477
</td>
479478
{% endfor %}
480479
</tr>
480+
<tr>
481+
{% for timestamp, values in series.points %}
482+
<td class="label" style="width: {% widthratio 1 series.points|length 100 %}%">
483+
{{ timestamp|date:duration.date_format }}
484+
</td>
485+
{% endfor %}
486+
</tr>
481487
</table>
482488

483489
<table class="summary">
@@ -519,7 +525,7 @@ <h4>Events by Project</h4>
519525
<th style="width: 300px;">
520526
<h4>3 Month History</h4>
521527
</th>
522-
<td class="spectrum">
528+
<td class="spectrum" style="vertical-align: bottom;">
523529
Less Events
524530
<div class="range">{% for color in report.calendar.legend %}<span style="background-color: {{ color }}">&nbsp;</span>{% endfor %}</div>
525531
More Events

0 commit comments

Comments
 (0)