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 / define mark as watched user action #25

Merged
merged 6 commits into from
Nov 15, 2024
Merged

Conversation

vladjerca
Copy link
Collaborator

@vladjerca vladjerca commented Nov 15, 2024

This pull request, a grand tapestry woven with threads of schema, request, and UI enhancements, significantly enriches both the API and client projects. Prepare to witness a symphony of data handling and user interaction, harmonizing across the digital realm.

API Enhancements:

  • Schema Definitions:

    • The idsRequestSchema.ts scroll unfurls, revealing a meticulous catalog of schemas for various media IDs, including showIdsRequestSchema, movieIdsRequestSchema, seasonIdsRequestSchema, and episodeIdsRequestSchema. These inscriptions provide a structured framework for identifying the myriad media entities within the Trakt universe.
    • The redundant mediaIdsRequestSchema, a relic of a bygone era, fades into obsolescence, replaced by the newly forged schemas in movieCheckinRequestSchema.ts and showCheckinRequestSchema.ts.
  • Request and Response Handling:

    • The historyRequestSchema and historyResponseSchema emerge, a pair of scrolls governing the flow of history-related requests and responses. These inscriptions ensure the proper handling of temporal data, allowing users to traverse the annals of their viewing past.
    • The sync router, a nexus of data synchronization, expands its repertoire to incorporate the newly charted history endpoint, further enriching its capabilities.
  • Testing:

    • A gauntlet of comprehensive tests has been constructed for HistoryRequest, ensuring that it adheres to the sacred laws of type handling and validation. These trials guarantee the robustness and reliability of this critical component.

Client Enhancements:

  • UI Components:

    • The EpisodeFooter.svelte component, a humble repository of episode details, receives an upgrade, now adorned with an optional actions prop, allowing for the integration of additional UI elements and enhanced user interaction.
    • The MarkAsWatchedButton.svelte component, a conduit to user agency, materializes, empowering viewers to mark episodes as watched with a mere click. Its hover and active states provide visual feedback, guiding the user's hand through the digital realm.
  • Integration:

    • The UpNextEpisode.svelte component, a harbinger of anticipation, embraces the MarkAsWatchedButton, seamlessly integrating its functionality and responding to the onMarkAsWatched event with grace.
    • The markAsWatched.ts script, a messenger to the API, emerges, carrying the user's intent to mark an episode as watched and ensuring its inscription in the annals of viewing history.
  • Data Handling:

    • The upNext.ts script, a purveyor of future viewing delights, undergoes a refinement, incorporating the episode ID into the UpNextEntry type and its associated functions. This enhancement ensures the accurate identification and presentation of upcoming episodes.

This grand tapestry of changes, woven with meticulous care and attention to detail, elevates the Trakt Lite experience to new heights. The API, fortified with robust schemas and request handling, provides a solid foundation for data integrity. The client, adorned with enhanced UI components and seamless integration, empowers users to navigate the world of media with ease and delight.

@vladjerca vladjerca force-pushed the feat/up_next_history branch from bb8affd to 358a5e2 Compare November 15, 2024 12:06
@vladjerca vladjerca merged commit c359c1f into main Nov 15, 2024
3 checks passed
@vladjerca vladjerca deleted the feat/up_next_history branch November 15, 2024 14:05
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.

2 participants