-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/component/filter/DEVING-35 #19
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/component/filter/DEVING-35 #19
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
Walkthrough์ด๋ฒ ๋ณ๊ฒฝ์ฌํญ์์๋ pre-commit ์คํฌ๋ฆฝํธ์ package.json์ ์ํญ modification์ด ์ด๋ฃจ์ด์ก์ต๋๋ค. .husky/pre-commit ํ์ผ์๋ ํ์ผ ๋์ ์ค๋ฐ๊ฟ ๋ฌธ์๊ฐ ์ถ๊ฐ๋์์ผ๋ฉฐ, package.json์๋ ๊ฐ๋ฐ์ฉ ์์กด์ฑ์ผ๋ก Changes
Sequence Diagram(s)sequenceDiagram
participant U as ์ฌ์ฉ์
participant P as ํ์ด์ง (page.tsx)
participant D as Dropdown ์ปดํฌ๋ํธ
participant M as ๋ฉ๋ด ์ต์
U->>P: ๋๋กญ๋ค์ด ํธ๋ฆฌ๊ฑฐ ํด๋ฆญ
P->>D: ๋๋กญ๋ค์ด ๋ ๋๋ง ์์ฒญ
D->>U: ์ต์
(์์ด์ฝ, ๋ฉ๋ด ๋ฑ) ํ์
U->>D: ์ต์
์ ํ (์: "mypage" ๋๋ "logout")
D->>P: ์ ํ ์ํ ์
๋ฐ์ดํธ (setSelectedFilter ํธ์ถ)
P->>M: ์ ํ ์ต์
์ ๋ฐ๋ฅธ ์ก์
์คํ (alert ๋ฑ)
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
โจ Finishing Touches
๐ชง TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
dbswl701
left a comment
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.
ํํฐ๋ ํ ๊ธ์ด๋ ๋ถ๋ฆฌ ๋ถํ๋๋ฆฝ๋๋ค.
์์ ์ ํ ๊ธ์ ํธ๋ฆฌ๊ฑฐ ์์์ ์์์ด ๋ณํ์ง ์๊ณ , ํํฐ๋ ์์์ด ๋ณํฉ๋๋ค.
์์ ํ ๋จธ์ง ์ถฉ๋๋๋ ๋ถ๋ถ๋ ํด๊ฒฐ ๋ถํ๋๋ฆฝ๋๋ค.
๊ณ ์ํ์ จ์ต๋๋ค!!! ๐๐๐
Codecov ReportAll modified and coverable lines are covered by tests โ |
CI Status Report๊ฒ์ฌ ๊ฒฐ๊ณผ
โ ์ผ๋ถ ๊ฒ์ฌ๊ฐ ์คํจํ์ต๋๋ค. |
835a959 to
fb624bf
Compare
CI Status Report๊ฒ์ฌ ๊ฒฐ๊ณผ
โ ์ผ๋ถ ๊ฒ์ฌ๊ฐ ์คํจํ์ต๋๋ค. |
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.
Actionable comments posted: 1
๐งน Nitpick comments (2)
src/components/common/Dropdown.tsx (1)
33-39: ํด๋์ค ๊ณ์ฐ ๋ก์ง์ด ๊ฐ๋ ์ฑ์ด ์กฐ๊ธ ๋จ์ด์ง ์ ์์ต๋๋ค.
className?.includes('w-[460px]')์ผ๋ก ํน์ ์ฌ์ด์ฆ๋ฅผ ํ๋ณํ๋ ๋ก์ง์ ์ ์ง๋ณด์๋ ํ์ฅ ์์ ์ค๋์์ ์ผ์ผํฌ ๊ฐ๋ฅ์ฑ์ด ์์ต๋๋ค. ๋ณ๋boolean์ํ prop์ด๋ ๋ถ๋ฆฌ๋ props๋ก ๊ตฌ๋ถํ๋ ๋ฐฉ์์ ๊ณ ๋ คํด ๋ณด์ธ์.- variant !== 'default' && - variant !== 'image' && - !className?.includes('w-[460px]'); + variant !== 'default' && + variant !== 'image' && + !hasWideSize // ๋ณ๋ boolean props๋ก ๋์ฒดsrc/app/preview/dropdown/page.tsx (1)
47-47: ๋ณ์ ์ฌ์ฉ ์ฌ๋ถ ํ์ธ
selectedFilter๋ ์ํ๋ก ์ ์ธ๋ง ๋์ด ์๊ณ ์ค์ ๋ก UI๋ ๋ก์ง์์ ์ฌ์ฉ๋์ง ์์ ๋ฆฐํธ ๊ฒฝ๊ณ ๊ฐ ๋ฐ์ํ๊ณ ์์ต๋๋ค. ๋ค์ด๋ฐ์_selectedFilter๋ก ๋ฐ๊พธ๊ฑฐ๋, ์ค์ ๋ก์ง์ ํ์ฉํ๋๋ก ๊ณ ๋ คํด ๋ณด์ธ์.- const [selectedFilter, setSelectedFilter] = useState<string | null>(null); + const [_selectedFilter, setSelectedFilter] = useState<string | null>(null);๐งฐ Tools
๐ช GitHub Check: check
[warning] 47-47:
'selectedFilter' is assigned a value but never used. Allowed unused vars must match /^_/u
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
โ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
๐ Files selected for processing (4)
.husky/pre-commit(1 hunks)package.json(1 hunks)src/app/preview/dropdown/page.tsx(1 hunks)src/components/common/Dropdown.tsx(1 hunks)
โ Files skipped from review due to trivial changes (1)
- .husky/pre-commit
๐งฐ Additional context used
๐ช GitHub Check: check
src/app/preview/dropdown/page.tsx
[warning] 47-47:
'selectedFilter' is assigned a value but never used. Allowed unused vars must match /^_/u
[failure] 130-130:
Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.
๐ช GitHub Actions: PR Check
src/app/preview/dropdown/page.tsx
[error] 130-130: Type error: Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.
๐ Additional comments (6)
src/components/common/Dropdown.tsx (4)
9-13: ์ธํฐํ์ด์ค ์ ์๊ฐ ๋ช ๋ฃํฉ๋๋ค.
IDropdownOption์ธํฐํ์ด์ค๊ฐ ์ต์ ๋ณ๋ก ํ์ํ ์์ฑ์ ์ ์บก์ํํด์ฃผ๊ณ ์์ต๋๋ค. ํ์ฅ์ฑ ์๊ฒ ๊ตฌ์ฑ๋์ด ์์ด ๋ณด์ ๋๋ค.
15-27: ํ๋กํผํฐ ์ถ๊ฐยท๋ณ๊ฒฝ ํ์ธ
IDropdownProps์ ์๋ก ์ถ๊ฐ๋options,variant,onChange๋ฑ์ ์ค์ ์ฌ์ฉ์ ๋ช ํํ ํด์ฃผ๋ฉฐ ์ปดํฌ๋ํธ ์ฌ์ฌ์ฉ์ฑ์ ๋์ด๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค. ๊ธฐ์กด๋ณด๋ค ํจ์ฌ ์ ์ฐํ๊ฒ ์ปค์คํฐ๋ง์ด์ง ๊ฐ๋ฅํด ๋ณด์ ๋๋ค.
50-54:handleSelect์ฝ๋ฐฑ ๊ตฌ์กฐ๊ฐ ์ ์ค๊ณ๋์์ต๋๋ค.
์ต์ ์ ํ ์ ๋ทฐ ์ํ ๋ฐ์(setSelectedValue)๊ณผ ์ธ๋ถ ์ฝ๋ฐฑ(onChange), ๊ทธ๋ฆฌ๊ณ ์ต์ ๋จ์ ์จ์ ๋ ํธ๊น์ง ๊ฐ๊ฐ ๊ตฌ๋ถํด์ ํธ์ถํด ์ฃผ๋ ๋ก์ง์ด ๋ช ํํฉ๋๋ค.
92-95: CSS ์ ๊ทผ์ฑ์ ๊ฒํ ํด ๋ณด์ธ์.
bg-Cgray200 text-Cgray400์์ ๋๋น๊ฐ ์ถฉ๋ถํ์ง ์์ผ๋ฉด ์์ธ์ฑ์ด ๋จ์ด์ง ์ ์์ต๋๋ค. ์ ๊ทผ์ฑ(WCAG AA) ์ธก๋ฉด์์ ํ ์คํธ ๋๋น๋ฅผ ํ๋ฒ ๋ ํ์ธํด ๋ณด์๋ ๊ฑธ ๊ถ์ฅํฉ๋๋ค.src/app/preview/dropdown/page.tsx (1)
100-121: ์ฌ์ฉ ์์ ๋ฌธ์ํ๊ฐ ํ๋ฅญํฉ๋๋ค.
์ฃผ์์ ํตํด ์์ธํ ์์์ ์ต์ ์ค๋ช ์ด ์ ๊ณต๋์ด ์์ด, ๋ค๋ฅธ ๊ฐ๋ฐ์๊ฐ ์ฝ๊ฒ ๋๋กญ๋ค์ด ์ปดํฌ๋ํธ๋ฅผ ์ ์ฉํ ์ ์์ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค.package.json (1)
31-31: SVG ๋ก๋ ์ค์ ํ์ธ
"@svgr/webpack": "^8.1.0"๊ฐ devDependencies๋ก ์ถ๊ฐ๋์์ผ๋, Next.js์ ํจ๊ป ์ฌ์ฉํ ๋์๋ ์ถ๊ฐ ์ค์ (์:next.config.js)์ด ํ์ํ ์ ์์ต๋๋ค. ํด๋น ์ค์ ์ด ๋๋ฝ๋๋ฉด SVG import ์ ์ฌ์ฉ ์๋๋๋ก ๋์ํ์ง ์์ ์ ์์ผ๋ ํ์ธํด ๋ณด์ธ์.
| options={menuOptions} | ||
| variant="image" | ||
| imageProps={{ | ||
| src: profile, |
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.
์ด๋ฏธ์ง ์์ค ํ์
์๋ฌ ๋ฐ์
profile๊ฐ SVG React ์ปดํฌ๋ํธ๋ก ํ๋จ๋์ด Image ์ปดํฌ๋ํธ์ ์ ๋ฌ๋ ๋ ํ์
๋ถ์ผ์น๊ฐ ๋ฐ์ํฉ๋๋ค. @svgr/webpack ์ฌ์ฉ ์, ?url ์ฟผ๋ฆฌ๋ก ์ค์ ๊ฒฝ๋ก ๋ฌธ์์ด์ ๋ถ๋ฌ์ค๊ฑฐ๋ ๋ค๋ฅธ ๋ฐฉ์์ ์ฌ์ฉํ๋๋ก ๊ตฌ์ฑํด์ผ ํฉ๋๋ค.
์๋์ ๊ฐ์ ํํ๋ก ์์ ํ์ฌ Image์ URL์ ์ ๋ฌํด ๋ณด์ธ์:
-import profile from '@/assets/icon/profile.svg';
+import profileUrl from '@/assets/icon/profile.svg?url';
...
imageProps={{
- src: profile,
+ src: profileUrl,
width: 40,
height: 40,
...
}}๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| src: profile, | |
| - import profile from '@/assets/icon/profile.svg'; | |
| + import profileUrl from '@/assets/icon/profile.svg?url'; | |
| ... | |
| imageProps={{ | |
| - src: profile, | |
| + src: profileUrl, | |
| width: 40, | |
| height: 40, | |
| ... | |
| }} |
๐งฐ Tools
๐ช GitHub Check: check
[failure] 130-130:
Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.
๐ช GitHub Actions: PR Check
[error] 130-130: Type error: Type 'FC<SVGProps>' is not assignable to type 'string | StaticImport'.
๐ย ์ฃผ์ ์์ ๋ด์ฉ
๋๋กญ๋ค์ด trigger์ contents ๋ณํฉ
filter ๊ธฐ๋ฅ๊ณผ ์คํ์ผ ์ปค์คํ ๊ตฌํ
๐บย ์คํฌ๋ฆฐ์ท
๐ ์ฐธ๊ณ ์ฌํญ
์ฝ๋๊ฐ ๋ง์ด ๋๋ฝ์ต๋๋ค ์ฃ์กํฉ๋๋ค..

preview/dropdown/page.tsx์ ์ค๋ช ์์ต๋๋ค.. ์ฐธ๊ณ ํด์ฃผ์ธ์ฉ..!
๐ฌย ๋ฆฌ๋ทฐ ์๊ตฌ์ฌํญ
๐ย ๊ด๋ จ ์ด์
DEVING-35
Summary by CodeRabbit
New Features
Chores