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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion readthedocs/core/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -22,6 +23,19 @@
),
type=WARNING,
),
Message(
id=MESSAGE_BETA_DASHBOARD_AVAILABLE,
header=_("New beta dashboard available"),
humitos marked this conversation as resolved.
Show resolved Hide resolved
body=_(
textwrap.dedent(
"""
We are launching our new <strong>beta dashboard</strong> with a fresh redesign and new powerful features.
humitos marked this conversation as resolved.
Show resolved Hide resolved
<a href="https://beta.readthedocs.org/">Give it a try</a> and send us feedback.
humitos marked this conversation as resolved.
Show resolved Hide resolved
"""
).strip(),
),
type=INFO,
),
agjohnson marked this conversation as resolved.
Show resolved Hide resolved
]


Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/static-src/core/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Dismiss a notification
module.exports.handle_notification_dismiss = function () {
$(document).ready(function () {
$('ul.notifications li.notification > a').click(function (ev) {
$('ul.notifications li.notification > a.notification-action').click(function (ev) {
var url = $(this).attr('href');
var dismiss_url = $(this).parent().attr('data-dismiss-url');
var csrf_token = $(this).parent().attr('data-csrf-token');
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/core/static/core/js/site.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.