Skip to content
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

Add a dashboard with email previews #92

Merged
merged 9 commits into from
Sep 27, 2024
Merged

Add a dashboard with email previews #92

merged 9 commits into from
Sep 27, 2024

Conversation

amureki
Copy link
Member

@amureki amureki commented Aug 14, 2024

Introducing a way to access a dashboard with all available email classes used in the project.

  • /emark/dashboard/ allows to see the list of emails
  • /emark/dashboard/<str:email_class>/ gets to the raw email preview without any values filled
  • A new setting EMARK.DASHBOARD_HIDDEN_CLASSES allows to exclude certain classes (for example abstract base classes) from the dashboard

@amureki amureki self-assigned this Aug 14, 2024
@amureki amureki changed the title Add dashboard with emails preview Add a dashboard with email previews Aug 14, 2024
emark/utils.py Outdated Show resolved Hide resolved
emark/views.py Outdated Show resolved Hide resolved
emark/views.py Outdated Show resolved Hide resolved
emark/views.py Outdated Show resolved Hide resolved
emark/views.py Outdated Show resolved Hide resolved
emark/views.py Outdated Show resolved Hide resolved
emark/registry.py Outdated Show resolved Hide resolved
emark/registry.py Outdated Show resolved Hide resolved
emark/message.py Show resolved Hide resolved
Copy link
Member

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I amended a little rewrite. Someone else needs to review this again.

Copy link
Contributor

@herrbenesch herrbenesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Really like the concept.
It's already a win to have a list of registered emails.
The rendered email itself does currently only provide a small improvement from just looking at the code. Especially given the following use cases:

  1. As a dev, I want a preview of email changes without the need to send one to myself
  2. As an email marketing person, I want to see the rendered emails as if they were sent to me directly.

IMHO This feature would be more useful if it rendered out the html. At least the include statements should be resolved.
Also we allow to mix html and markdown formatting which leads to broken looking email previews since only the markdown is rendered.
I'm ok with treating this as a preview feature. Rendered HTML would be actually useful though.

emark/contrib/dashboard/views.py Outdated Show resolved Hide resolved
emark/contrib/dashboard/views.py Outdated Show resolved Hide resolved
emark/contrib/dashboard/views.py Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
emark/contrib/dashboard/urls.py Show resolved Hide resolved
Copy link
Contributor

@herrbenesch herrbenesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still find this more useful if somehow the html was rendered. A very good start though.

@codingjoe codingjoe merged commit 62d8b87 into main Sep 27, 2024
10 checks passed
@codingjoe codingjoe deleted the preview-dashboard branch September 27, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants