Acabo de fusionar una actualización, este fue un cambio más fácil de lo que esperaba. Esto debería evitar que la mayor parte del diseño se rompa cuando sea demasiado largo para Gmail.
main ← digest-truncation
opened 10:11PM - 19 Apr 23 UTC
This addresses an issue raised here: https://meta.discourse.org/t/email-summary-… styling-changed-as-rendered-in-gmail/251940
A simplified version of the problem:
```xml
<table>
<tr>
<td></td>
<td width="650"> </td>
<td></td>
</tr>
</table>
```
If the width-restricted `td` is too long, gmail will clip the end, including the following `td`.
When the last `td` is removed, the first `td` expands to fill the space and pushes all the content to the right, so it's no longer centered.
To avoid this, I've updated the structure so that each section centers itself and doesn't rely on the wrapping container.
```xml
<table>
<tr>
<td>
<table>
<tr>
<td></td>
<td width="650"> </td>
<td></td>
</tr>
</table>
<table>
<tr>
<td></td>
<td width="650"> </td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
```
So now if gmail clips a too-long email, only the last section that gets clipped will be misaligned.
This also results in a slightly different appearance with a wider background, but I think this is a completely fine trade-off.
Before:

After:

No es una plantilla editable como las otras, está en el código fuente de Discourse aquí: discourse/app/views/user_notifications/digest.html.erb at main · discourse/discourse · GitHub
3 Me gusta