|
4 | 4 |
|
5 | 5 | from django.utils.translation import gettext_lazy as _
|
6 | 6 |
|
7 |
| -from readthedocs.notifications.constants import INFO, WARNING |
| 7 | +from readthedocs.notifications.constants import TIP, WARNING |
8 | 8 | from readthedocs.notifications.messages import Message, registry
|
9 | 9 |
|
10 | 10 | MESSAGE_EMAIL_VALIDATION_PENDING = "core:email:validation-pending"
|
11 |
| -MESSAGE_BETA_DASHBOARD_AVAILABLE = "core:dashboard:beta-available" |
| 11 | +MESSAGE_NEW_DASHBOARD = "core:dashboard:new" |
12 | 12 | messages = [
|
13 | 13 | Message(
|
14 | 14 | id=MESSAGE_EMAIL_VALIDATION_PENDING,
|
|
23 | 23 | ),
|
24 | 24 | type=WARNING,
|
25 | 25 | ),
|
| 26 | + # This message looks quite odd because we need to show different content in |
| 27 | + # the notification depending on which instance the user is on -- if the user |
| 28 | + # is on our legacy dashboard, we don't want a notification "Welcome to our |
| 29 | + # new dashboard!". |
| 30 | + # |
| 31 | + # Localization is avoided because the body has template logic inside and we |
| 32 | + # don't want to push that to our translations sources. |
26 | 33 | Message(
|
27 |
| - id=MESSAGE_BETA_DASHBOARD_AVAILABLE, |
28 |
| - header=_("New beta dashboard"), |
29 |
| - body=_( |
30 |
| - textwrap.dedent( |
31 |
| - """ |
32 |
| - {% if RTD_EXT_THEME_ENABLED %} |
33 |
| - This dashboard is currently in beta, |
34 |
| - you can <a href="https://{{ PRODUCTION_DOMAIN }}">return to the legacy dashboard</a> if you encounter any problems. |
35 |
| - Feel free to <a href="https://{{ PRODUCTION_DOMAIN }}/support/">report any feedback</a> you may have. |
36 |
| - {% else %} |
37 |
| - Our new <strong>beta dashboard</strong> is now available for testing. |
38 |
| - <a href="https://app.{{ PRODUCTION_DOMAIN }}/">Give it a try</a> and send us feedback. |
39 |
| - {% endif %} |
| 34 | + id=MESSAGE_NEW_DASHBOARD, |
| 35 | + header=textwrap.dedent( |
40 | 36 | """
|
41 |
| - ).strip(), |
42 |
| - ), |
43 |
| - type=INFO, |
| 37 | + {% if RTD_EXT_THEME_ENABLED %} |
| 38 | + Welcome to our new dashboard! |
| 39 | + {% else %} |
| 40 | + Our new dashboard is ready! |
| 41 | + {% endif %} |
| 42 | + """ |
| 43 | + ).strip(), |
| 44 | + body=textwrap.dedent( |
| 45 | + """ |
| 46 | + {% if RTD_EXT_THEME_ENABLED %} |
| 47 | + We are beginning to direct users to our new dashboard as we work to retire our legacy dashboard. |
| 48 | + {% else %} |
| 49 | + You are currently using our legacy dashboard, which will be retired on <time datetime="2025-03-01">March 1st, 2025</time>. |
| 50 | + You should <a href="//{{ SWITCH_PRODUCTION_DOMAIN }}{% url "account_login" %}">switch to our new dashboard</a> before then. |
| 51 | + {% endif %} |
| 52 | + For more information on this change and what to expect, |
| 53 | + <a href="https://about.readthedocs.com/blog/2024/11/new-dashboard/">read our blog post</a>. |
| 54 | + """ |
| 55 | + ).strip(), |
| 56 | + type=TIP, |
| 57 | + icon_classes="fad fa-sparkles", |
44 | 58 | ),
|
45 | 59 | ]
|
46 | 60 |
|
|
0 commit comments