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

✨(plugin) add notifications to courses #2239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sandroscosta
Copy link
Collaborator

Add a new plugin to create warning or information notifications.
This plugin is only available on course detail pages.

image

Closes #2238

Add a new plugin to create warning or information notifications.
This plugin is only available on course detail pages.
@sandroscosta sandroscosta force-pushed the sandroscosta/feat/notifications-plugin branch from 2272d34 to fd83742 Compare January 23, 2024 10:03
@jbpenrath
Copy link
Member

Hey Sandro, look's interesting. I'll have few suggestion to improve your contribution.

First, there is already an existing banner component and I think you could be use it here.

{% load i18n %}
{% spaceless %}
<div class="banner banner--error banner--rounded" role="alert">
<svg class="banner__icon" aria-hidden="true"><use href="#icon-cross" /></svg>
<p class="banner__message">
{% blocktrans %}
A {{model}} object is missing on this {{model}} page. Please select another page template.
<br />
If what you need is a {{model}} page, you need to create it via the wizard and choose "New {{model}} page".
{% endblocktrans %}
</p>
</div>
{% endspaceless %}

Then, I wonder if this the right place to put the notification.
What do you think to create a static placeholder (like footer) in the global page template ?
image

@sandroscosta
Copy link
Collaborator Author

Do you think it makes sense for us to meet in the middle? This banner is more "informative" than anything else. The one you show in the images seems to be related more to errors. When I created this, I focused on the course. The idea is to pass messages to the students inside the course page, hence why I chose to put it where it is.

I can refactor with my idea in mind. What do you think? Would a mix of both make sense?

@sandroscosta
Copy link
Collaborator Author

What do you think to create a static placeholder (like footer) in the global page template ?

I don't dislike the idea at all. I just want to restrict this kind of notifications to the courses and programs, for now.

@jbpenrath
Copy link
Member

What do you think to create a static placeholder (like footer) in the global page template ?

I don't dislike the idea at all. I just want to restrict this kind of notifications to the courses and programs, for now.

Yup sorry, I realized that the example of the footer placeholder was not a good one.
My suggestion was just to add the notification banner above the course content but of course this placeholder should be unique for each page.

@sandroscosta
Copy link
Collaborator Author

My suggestion was just to add the notification banner above the course content but of course this placeholder should be unique for each page.

Make sense. I'll check and work on it. I might create some additional styles to have different levels of alert states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Course warning and notifications
2 participants