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

feat / improve up-next experience #27

Merged
merged 4 commits into from
Nov 16, 2024
Merged

feat / improve up-next experience #27

merged 4 commits into from
Nov 16, 2024

Conversation

vladjerca
Copy link
Collaborator

@vladjerca vladjerca commented Nov 16, 2024

This pull request, a meticulous orchestration of code refinement, breathes new life into the episode components, enhancing their internationalization and data management capabilities. Observe the subtle dance of improvement as we delve into the depths of these enhancements.

Enhancements to Episode Components:

  • The EpisodeIntl interface, a lexicon of episode-related terminology, expands its vocabulary, adding durationText and remainingText methods to its repertoire. These additions pave the way for a more nuanced and localized presentation of episode information.
  • The EpisodeIntlProvider, a purveyor of internationalized episode data, embraces the new methods, weaving them into its implementation with toHumanDuration and other temporal enchantments.
  • The EpisodeCover.svelte component, a canvas for episode presentation, adorns itself with i18n and type props, further enhancing its ability to adapt to diverse linguistic and stylistic preferences. It now gracefully incorporates finaleText and premiereText, adding a touch of localized flair.

Refactoring of Up Next and Upcoming Episodes:

  • The UpNextEpisode.svelte component, a harbinger of anticipation, sheds its reliance on direct calls to m.remaining_episodes and toHumanDuration, instead embracing the elegance of i18n methods. This transformation streamlines its code and enhances its adaptability.
  • The UpcomingEpisode.svelte component, a herald of future viewing delights, undergoes a similar transformation, discarding the direct usage of EpisodeFinaleTag and EpisodePremiereTag in favor of the more versatile i18n and type props.

Additions to Episode Data Management:

  • The upcomingEpisodes.ts script, a chronicler of future episodes, enriches its EpisodeEntry with id fields, ensuring the accurate identification of each episode in the temporal stream.
  • The upNext.ts script, a purveyor of immediate viewing suggestions, refines its UpNextEntry type, extending it with EpisodeEntry and adding type and airedDate fields for a more comprehensive representation of upcoming episodes.

Introduction of Episode Store:

  • The useEpisodeStore.ts function emerges, a guardian of episode data, wielding the power of Svelte stores to manage and manipulate this valuable information.
  • A rigorous battery of tests, enshrined in useEpisodeStore.spec.ts, validates the functionality of this new store, ensuring its reliability and resilience.

These enhancements, a testament to the pursuit of code elegance and user delight, elevate the episode components to new heights of sophistication. With improved internationalization and streamlined data management, Trakt Lite continues its journey towards a more refined and user-centric experience.

@vladjerca vladjerca merged commit 290d648 into main Nov 16, 2024
3 checks passed
@vladjerca vladjerca deleted the feat/better_up_next branch November 16, 2024 11:22
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