-
Notifications
You must be signed in to change notification settings - Fork 4
Ratings for podcasts #105
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
Ratings for podcasts #105
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a podcast rating feature that allows users to provide thumbs-up or thumbs-down feedback on podcast episodes. The implementation includes a new data model for storing ratings, a UI component for collecting user feedback, and middleware to handle rating submissions via simple GET requests. The feature also integrates with Buzzsprout to add rating links to podcast show notes.
Changes:
- Added a new
ratingscollection in Directus with many-to-any relationship support for rating different content types - Created a
PodcastRatingVue component and flash message system for user feedback - Implemented server middleware to handle rating submissions via GET requests and redirect users
- Updated Buzzsprout show notes to include rating links
Reviewed changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| nuxt-app/types/directus.ts | Added DirectusRatingItem type definition |
| nuxt-app/services/directus.ts | Added ratings collection to Collections type |
| nuxt-app/server/middleware/rating.ts | New middleware to handle rating GET requests and create ratings |
| nuxt-app/server/middleware/discord.ts | Removed debug console.log statement |
| nuxt-app/server/middleware/conference.ts | Removed debug console.log statement |
| nuxt-app/pages/podcast/[slug].vue | Added PodcastRating component to podcast page |
| nuxt-app/composables/useFlashMessage.ts | New composable for managing flash messages via cookies |
| nuxt-app/composables/useDirectus.ts | Added createRating function to persist ratings |
| nuxt-app/components/PodcastRating.vue | New component for displaying rating buttons and feedback |
| nuxt-app/assets/icons/thumb-up.svg | Thumbs up icon for positive ratings |
| nuxt-app/assets/icons/thumb-down.svg | Thumbs down icon for negative ratings |
| directus-cms/schema.json | Added ratings and ratings_target collections with schema definitions |
| directus-cms/extensions/.../buzzsprout.ts | Added rating links to podcast show notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...ms/extensions/directus-extension-programmierbar-bundle/src/buzzsprout/handlers/buzzsprout.ts
Outdated
Show resolved
Hide resolved
…le/src/buzzsprout/handlers/buzzsprout.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jan0707 <1663330+Jan0707@users.noreply.github.com>
Co-authored-by: Jan0707 <1663330+Jan0707@users.noreply.github.com>
…r-one Replace type suppression with proper type narrowing in rating middleware
This PR adds a new feature to our website: