Skip to content

[WebProfilerBundle] Update the mailer panel #47643

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

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

javiereguiluz
Copy link
Member

Q A
Branch? 6.2
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Related to #47148, this updates one of the panels which weren't updated in that other PR.

Before - 1 email sent

before-1-email

Before - Multiple emails sent

before-multiple-emails

Before - Email attachments

before-attachment


After - 1 email sent

after-1-email

Comments:

  • All email contents are displayed on the same place, to make debugging quicker
  • All headers are displayed too; this can be long in some cases, but I think it's better to display them all to spot errors easier and quicker
  • Attachments now display file name, file size and a link to download them as files. We no longer display the base64-encoded contents of the file

After - Multiple emails sent

after-multiple-emails

Comments:

  • When there's more than 1 email sent/queued, we display the "Email 1", "Email 2", etc. navigation (which is hidden when there's only 1 email to make design more efficient)

After - MIME parts

after-mime-parts

Comments:

  • This is the same as before

After - Raw message

after-raw-message

Comments:

  • We now include a link to download the raw email as a *.eml file

@stof
Copy link
Member

stof commented Sep 21, 2022

One thing that seems gone is showing which transport was used for each email (previously, it was shown in the tabs switching between emails)

@stof
Copy link
Member

stof commented Sep 21, 2022

@javiereguiluz can you share the before/after comparison for how the panel looks like with multiple transports ?

@javiereguiluz
Copy link
Member Author

@stof thanks for the review. About the transport, to reduce the noise I thought it was a good idea to only display the transport if there's more than one transport. This is how it'd look like when showing the transport name:

mailer-transport

But thanks to your comment, I realized that maybe your app defines multiple transports, but this request only used one of them ... so you need the transport info somewhere. What about showing it like this:

mailer-transport-information

Do you know how long can be the transport name in practice? It's the full DNS or a human-friendly short name? Thanks!

@stof
Copy link
Member

stof commented Sep 21, 2022

IIRC, it is the full DSN (minus the auth part)

@javiereguiluz
Copy link
Member Author

Given that it's the DSN, I've updated the design as follows:

transport-sent

transport-queued

@ro0NL
Copy link
Contributor

ro0NL commented Sep 21, 2022

what about showing multiple emails inbox-like? eg. a list of subject and date.

@stof
Copy link
Member

stof commented Sep 21, 2022

@ro0NL I doubt you will have web requests sending lots of emails (such case must be handled asynchronously). So it is better to optimize the experience for a few emails than for the case of a big list IMO.

@ro0NL
Copy link
Contributor

ro0NL commented Sep 21, 2022

im not sure how not seeing the subject improves the experience ...

@stof
Copy link
Member

stof commented Sep 21, 2022

Well, if you want to display the subject instead of just #1 and #2, it requires moving away from horizontal tabs then (as the subject won't fit in them), which means adding much more space for this email switcher.

@javiereguiluz
Copy link
Member Author

I liked @ro0NL proposal, so I gave it a shot ... and I think it works better. It now shows a clickable list of messages to follow the familiar behavior of email clients:

mailer-email-list

We also protect the design against too long lists:

mailer-list-long

@javiereguiluz
Copy link
Member Author

@stof I thought about what you said and I think you were right. That's why I've changed my mind and introduced some buttons in the table of emails to make it accessible.

This is how it looks when using a browser with accessibility capabilities. In regular browsers, the buttons are completely hidden:

table-accessible

So, I think this feature is now ready and complete. Thanks.

@fabpot
Copy link
Member

fabpot commented Oct 1, 2022

Thank you @javiereguiluz.

@fabpot fabpot merged commit cc4003b into symfony:6.2 Oct 1, 2022
@javiereguiluz javiereguiluz deleted the mailer_panel branch October 1, 2022 14:58
@fabpot fabpot mentioned this pull request Oct 24, 2022
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.

6 participants