-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New dashboard: notification to point users there #11161
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
Changes from 4 commits
e74350b
0ccb3e3
8b66ce9
5736725
969f270
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,11 @@ | |
|
||
from django.utils.translation import gettext_lazy as _ | ||
|
||
from readthedocs.notifications.constants import WARNING | ||
from readthedocs.notifications.constants import INFO, WARNING | ||
from readthedocs.notifications.messages import Message, registry | ||
|
||
MESSAGE_EMAIL_VALIDATION_PENDING = "core:email:validation-pending" | ||
MESSAGE_BETA_DASHBOARD_AVAILABLE = "core:dashboard:beta-available" | ||
messages = [ | ||
Message( | ||
id=MESSAGE_EMAIL_VALIDATION_PENDING, | ||
|
@@ -22,6 +23,25 @@ | |
), | ||
type=WARNING, | ||
), | ||
Message( | ||
id=MESSAGE_BETA_DASHBOARD_AVAILABLE, | ||
header=_("New beta dashboard available"), | ||
body=_( | ||
textwrap.dedent( | ||
""" | ||
{% if RTD_EXT_THEME_ENABLED %} | ||
This dashboard is currently in beta, | ||
you can <a href="https://{{ PRODUCTION_DOMAIN }}">return to the legacy dashboard</a> if you encounter any problems. | ||
Feel free to <a href="https://{{ PRODUCTION_DOMAIN }}/support/">report any feedback</a> you may have. | ||
{% else %} | ||
Our new <strong>beta dashboard</strong> is now available for testing. | ||
<a href="https://beta.{{ PRODUCTION_DOMAIN }}/">Give it a try</a> and send us feedback. | ||
{% endif %} | ||
Comment on lines
+32
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤯 I knew we were using templating, but I somehow totally missed the fact we could use template logic in the notification. This is fantastic. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
"Fantastic" is a big word, tho. I think saying a "nice hack" fits better here 😝 |
||
""" | ||
).strip(), | ||
), | ||
type=INFO, | ||
), | ||
agjohnson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
] | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ class TestNotification(EmailNotification): | |
"PRODUCTION_DOMAIN": "readthedocs.org", | ||
"PUBLIC_DOMAIN": mock.ANY, | ||
"PUBLIC_API_URL": mock.ANY, | ||
"RTD_EXT_THEME_ENABLED": mock.ANY, | ||
"SITE_ROOT": mock.ANY, | ||
"SUPPORT_EMAIL": "[email protected]", | ||
"TEMPLATE_ROOT": mock.ANY, | ||
|
Uh oh!
There was an error while loading. Please reload this page.