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

New dashboard: notification to point users there #11161

Merged
merged 5 commits into from Feb 29, 2024

Conversation

humitos
Copy link
Member

@humitos humitos commented Feb 27, 2024

We can add the notifications to all the users by running the following code:

from readthedocs.core.notifications import MESSAGE_BETA_DASHBOARD_AVAILABLE

for user in User.objects.all():
    Notification.objects.add(
      message_id=MESSAGE_BETA_DASHBOARD_AVAILABLE,
      attached_to=user,
      dismissable=True,
    )

This will show a one-time dismissable notification to these users.

In the future (weeks, months) if we want to show them another notification like this
one as a reminder, we can run the same code again.

Screenshot_2024-02-27_18-42-27

Related readthedocs/ext-theme#183
Related readthedocs/ext-theme#284

We can add the notifications to all the users by running the following code:

```python
from readthedocs.core.notifications import MESSAGE_BETA_DASHBOARD_AVAILABLE

for user in User.objects.all():
    Notification.objects.add(
      message_id=MESSAGE_BETA_DASHBOARD_AVAILABLE,
      attached_to=user,
      dismissable=True,
    )
```

This will show a one-time dismissable notification to these users.
In the future (weeks, months) if we can show them another notification like this
one as a reminder, we can run the same code again.

Related readthedocs/ext-theme#183
Copy link
Contributor

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

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

I have questions on the UX here, and ultimately still lean towards adding a link on the build page next.

I worry that this notification will be visible on the new dashboard as users log in to the instance or click the notification to log in. Is there a way that we can filter this out from the new dashboard?

readthedocs/core/notifications.py Show resolved Hide resolved
readthedocs/core/notifications.py Outdated Show resolved Hide resolved
readthedocs/core/notifications.py Outdated Show resolved Hide resolved
@humitos
Copy link
Member Author

humitos commented Feb 28, 2024

I worry that this notification will be visible on the new dashboard as users log in to the instance or click the notification to log in. Is there a way that we can filter this out from the new dashboard?

I updated the notification to show a different message when it's show on the new dashboard.

Old dashboard

It says the new dashboard is available with a link to it.

Screenshot_2024-02-28_12-55-05

New dashboard

It says there may be issues and ask for feedback to the user.

Screenshot_2024-02-28_12-54-30

readthedocs/core/notifications.py Outdated Show resolved Hide resolved
Comment on lines +32 to +39
{% 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 %}
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is fantastic

"Fantastic" is a big word, tho. I think saying a "nice hack" fits better here 😝

readthedocs/core/notifications.py Show resolved Hide resolved
Co-authored-by: Anthony <aj@ohess.org>
@humitos humitos enabled auto-merge (squash) February 29, 2024 17:28
@humitos humitos merged commit 695667e into main Feb 29, 2024
4 checks passed
@humitos humitos deleted the humitos/beta-dashboard-notification branch February 29, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants