-
Notifications
You must be signed in to change notification settings - Fork 37
Revamp/stats #499
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
Merged
Merged
Revamp/stats #499
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
dc53321
refactor: redesign Stats page with Spotify-inspired card layout
lui7henrique c45448e
feat: enhance stats functionality and UI in ProfileStatsView
lui7henrique f35904c
refactor: update StatsShareCardView layout and rendering for improved UI
lui7henrique 3b6c4b5
feat: improve stats timeline UX and share card
lui7henrique 8840d34
feat: enhance ProfileStatsView and related components for improved UX
lui7henrique 472fe92
feat: conditionally display share button in ProfileStatsView for own …
lui7henrique 2d25476
feat: implement user stats timeline service and UI components
lui7henrique 8e2cfa8
feat: enhance user stats services and introduce stats timeline feature
lui7henrique 02d44de
feat: update user stats service to enhance genre data handling
lui7henrique e3321e7
feat: enhance user total hours service with additional metrics and im…
lui7henrique fd6a691
feat: enhance TimeWatchedDetailView with improved data loading and vi…
lui7henrique 8d90515
feat: replace timeline/general tabs with month dropdown selector
lui7henrique 3328773
feat: add PeriodGenresView and PeriodReviewsView components for enhan…
lui7henrique 5b8cb37
feat: refactor scrolling behavior in PeriodGenresView, PeriodReviewsV…
lui7henrique ec66eee
feat: enhance SEO and structured data integration across the application
lui7henrique cf62045
fix: update import statement and enhance CSS for better mobile input …
lui7henrique 15bb0f5
Merge branch 'main' of https://github.com/plotwist-app/plotwist into …
lui7henrique File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
apps/backend/src/domain/services/user-episodes/get-user-episodes.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,23 @@ | ||
| import { selectUserEpisodes } from '@/db/repositories/user-episode' | ||
|
|
||
| export type GetUserEpisodesInput = { userId: string; tmdbId?: number } | ||
| export type GetUserEpisodesInput = { | ||
| userId: string | ||
| tmdbId?: number | ||
| startDate?: Date | ||
| endDate?: Date | ||
| } | ||
|
|
||
| export async function getUserEpisodesService({ | ||
| userId, | ||
| tmdbId, | ||
| startDate, | ||
| endDate, | ||
| }: GetUserEpisodesInput) { | ||
| const userEpisodes = await selectUserEpisodes({ userId, tmdbId }) | ||
| const userEpisodes = await selectUserEpisodes({ | ||
| userId, | ||
| tmdbId, | ||
| startDate, | ||
| endDate, | ||
| }) | ||
| return { userEpisodes } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Cache key collision between period-scoped and language-scoped stats
Medium Severity
getUserStatsCacheKeyappendslanguageandperiodas positional parts without labels, so a key withlanguage=undefined, period="en-US"would collide withlanguage="en-US", period="all". For example,watched-castuseslanguage=undefinedandperiod="en-US"(a YYYY-MM looking value aside), while other stat types uselanguage="en-US"andperiod="all". Sinceperiod="all"is filtered out, collisions between unlabeled positional segments are possible.