-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/modify UI ux #134
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/modify UI ux #134
Changes from all commits
159b1c4
8ec675e
f7d8076
7ac818f
5dcc9b9
e47c96e
502cb01
9c0f84a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,4 +45,6 @@ yarn-error.log* | |
| .gemini/ | ||
|
|
||
| .cursorrules | ||
| .gitmessage.txt | ||
| .gitmessage.txt | ||
|
|
||
| temp/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # SingCode Project Context | ||
|
|
||
| ## Project Overview | ||
|
|
||
| SingCode is a Karaoke number search service built as a Monorepo. It aggregates song data from various sources and provides a web interface for users to search and manage songs. | ||
|
|
||
| ## Tech Stack (Global) | ||
|
|
||
| - **Monorepo Manager:** TurboRepo | ||
| - **Package Manager:** pnpm (@9.0.0) | ||
| - **Language:** TypeScript (v5.8.2) | ||
| - **Core Framework:** React 19 | ||
| - **Engines:** Node.js >= 18 | ||
|
|
||
| ## Project Structure | ||
|
|
||
| The project follows a standard pnpm workspace structure: | ||
|
|
||
| - **`apps/web/`**: The main user-facing web application (Next.js). | ||
| - **`packages/`**: Shared libraries and configurations. | ||
| - **`crawling/`**: Scripts and logic for crawling song data (DB input). | ||
| - **`open-api/`**: Internal API module for providing karaoke numbers (Domestic songs). | ||
| - **`query/`**: Shared TanStack Query hooks and configurations. | ||
| - **`ui/`**: Shared UI components (Design System). | ||
| - **`eslint-config/`**: Shared ESLint configurations. | ||
| - **`typescript-config/`**: Shared `tsconfig` bases. | ||
|
|
||
| ## Development Workflow (TurboRepo) | ||
|
|
||
| Use the following commands from the root directory: | ||
|
|
||
| - **`pnpm dev`**: Starts the development server for all apps (runs `turbo run dev`). | ||
| - **`pnpm dev-web`**: Starts only the web application (`turbo run dev --filter=web`). | ||
| - **`pnpm build`**: Builds all apps and packages. | ||
| - **`pnpm lint`**: Runs linting across the workspace. | ||
| - **`pnpm format`**: Formats code using Prettier. | ||
| - **`pnpm check-types`**: Runs TypeScript type checking. | ||
|
|
||
| ## Key Conventions | ||
|
|
||
| 1. **Workspace Dependencies**: Packages utilize `workspace:*` to reference internal packages (e.g., `@repo/ui`). | ||
| 2. **React 19**: All applications and UI packages are compatible with React 19. | ||
| 3. **Strict Typing**: All code must be strictly typed via TypeScript. | ||
|
|
||
| Context is in English, but please answer in Korean. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Web Application Context (`apps/web`) | ||
|
|
||
| ## Overview | ||
|
|
||
| This is the main Next.js web application for SingCode. It serves as the frontend client for searching songs, viewing lyrics, and user interaction. | ||
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Framework:** Next.js 15.2.7 (App Router) | ||
| - **Language:** TypeScript | ||
| - **Styling:** Tailwind CSS v4, `tailwind-merge`, `clsx`, `class-variance-authority` (CVA). | ||
| - **UI Components:** Radix UI Primitives, Lucide React (Icons). | ||
| - **State Management:** | ||
| - **Server State:** TanStack Query (`@repo/query`, v5). | ||
| - **Client Global State:** Zustand. | ||
| - **Local State:** React Hooks (`useState`, `useReducer`). | ||
| - **Backend & Auth:** Supabase (Auth, DB, SSR). | ||
| - **Animations:** GSAP, Motion (Framer Motion), Lottie, `tw-animate-css`. | ||
| - **Utilities:** `date-fns`, `immer`, `axios`. | ||
|
|
||
| ## Key Features & Libraries | ||
|
|
||
| - **Drag & Drop:** `@dnd-kit` is used for interaction. | ||
| - **Physics Engine:** `matter-js` is used for specific visual effects. | ||
| - **AI Integration:** `openai` SDK is integrated for AI-related features. | ||
| - **Analytics:** PostHog, Vercel Analytics/Speed Insights. | ||
|
|
||
| ## Coding Conventions & Guidelines | ||
|
|
||
| ### 1. Component Structure | ||
|
|
||
| - Use **Functional Components** with TypeScript interfaces for props. | ||
| - Use `shadcn/ui` patterns: Combine Radix UI primitives with Tailwind CSS. | ||
| - Use `cn()` utility (clsx + tailwind-merge) for conditional class names. | ||
| ```tsx | ||
| // Example | ||
| <div className={cn('bg-white p-4', className)}>...</div> | ||
| ``` | ||
|
|
||
| Context is in English, but please answer in Korean. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "web", | ||
| "version": "1.9.1", | ||
| "version": "2.0.1", | ||
| "type": "module", | ||
| "private": true, | ||
| "scripts": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,13 +14,15 @@ interface IProps { | |
| onToggleToSing: () => void; | ||
| onToggleLike: () => void; | ||
| onClickSave: () => void; | ||
| onClickArtist: () => void; | ||
| } | ||
|
|
||
| export default function SearchResultCard({ | ||
| song, | ||
| onToggleToSing, | ||
| onToggleLike, | ||
| onClickSave, | ||
| onClickArtist, | ||
| }: IProps) { | ||
| const { id, title, artist, num_tj, num_ky, isToSing, isLike, isSave } = song; | ||
| const { isAuthenticated } = useAuthStore(); | ||
|
|
@@ -36,16 +38,21 @@ export default function SearchResultCard({ | |
| }; | ||
|
|
||
| return ( | ||
| <Card className="relative overflow-hidden"> | ||
| <Card className="w-full overflow-hidden p-4"> | ||
| {/* ๋ฉ์ธ ์ฝํ ์ธ ์์ญ */} | ||
| <div className="h-[150px] w-full gap-4 p-3"> | ||
| <div className="gap-4"> | ||
| {/* ๋ ธ๋ ์ ๋ณด */} | ||
| <div className="mb-8 flex flex-col"> | ||
| {/* ์ ๋ชฉ ๋ฐ ๊ฐ์ */} | ||
| <div className="mb-1 flex justify-between pr-6"> | ||
| <div> | ||
| <div className="mb-1 flex justify-between pr-2"> | ||
| <div className="w-[calc(100%-40px)]"> | ||
| <h3 className="truncate text-base font-medium">{title}</h3> | ||
| <p className="text-muted-foreground truncate text-sm">{artist}</p> | ||
| <span | ||
| className="text-muted-foreground cursor-pointer truncate text-sm hover:underline" | ||
| onClick={onClickArtist} | ||
| > | ||
| {artist} | ||
| </span> | ||
|
Comment on lines
+50
to
+55
|
||
| </div> | ||
|
|
||
| <Dialog open={open} onOpenChange={setOpen}> | ||
|
|
@@ -79,7 +86,7 @@ export default function SearchResultCard({ | |
| </div> | ||
|
|
||
| {/* ๋ฒํผ ์์ญ - ์ฐ์ธก ํ๋จ์ ๊ณ ์ */} | ||
| <div className="absolute bottom-3 flex w-full space-x-2 pr-6"> | ||
| <div className="flex w-full space-x-2"> | ||
| <Button | ||
| variant="ghost" | ||
| size="icon" | ||
|
|
||
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.
ScrollArea๋ฅผ ์ผ๋ฐ div๋ก ๋ณ๊ฒฝํ์ต๋๋ค. ํ๋ก์ ํธ ์ ๋ฐ์์ ScrollArea ์ปดํฌ๋ํธ๋ฅผ ์ฌ์ฉํ๊ณ ์๋ ํจํด(apps/web/src/app/info/like/page.tsx:46, apps/web/src/app/info/save/page.tsx:194, apps/web/src/app/popular/page.tsx:22, apps/web/src/app/tosing/page.tsx:29)๊ณผ ์ผ๊ด์ฑ์ด ๋จ์ด์ง๋๋ค. ํน๋ณํ ์ด์ ๊ฐ ์๋ค๋ฉด ScrollArea ์ปดํฌ๋ํธ๋ฅผ ๊ณ์ ์ฌ์ฉํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.