WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

Add 'News' feature to the Dashboard #5814

Closed Abishekcs closed 3 weeks ago

Abishekcs commented 1 month ago

4933

What this PR does

This PR introduces a News feature in the navbar that allows users to quickly access a small feed of recent news items. Additionally, it provides a way for admins to perform all CRUD operations on these news items.

Key Features:

  1. User Access to News:

    • Users can easily see a feed of recent news items directly from the navbar.

    • A notification count will be displayed based on a cookie that records the last time the user opened the news. This count will compare the last-opened time with the timestamps of news items added after that time.

  2. Admin Management:

    • Admins can perform all CRUD operations on news items seamlessly through the existing FAQ system.

Minor Implementation Details:

a) In the FAQ records, the FAQ title is set as Wiki Education Dashboard News or Programs & Events Dashboard News for each news content to display the correct news according to the respective dashboard.

c) To ensure that the news FAQs do not mix with other FAQs, a method is added in the controller to check and segregate the news FAQs.

Screenshots

Before:

Admin & Non-Admin

Before News Feature

After:

Admin:

No News(Admin)

P & E Dashboard(Admin):

P & E Dashboard (Admin).webm

Wiki Education News(Admin):

Wiki Education (Admin).webm

Non- Admin:

No News (Non Admin)

P & E Dashboard(Non- Admin):

P & E Dashboard (Non Admin).webm

Wiki Education News(Non-Admin):

Wiki Education (Non Admin).webm

Abishekcs commented 4 weeks ago

Hi @ragesoss, Could you please review this PR when you have a chance? Thank you!

ragesoss commented 4 weeks ago

Will do!

ragesoss commented 3 weeks ago

I like the way this works!

The one design issue that jumps out to me is that the text indicating how long ago the news was posted is not visually distinct from the post content. I think it would be better to do some combination of:

Abishekcs commented 3 weeks ago

I like the way this works!

The one design issue that jumps out to me is that the text indicating how long ago the news was posted is not visually distinct from the post content. I think it would be better to do some combination of:

  • align it to the right
  • use a different font
  • use a different color

Okay, any suggestions for the font and color?😃

ragesoss commented 3 weeks ago

I'm not great with these kinds of things, but the first thing I would try would be to just use right alignment and make the text color slightly lighter than the content (possibly by making the content color a little bit darker first). Making the font size a little bit smaller would be a next step.

Abishekcs commented 3 weeks ago

@ragesoss, will this UI work, or please let me know if you would prefer something else?

Screenshot from 2024-06-12 21-54-57

ragesoss commented 3 weeks ago

looks great!