Skip to content

feat: add rate-now rating and toast content#2328

Open
ElMagnea wants to merge 4 commits into
mainfrom
feature/rate-now-toast
Open

feat: add rate-now rating and toast content#2328
ElMagnea wants to merge 4 commits into
mainfrom
feature/rate-now-toast

Conversation

@ElMagnea
Copy link
Copy Markdown
Collaborator

@ElMagnea ElMagnea commented May 14, 2026

Summary

Tightens up the Rate Now toast and Where-to-Watch empty state with shared building blocks.

  • Rate Now toast (sections/toast/_internal/RateNowContent.svelte)
    • Rotates the verdict prompt heading across visits so users see a fresher CTA each time the toast appears.
    • Adjusts layout to better handle long titles and constrained widths.
  • RateNow component (sections/summary/components/rating/RateNow.svelte)
    • Adds a hideLabel prop so callers (like the toast) can render the stars without the helper label, while consuming pages keep the label.
  • Where-to-Watch empty state (sections/lists/where-to-watch/_internal/WhereToWatchEmptyItem.svelte)
    • New empty-state card surfaced from WhereToWatchList and WhereToWatchDrawer when there are no streaming sources for the user's region.

Test plan

  • Trigger the Rate Now toast on a movie/episode you haven't rated — verdict prompt rotates between visits, stars submit a rating, toast dismisses on success.
  • Rate Now without label: open the toast variant — stars render full-width with no helper text underneath.
  • Where-to-Watch with no sources for the active region — card shows the empty-state placeholder both in the page list and the drawer.
  • deno task client:check and deno task client:test both pass.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience by refining the rating and toast notification components. It introduces more dynamic content for rating prompts, improves the visual presentation of empty states in the 'Where to Watch' section, and adds flexibility to the RateNow component to ensure consistent layout behavior across different parts of the application.

Highlights

  • Rating Component Enhancement: Added a 'hideLabel' prop to the RateNow component and updated its styling to support flexible justification, allowing for better integration in constrained UI areas.
  • Toast Notification Updates: Integrated a rotating 'verdict' prompt in the rating toast and updated the layout to handle long titles more gracefully.
  • Empty State UI: Introduced a new 'WhereToWatchEmptyItem' component to provide a more visually appealing empty state when no streaming services are available.
Ignored Files
  • Ignored by pattern: projects/client/i18n/messages/** (1)
    • projects/client/i18n/messages/en-au.json
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@trakt-bot trakt-bot Bot enabled auto-merge (rebase) May 14, 2026 09:39
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 14, 2026

DeepSource Code Review

We reviewed changes in ea1c8c0...c024d2d on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript May 28, 2026 1:02p.m. Review ↗
Code coverage May 28, 2026 1:02p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates a subproject commit, modifies i18n metadata, and introduces a new WhereToWatchEmptyItem component for empty states in the Where to Watch section. It also enhances the Rate Now toast with randomized prompts and layout updates. Key feedback includes addressing SSR safety issues when accessing localStorage, moving hardcoded strings to the i18n system, and cleaning up the styles by removing redundant SCSS declarations, dead CSS, and duplicated global rules.

Comment thread projects/client/src/lib/sections/lists/where-to-watch/WhereToWatchList.svelte Outdated
Comment thread projects/client/src/lib/sections/toast/_internal/RateNowContent.svelte Outdated
- RateNowContent: harden getNextPrompt against SSR (typeof window check) and corrupted localStorage values (NaN guard); migrate the 9 hardcoded rating prompts to i18n keys (text_rating_prompt_*).
- WhereToWatchEmptyItem: surface the empty-state text via text_no_services_available i18n key, drop dead .trakt-link CSS, collapse the duplicate :first-child/:last-child rules into a single span selector.
- WhereToWatchList: drop lang="scss" — no SCSS-specific features in use.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant