Skip to content

Implement favorites for notes (favorite action, filters, profile tab) #65

@joshuapanicker

Description

@joshuapanicker

Summary
Add the ability to favorite notes, surface favorites in filters (e.g. course/dashboard browse), and show favorite notes in the profile page Favorites tab.

Current state

  • Profile page has a Favorites tab with placeholder copy: "No favorites yet. Favorites coming soon."
  • No favorite/unfavorite action exists on note cards or in note modals.
  • No "favorites" filter or filter option in browse/course views.

Acceptance criteria

Data / backend

  • Add persistence for favorites (e.g. note_favorites or resource_favorites table with profile_id, resource_id, or use existing schema if one exists).
  • API (or extend existing /api/notes) to support:
    • Toggle favorite (add/remove) for the current user.
    • Listing notes filtered by "favorited by me" (e.g. favorited=1 or dedicated endpoint).

UI – favoriting

  • Add a way to favorite/unfavorite a note (e.g. star icon on note cards and/or in the note detail modal).
  • Indicate favorited state visually (e.g. filled star vs outline).

UI – filters

  • In browse/course views, add a filter or tab to show "Favorites" (notes the user has favorited).
  • Ensure favorited notes can be discovered and opened from this view.

UI – profile

  • In the profile page Favorites tab, fetch and display the user’s favorited notes (same card style as My Uploads / Downloads).
  • Empty state: keep friendly message when the user has no favorites.
  • Each card should link to the relevant course/note context (e.g. course page) where applicable.

Notes

  • Reuse existing note card and list patterns (e.g. profile uploads/downloads, course detail) for consistency.
  • Consider RLS and auth so users only see and modify their own favorites.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions