From f088433d8019803cc60a7ede3c8ecfdb3ae8f743 Mon Sep 17 00:00:00 2001 From: LuizGarbini Date: Mon, 12 Jan 2026 20:34:58 -0300 Subject: [PATCH 1/5] feat(lists): add mobile drawer for lists dropdown Replace Sheet with Drawer component for mobile devices while keeping DropdownMenu for desktop. Improve mobile UX with better touch interactions. --- .../{series-cosumer.ts => series-consumer.ts} | 0 apps/backend/src/worker.ts | 2 +- .../src/components/lists/lists-dropdown.tsx | 171 +++++++++++++++--- 3 files changed, 142 insertions(+), 31 deletions(-) rename apps/backend/src/consumers/{series-cosumer.ts => series-consumer.ts} (100%) diff --git a/apps/backend/src/consumers/series-cosumer.ts b/apps/backend/src/consumers/series-consumer.ts similarity index 100% rename from apps/backend/src/consumers/series-cosumer.ts rename to apps/backend/src/consumers/series-consumer.ts diff --git a/apps/backend/src/worker.ts b/apps/backend/src/worker.ts index f5597961..84a6dc41 100644 --- a/apps/backend/src/worker.ts +++ b/apps/backend/src/worker.ts @@ -1,7 +1,7 @@ import { createSqsClient, initializeSQS } from './adapters/sqs' import { config } from './config' import { startMovieConsumer } from './consumers/movies-consumer' -import { startSeriesConsumer } from './consumers/series-cosumer' +import { startSeriesConsumer } from './consumers/series-consumer' export async function startWorkers() { startSQS() diff --git a/apps/web/src/components/lists/lists-dropdown.tsx b/apps/web/src/components/lists/lists-dropdown.tsx index da9c023a..17b90c99 100644 --- a/apps/web/src/components/lists/lists-dropdown.tsx +++ b/apps/web/src/components/lists/lists-dropdown.tsx @@ -23,6 +23,8 @@ import { useSession } from '@/context/session' import { cn } from '@/lib/utils' import type { MovieDetails, TvSerieDetails } from '@/services/tmdb' import { NoAccountTooltip } from '../no-account-tooltip' +import { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from '@plotwist/ui/components/ui/drawer' +import { Checkbox } from '@plotwist/ui/components/ui/checkbox' type ListsDropdownProps = { item: MovieDetails | TvSerieDetails @@ -112,7 +114,7 @@ export const ListsDropdown = ({ item, ...props }: ListsDropdownProps) => { ] ) - const Content = () => { + const DesktopContent = () => { if (!user) { return ( @@ -169,38 +171,147 @@ export const ListsDropdown = ({ item, ...props }: ListsDropdownProps) => { ) } - return ( - - - - - - - - {myLists} - - { + if (!user) { + return ( + +
+ {createNewList} +
+
+ ) + } + + if (lists?.length > 0) { + return ( +
+ {lists.map(list => { + const itemIncluded = list.items.find( + ({ tmdbId }) => tmdbId === item.id + ) + + return ( +
+ itemIncluded + ? handleRemove(itemIncluded.id) + : handleAdd(list.id) } + className="flex cursor-pointer items-center space-x-3 rounded-lg border p-3 transition-colors hover:bg-accent" > - - + + + {list.title} + +
+ ) + })} +
+ ) + } + + return ( + -
- + > + {createNewList} + + } + /> + ) + } + + return ( + <> + + + + + + + + {myLists} + + + + } + /> + + +
+ +
+
+
+ + + + + + + + + {myLists} + + + + + } + /> + + - - - + +
+
+ ) } From acb0428b3a6d5729efc8987fc8456acbef07731b Mon Sep 17 00:00:00 2001 From: LuizGarbini Date: Wed, 14 Jan 2026 12:32:45 -0300 Subject: [PATCH 2/5] chore: comment out app service in docker-compose.yml and fix import statement in next-env.d.ts --- apps/backend/docker-compose.yml | 32 ++++++++++++++++---------------- apps/web/next-env.d.ts | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/backend/docker-compose.yml b/apps/backend/docker-compose.yml index 956253be..1e214dfd 100644 --- a/apps/backend/docker-compose.yml +++ b/apps/backend/docker-compose.yml @@ -1,22 +1,22 @@ name: plotwist services: - app: - container_name: plotwist_app - image: plotwist-app - build: - context: . - dockerfile: Dockerfile - ports: - - 3333:3333 - depends_on: - - db - - redis - - localstack - env_file: - - .env - networks: - - plotwist_network + # app: + # container_name: plotwist_app + # image: plotwist-app + # build: + # context: . + # dockerfile: Dockerfile + # ports: + # - 3333:3333 + # depends_on: + # - db + # - redis + # - localstack + # env_file: + # - .env + # networks: + # - plotwist_network db: container_name: plotwist_db diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts index a3e4680c..c4b7818f 100644 --- a/apps/web/next-env.d.ts +++ b/apps/web/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import './.next/dev/types/routes.d.ts' +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. From e56131504c451204d621544c42e649ca2693bc4c Mon Sep 17 00:00:00 2001 From: LuizGarbini Date: Wed, 14 Jan 2026 12:33:01 -0300 Subject: [PATCH 3/5] refactor(lists-dropdown): improve button structure and styling in lists dropdown component --- .../src/components/lists/lists-dropdown.tsx | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/apps/web/src/components/lists/lists-dropdown.tsx b/apps/web/src/components/lists/lists-dropdown.tsx index 17b90c99..b8eec26f 100644 --- a/apps/web/src/components/lists/lists-dropdown.tsx +++ b/apps/web/src/components/lists/lists-dropdown.tsx @@ -23,7 +23,13 @@ import { useSession } from '@/context/session' import { cn } from '@/lib/utils' import type { MovieDetails, TvSerieDetails } from '@/services/tmdb' import { NoAccountTooltip } from '../no-account-tooltip' -import { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger } from '@plotwist/ui/components/ui/drawer' +import { + Drawer, + DrawerContent, + DrawerHeader, + DrawerTitle, + DrawerTrigger, +} from '@plotwist/ui/components/ui/drawer' import { Checkbox } from '@plotwist/ui/components/ui/checkbox' type ListsDropdownProps = { @@ -195,25 +201,19 @@ export const ListsDropdown = ({ item, ...props }: ListsDropdownProps) => { ) return ( -
itemIncluded ? handleRemove(itemIncluded.id) : handleAdd(list.id) } - className="flex cursor-pointer items-center space-x-3 rounded-lg border p-3 transition-colors hover:bg-accent" + className="flex text-left w-full cursor-pointer items-center space-x-3 rounded-lg border p-3 transition-colors hover:bg-accent" > - - - {list.title} - -
+ + {list.title} + ) })} @@ -239,12 +239,7 @@ export const ListsDropdown = ({ item, ...props }: ListsDropdownProps) => { <> - From 7358b4023344420d6029535ae4853289554fd76d Mon Sep 17 00:00:00 2001 From: LuizGarbini Date: Wed, 14 Jan 2026 12:43:03 -0300 Subject: [PATCH 4/5] refactor(lists-dropdown): streamline imports and enhance component structure --- apps/web/next-env.d.ts | 2 +- apps/web/src/components/lists/lists-dropdown.tsx | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts index c4b7818f..a3e4680c 100644 --- a/apps/web/next-env.d.ts +++ b/apps/web/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next/dev/types/routes.d.ts"; +import './.next/dev/types/routes.d.ts' // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/apps/web/src/components/lists/lists-dropdown.tsx b/apps/web/src/components/lists/lists-dropdown.tsx index b8eec26f..6588a099 100644 --- a/apps/web/src/components/lists/lists-dropdown.tsx +++ b/apps/web/src/components/lists/lists-dropdown.tsx @@ -1,6 +1,14 @@ 'use client' import { Button } from '@plotwist/ui/components/ui/button' +import { Checkbox } from '@plotwist/ui/components/ui/checkbox' +import { + Drawer, + DrawerContent, + DrawerHeader, + DrawerTitle, + DrawerTrigger, +} from '@plotwist/ui/components/ui/drawer' import { DropdownMenu, DropdownMenuCheckboxItem, @@ -23,14 +31,6 @@ import { useSession } from '@/context/session' import { cn } from '@/lib/utils' import type { MovieDetails, TvSerieDetails } from '@/services/tmdb' import { NoAccountTooltip } from '../no-account-tooltip' -import { - Drawer, - DrawerContent, - DrawerHeader, - DrawerTitle, - DrawerTrigger, -} from '@plotwist/ui/components/ui/drawer' -import { Checkbox } from '@plotwist/ui/components/ui/checkbox' type ListsDropdownProps = { item: MovieDetails | TvSerieDetails From 70b4e7c00aab23d39586610f161aba3df0338dbf Mon Sep 17 00:00:00 2001 From: LuizGarbini Date: Wed, 14 Jan 2026 12:45:51 -0300 Subject: [PATCH 5/5] chore(vscode): update settings to use Biome as default formatter for multiple file types --- .vscode/settings.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index db02cd3c..42556a48 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,10 +13,27 @@ "files.eol": "\n", "editor.formatOnSave": true, + "editor.defaultFormatter": "biomejs.biome", + "editor.codeActionsOnSave": { + "source.fixAll.biome": "explicit" + }, + "[typescript]": { "editor.defaultFormatter": "biomejs.biome" }, "[typescriptreact]": { "editor.defaultFormatter": "biomejs.biome" + }, + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[json]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[jsonc]": { + "editor.defaultFormatter": "biomejs.biome" } }