Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Jul 15, 2025

The button group generated in email templates is expected to show the two buttons side by side in a single row, but in Outlook both buttons took the full width of the wrapper row and each button was shown in its own row. To solve that the buttons are wrapped in an additional table that shows each button in its own cell, limiting their width and showing them in a single row; this is done conditionally and only applied in Outlook, so it should not affect other clients.

The ghost column technique was got from https://www.emailonacid.com/blog/article/email-development/using-ghost-columns-to-fix-alignment-problems-in-outlook/ Further Outlook quirks can be seen in https://www.emailonacid.com/blog/article/email-development/how-to-code-emails-for-outlook-2016/

Reviewers: while it would be desirable to improve a bit more the look of the button this is tricky due to the limitations of Outlook, so for now the current fix should be merged and if it ends being possible to improve it further it can always be done in a follow-up.

🆘 Help needed

However, please note that I do not have Outlook myself, so this fix is just theoretical and it has not been tested (other than trying to simulate in Firefox the reported behaviour of Outlook and then adding the wrapper table to check the result), so this should be verified (and, maybe, adjusted) by someone with access to Outlook :-) Thanks!

🖼️ Screenshots

🏚️ Before 🏡 After
Browser:
Email-Template-Invite-Guest-Browser-Before
Outlook:
Email-Template-Invite-Guest-Outlook-Before Email-Template-Invite-Guest-Outlook-After

How to test

  • Configure an e-mail server
  • Install and enable the Guests app
  • Open the Files app
  • Open the Sharing tab for a file
  • In the external shares, type an e-mail address (which is not a user yet in the Nextcloud instance)
  • Select Invite guest
  • Open the e-mail sent to the guest in Outlook

@danxuliu
Copy link
Member Author

/backport to stable31

@danxuliu
Copy link
Member Author

/backport to stable30

@danxuliu danxuliu force-pushed the fix-button-alignment-for-email-templates-in-outlook branch from 80776ad to 0691967 Compare August 6, 2025 11:59
@danxuliu danxuliu added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 6, 2025
@danxuliu danxuliu marked this pull request as ready for review August 6, 2025 12:00
@danxuliu danxuliu requested a review from a team as a code owner August 6, 2025 12:00
@danxuliu danxuliu requested review from Altahrim, icewind1991 and sorbaugh and removed request for a team August 6, 2025 12:00
The button group generated in email templates is expected to show the
two buttons side by side in a single row, but in Outlook both buttons
took the full width of the wrapper row and each button was shown in
its own row. To solve that the buttons are wrapped in an additional
table that shows each button in its own cell, limiting their width and
showing them in a single row; this is done conditionally and only
applied in Outlook, so it should not affect other clients.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the fix-button-alignment-for-email-templates-in-outlook branch from 0691967 to 8b7aad8 Compare August 6, 2025 13:18
@danxuliu danxuliu merged commit 3ba7888 into master Aug 6, 2025
210 of 214 checks passed
@danxuliu danxuliu deleted the fix-button-alignment-for-email-templates-in-outlook branch August 6, 2025 17:43
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
@skjnldsv skjnldsv added this to the Nextcloud 32 milestone Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants