-
Notifications
You must be signed in to change notification settings - Fork 0
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] TextField 컴포넌트 구현 #65
Conversation
…m-1-FE into feat/#3ab275847
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
apps/web/src/app/page.tsxOops! Something went wrong! :( ESLint: 9.17.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@repo/eslint-config' imported from /eslint.config.mjs """ 워크스루이 풀 리퀘스트는 웹 애플리케이션의 폼 처리 및 UI 컴포넌트 개선에 중점을 둡니다. 변경 사항
제안된 라벨
제안된 리뷰어
관련 가능성 있는 PR
토끼의 시 🐰
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
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: 7
🧹 Nitpick comments (10)
packages/ui/src/components/TextField/context.ts (1)
5-9
: 타입 정의에 JSDoc 문서화 추가 필요각 속성의 용도와 사용 방법을 명확하게 이해할 수 있도록 JSDoc 문서화를 추가하는 것이 좋습니다.
+/** + * TextField 컴포넌트의 Context 값을 정의하는 인터페이스 + */ export type TextFieldContextValue = { + /** input 요소의 id 속성값 */ id?: string; + /** TextField의 변형 타입 */ variant?: TextFieldVariant; + /** 에러 상태 여부 */ isError?: boolean; };packages/ui/src/components/TextField/TextFieldLabel.tsx (1)
15-15
: className 결합 방식 개선 필요템플릿 리터럴을 사용한 className 결합은 불필요한 공백을 만들 수 있습니다. clsx나 classnames 같은 유틸리티를 사용하는 것이 좋습니다.
-className={`${labelStyle({ isError })} ${className}`} +import clsx from 'clsx'; +className={clsx(labelStyle({ isError }), className)}packages/ui/src/components/TextField/TextFieldSubmit.tsx (1)
26-26
: 아이콘 속성의 유연성 개선 필요아이콘의 크기와 색상이 하드코딩되어 있어 재사용성이 제한됩니다. props를 통해 설정할 수 있도록 변경하는 것이 좋습니다.
+export type TextFieldSubmitProps = Omit< + ComponentPropsWithoutRef<'button'>, + 'children' +> & { + iconSize?: number; + iconColors?: { + default: string; + error: string; + }; +}; -<Icon name="send" size={32} color={isError ? 'grey200' : 'grey950'} /> +<Icon + name="send" + size={iconSize ?? 32} + color={isError ? iconColors?.error ?? 'grey200' : iconColors?.default ?? 'grey950'} +/>packages/ui/src/components/TextField/TextFieldRoot.tsx (1)
10-34
: 컴포넌트 구현이 React 모범 사례를 잘 따르고 있습니다.forwardRef를 사용하여 ref 전달을 지원하고, Context를 통해 하위 컴포넌트와 상태를 공유하는 구현이 잘 되어있습니다.
다만, 성능 최적화를 위해 다음과 같은 개선을 고려해보세요:
-export const TextFieldRoot = forwardRef<HTMLDivElement, TextFieldProps>( +export const TextFieldRoot = forwardRef<HTMLDivElement, TextFieldProps>(( + { + id, + variant = 'default', + isError = false, + children, + className = '', + ...props + }, + ref +) => { + const contextValue = useMemo( + () => ({ id, variant, isError }), + [id, variant, isError] + ); + + return ( + <TextFieldContext.Provider value={contextValue}> + <div + ref={ref} + className={`${textFieldWrapperStyle} ${className}`} + {...props} + > + {children} + </div> + </TextFieldContext.Provider> + ); +});packages/ui/src/components/TextField/TextField.tsx (2)
6-44
: 문서화가 상세하고 예제가 잘 구성되어 있습니다.다양한 사용 사례를 포함한 문서화가 잘 되어 있습니다. 특히 비제어/제어 컴포넌트와 유효성 검사 예제가 실용적입니다.
추가로 고려해볼 사항:
- TypeScript 예제 추가
- 에러 메시지 표시 방법에 대한 예제 추가
45-49
: 컴파운드 컴포넌트 패턴이 적절하게 구현되어 있습니다.Object.assign을 사용한 컴포넌트 구성이 깔끔합니다. 다만, 향후 확장성을 위해 다음과 같은 구조도 고려해보세요:
-export const TextField = Object.assign(TextFieldRoot, { +const TextField = Object.assign(TextFieldRoot, { Label: TextFieldLabel, Input: TextFieldInput, Submit: TextFieldSubmit, }); + +TextField.displayName = 'TextField'; + +export { TextField };packages/ui/src/components/TextField/TextField.css.ts (1)
16-17
: 매직 넘버를 상수로 분리하는 것이 좋습니다.minHeight와 padding 값을 상수로 분리하여 재사용성과 일관성을 높이는 것이 좋습니다.
+const TEXT_FIELD_CONSTANTS = { + MIN_HEIGHT: '59px', + PADDING: '16px', +} as const; + base: { width: '100%', - minHeight: '59px', - padding: '16px', + minHeight: TEXT_FIELD_CONSTANTS.MIN_HEIGHT, + padding: TEXT_FIELD_CONSTANTS.PADDING,packages/ui/src/components/TextField/TextFieldInput.tsx (1)
25-48
: 상수 값을 분리하고 상태 관리를 개선하면 좋을 것 같습니다.
maxLength
기본값 500은 상수로 분리하는 것이 좋습니다.- 제어/비제어 상태 관리 로직을 단순화할 수 있습니다.
다음과 같이 개선해보세요:
+const DEFAULT_MAX_LENGTH = 500; + export const TextFieldInput = forwardRef< HTMLTextAreaElement, TextFieldInputProps >( ( { - maxLength = 500, + maxLength = DEFAULT_MAX_LENGTH, showCounter = true, value: controlledValue, defaultValue,apps/web/src/app/page.tsx (1)
18-34
: 폼 검증 로직을 강화하면 좋을 것 같습니다.
- 성공 메시지가 너무 일반적입니다.
- 폼 검증 스키마를 별도로 분리하면 좋을 것 같습니다.
다음과 같은 개선을 제안드립니다:
// formSchema.ts import { z } from 'zod'; export const formSchema = z.object({ topic: z.string() .min(1, '주제를 입력해주세요') .max(500, '500자 이내로 입력해주세요'), aiUpgrade: z.string() .max(500, '500자 이내로 입력해주세요') }); export type FormValues = z.infer<typeof formSchema>;apps/web/package.json (1)
19-20
: 의존성 버전 관리를 개선하면 좋을 것 같습니다.
react-hook-form
의 버전 범위가 너무 넓습니다.- 주요 업데이트로 인한 호환성 문제가 발생할 수 있습니다.
다음과 같이 버전을 고정하는 것을 추천드립니다:
"react-dom": "^18", - "react-hook-form": "^7.54.2" + "react-hook-form": "7.54.2"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
apps/web/package.json
(1 hunks)apps/web/src/app/page.tsx
(3 hunks)packages/ui/src/components/TextField/TextField.css.ts
(1 hunks)packages/ui/src/components/TextField/TextField.tsx
(1 hunks)packages/ui/src/components/TextField/TextFieldCounter.tsx
(1 hunks)packages/ui/src/components/TextField/TextFieldInput.tsx
(1 hunks)packages/ui/src/components/TextField/TextFieldLabel.tsx
(1 hunks)packages/ui/src/components/TextField/TextFieldRoot.tsx
(1 hunks)packages/ui/src/components/TextField/TextFieldSubmit.tsx
(1 hunks)packages/ui/src/components/TextField/context.ts
(1 hunks)packages/ui/src/components/index.ts
(1 hunks)packages/ui/src/utils/index.ts
(1 hunks)packages/ui/src/utils/isNill.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/ui/src/utils/index.ts
🔇 Additional comments (6)
packages/ui/src/utils/isNill.ts (1)
1-2
: 구현이 깔끔하고 정확합니다!타입 서술어(type predicate)를 사용한 타입 가드 구현이 매우 적절합니다.
null
과undefined
를 동시에 체크하기 위해 느슨한 동등 비교(==
)를 사용한 것도 좋은 선택입니다.packages/ui/src/components/TextField/TextFieldLabel.tsx (1)
8-20
: props 타입 안전성 강화 필요props spreading 사용 시 예상치 못한 속성이 전달될 수 있습니다. 필요한 props만 명시적으로 전달하는 것이 좋습니다.
packages/ui/src/components/TextField/TextFieldRoot.tsx (1)
5-8
: Props 타입 정의가 명확하고 잘 구성되어 있습니다.컴포넌트의 Props가 ReactNode, TextFieldContextValue, 그리고 div의 기본 속성들을 포함하여 잘 정의되어 있습니다.
packages/ui/src/components/index.ts (1)
23-30
: 내보내기가 일관된 패턴을 따르고 있습니다.TextField 컴포넌트와 관련 타입들의 내보내기가 프로젝트의 기존 패턴을 잘 따르고 있습니다.
packages/ui/src/components/TextField/TextFieldInput.tsx (1)
1-23
: 타입 정의가 잘 되어있습니다!타입스크립트 타입 정의가 명확하고,
Omit
을 사용하여 중복되는 prop들을 적절히 제거했습니다.apps/web/src/app/page.tsx (1)
158-167
:⚠️ Potential issue중복된 TextField 구현이 있습니다.
- 동일한
id
를 가진 TextField가 중복 구현되어 있습니다.isError
prop이 있지만 실제 에러 메시지를 표시하지 않습니다.중복된 TextField를 제거하고, 에러 처리를 다음과 같이 개선하세요:
- <TextField id="ai-field" variant="button" isError> - <TextField.Label>AI 업그레이드</TextField.Label> - <TextField.Input - placeholder="AI에게 요청하여 글 업그레이드하기" - maxLength={500} - showCounter - {...register('aiUpgrade')} - /> - <TextField.Submit type="submit" /> - </TextField>Likely invalid or redundant comment.
export function isNil(value: unknown): value is null | undefined { | ||
return value == null; | ||
} |
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.
💡 Codebase verification
파일 이름 수정과 import 구문 업데이트가 필요합니다.
다음 변경이 필요합니다:
packages/ui/src/utils/isNill.ts
→packages/ui/src/utils/isNil.ts
파일 이름 변경packages/ui/src/utils/index.ts
파일의 import 경로 수정
🔗 Analysis chain
파일 이름 오타를 수정해 주세요.
현재 파일 이름이 isNill.ts
로 되어 있는데, 함수 이름인 isNil
과 일치하도록 isNil.ts
로 수정하는 것이 좋겠습니다. 이는 다른 개발자들의 혼란을 방지하고 일관성을 유지하는데 도움이 될 것입니다.
다음과 같이 파일 이름을 변경해 주세요:
-packages/ui/src/utils/isNill.ts
+packages/ui/src/utils/isNil.ts
관련 import 구문도 함께 수정이 필요할 수 있습니다.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Find any imports of the misspelled filename
# Search for imports of 'isNill'
rg "from ['\"].*isNill['\"]" --type ts
Length of output: 109
Script:
#!/bin/bash
# Search for any mentions of 'isNill' in all files
rg "isNill" --type-not ts
# Search for any other potential typescript imports or references we might have missed
rg "isNill" --type ts -g '!packages/ui/src/utils/index.ts'
Length of output: 84
isError?: boolean; | ||
}; | ||
|
||
export const TextFieldContext = createContext<TextFieldContextValue>({}); |
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.
🛠️ Refactor suggestion
Context의 기본값 처리 개선 필요
빈 객체를 기본값으로 사용하면 Provider 없이 Context를 사용할 때 런타임 에러가 발생할 수 있습니다. 명시적인 기본값을 설정하는 것이 좋습니다.
-export const TextFieldContext = createContext<TextFieldContextValue>({});
+export const TextFieldContext = createContext<TextFieldContextValue>({
+ id: undefined,
+ variant: 'default',
+ isError: false
+});
📝 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.
export const TextFieldContext = createContext<TextFieldContextValue>({}); | |
export const TextFieldContext = createContext<TextFieldContextValue>({ | |
id: undefined, | |
variant: 'default', | |
isError: false | |
}); |
>(({ current, max, className = '', ...props }, ref) => { | ||
const { isError } = useContext(TextFieldContext); | ||
|
||
return ( | ||
<span | ||
ref={ref} | ||
className={`${counterStyle({ isError })} ${className}`} | ||
{...props} | ||
> | ||
{current}/{max} | ||
</span> | ||
); | ||
}); |
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.
🛠️ Refactor suggestion
접근성 및 유효성 검사 개선 필요
- 스크린 리더 사용자를 위한 aria-label 추가가 필요합니다.
- current 값이 max를 초과하는 경우에 대한 처리가 필요합니다.
return (
<span
ref={ref}
className={`${counterStyle({ isError })} ${className}`}
+ aria-label={`현재 ${current}자, 최대 ${max}자`}
+ role="status"
{...props}
>
{current}/{max}
</span>
);
또한 props 타입에 유효성 검사를 추가하는 것이 좋습니다:
export type TextFieldCounterProps = {
current: number;
max: number;
onExceed?: (current: number, max: number) => void;
} & ComponentPropsWithoutRef<'span'>;
bottom: '45px', | ||
right: vars.space[12], |
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.
🛠️ Refactor suggestion
Submit 버튼의 위치 계산 방식 개선이 필요합니다.
절대 위치 지정 시 하단 여백을 고정값으로 사용하는 것은 responsive 디자인에 문제가 될 수 있습니다.
base: {
position: 'absolute',
- bottom: '45px',
+ bottom: '50%',
+ transform: 'translateY(50%)',
right: vars.space[12],
📝 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.
bottom: '45px', | |
right: vars.space[12], | |
bottom: '50%', | |
transform: 'translateY(50%)', | |
right: vars.space[12], |
const handleResizeHeight = () => { | ||
const textarea = textareaRef.current; | ||
if (isNil(textarea)) return; | ||
|
||
// height 초기화 | ||
textarea.style.height = 'auto'; | ||
|
||
// 스크롤 높이에 따라 높이 조절 | ||
const newHeight = textarea.scrollHeight; | ||
textarea.style.height = `${newHeight}px`; | ||
|
||
// 한 줄 높이 = 상하패딩(32px) + 라인높이(27px) = 59px | ||
setIsMultiline(newHeight > 59); | ||
}; |
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.
🛠️ Refactor suggestion
높이 계산 로직을 개선할 필요가 있습니다.
- 매직 넘버 59px이 하드코딩되어 있습니다.
- 높이 계산 로직이 스타일 변경에 취약할 수 있습니다.
다음과 같이 개선해보세요:
+const LINE_HEIGHT = 27;
+const VERTICAL_PADDING = 32;
+const SINGLE_LINE_HEIGHT = LINE_HEIGHT + VERTICAL_PADDING;
+
const handleResizeHeight = () => {
const textarea = textareaRef.current;
if (isNil(textarea)) return;
// height 초기화
textarea.style.height = 'auto';
// 스크롤 높이에 따라 높이 조절
const newHeight = textarea.scrollHeight;
textarea.style.height = `${newHeight}px`;
- // 한 줄 높이 = 상하패딩(32px) + 라인높이(27px) = 59px
- setIsMultiline(newHeight > 59);
+ setIsMultiline(newHeight > SINGLE_LINE_HEIGHT);
};
📝 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.
const handleResizeHeight = () => { | |
const textarea = textareaRef.current; | |
if (isNil(textarea)) return; | |
// height 초기화 | |
textarea.style.height = 'auto'; | |
// 스크롤 높이에 따라 높이 조절 | |
const newHeight = textarea.scrollHeight; | |
textarea.style.height = `${newHeight}px`; | |
// 한 줄 높이 = 상하패딩(32px) + 라인높이(27px) = 59px | |
setIsMultiline(newHeight > 59); | |
}; | |
const LINE_HEIGHT = 27; | |
const VERTICAL_PADDING = 32; | |
const SINGLE_LINE_HEIGHT = LINE_HEIGHT + VERTICAL_PADDING; | |
const handleResizeHeight = () => { | |
const textarea = textareaRef.current; | |
if (isNil(textarea)) return; | |
// height 초기화 | |
textarea.style.height = 'auto'; | |
// 스크롤 높이에 따라 높이 조절 | |
const newHeight = textarea.scrollHeight; | |
textarea.style.height = `${newHeight}px`; | |
setIsMultiline(newHeight > SINGLE_LINE_HEIGHT); | |
}; |
const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => { | ||
if (maxLength && e.target.value.length > maxLength) return; | ||
if (isNil(controlledValue)) { | ||
setUncontrolledValue(e.target.value); | ||
} | ||
handleResizeHeight(); | ||
onChange?.(e); | ||
}; | ||
|
||
useEffect(() => { | ||
handleResizeHeight(); | ||
}, [value]); | ||
|
||
return ( | ||
<> | ||
<textarea | ||
rows={1} | ||
id={id} | ||
ref={mergeRefs(ref, textareaRef)} | ||
className={`${textFieldStyle({ variant })} ${className}`} | ||
value={value} | ||
onChange={handleChange} | ||
data-multiline={isMultiline} | ||
{...props} | ||
/> | ||
{showCounter && ( | ||
<TextFieldCounter current={value.length} max={maxLength} /> | ||
)} | ||
</> | ||
); | ||
} | ||
); | ||
|
||
TextFieldInput.displayName = 'TextField.Input'; |
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.
🛠️ Refactor suggestion
접근성 개선이 필요합니다.
- 텍스트 영역에
aria-label
또는aria-labelledby
속성이 없습니다. - 문자 수 카운터에 대한 스크린 리더 지원이 필요합니다.
다음과 같이 개선해보세요:
<textarea
rows={1}
id={id}
ref={mergeRefs(ref, textareaRef)}
className={`${textFieldStyle({ variant })} ${className}`}
value={value}
onChange={handleChange}
data-multiline={isMultiline}
+ aria-labelledby={id}
+ aria-describedby={showCounter ? `${id}-counter` : undefined}
{...props}
/>
{showCounter && (
<TextFieldCounter
+ id={`${id}-counter`}
+ aria-label="현재 글자 수"
current={value.length}
max={maxLength}
/>
)}
Committable suggestion skipped: line range outside the PR's diff.
스크롤바 노출 관련 요구사항을 잊었네요.. 구현해두겠습니다! |
minHeight: '59px', | ||
padding: '16px', | ||
borderRadius: '12px', |
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.
단위 rem으로 부탁드려요!!
minHeight: '59px', | |
padding: '16px', | |
borderRadius: '12px', | |
minHeight: '5.9rem', | |
padding: '1.6rem', | |
borderRadius: '1.2rem', |
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.
전부 수정했습니다~! 스크롤 스타일, rem, 디자인 요구사항 변경 모두 반영했어요!
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)
packages/ui/src/components/TextField/TextFieldInput.tsx (1)
65-72
: maxLength 검증을 HTML 속성으로 개선해주세요.현재 수동으로 처리하는 maxLength 검증을 HTML의 기본 maxLength 속성을 사용하도록 변경하면 더 효율적일 것 같습니다.
<textarea rows={1} id={id} ref={mergeRefs(ref, textareaRef)} className={`${textFieldStyle({ variant })} ${className}`} value={value} + maxLength={maxLength} onChange={handleChange} data-multiline={isMultiline} {...props} />
packages/ui/src/components/TextField/TextField.css.ts (1)
51-65
: 스크롤바 스타일링의 브라우저 호환성을 개선해주세요.Firefox에서의 스크롤바 스타일링이 제한적입니다. 다음과 같이 개선하면 좋을 것 같습니다:
selectors: { '&::-webkit-scrollbar': { width: '0.6rem', }, '&::-webkit-scrollbar-thumb': { backgroundColor: vars.colors.grey200, borderRadius: '0.4rem', backgroundClip: 'padding-box', }, '&::-webkit-scrollbar-track': { backgroundColor: 'transparent', }, + '&::-moz-scrollbar': { + width: '0.6rem', + }, + '&::-moz-scrollbar-thumb': { + backgroundColor: vars.colors.grey200, + borderRadius: '0.4rem', + }, + '&::-moz-scrollbar-track': { + backgroundColor: 'transparent', + }, },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/web/src/app/page.tsx
(3 hunks)packages/ui/src/components/TextField/TextField.css.ts
(1 hunks)packages/ui/src/components/TextField/TextFieldInput.tsx
(1 hunks)
🔇 Additional comments (3)
packages/ui/src/components/TextField/TextFieldInput.tsx (2)
50-63
: 높이 계산 로직의 매직 넘버를 상수로 분리해주세요.이전 리뷰에서 지적된 사항이 아직 반영되지 않았습니다.
81-91
: 접근성 속성이 누락되었습니다.이전 리뷰에서 제안된 aria 속성 추가가 아직 반영되지 않았습니다.
apps/web/src/app/page.tsx (1)
136-137
: maxLength 값의 일관성을 확인해주세요.topic 필드는 500자로 제한되어 있지만, aiUpgrade 필드는 5000자로 설정되어 있습니다. 의도된 설정인지 확인이 필요합니다.
Also applies to: 151-152
<TextField id="ai-field" variant="button" isError> | ||
<TextField.Label>AI 업그레이드</TextField.Label> | ||
<TextField.Input | ||
placeholder="AI에게 요청하여 글 업그레이드하기" | ||
maxLength={5000} | ||
showCounter | ||
{...register('aiUpgrade')} | ||
/> | ||
<TextField.Submit type="submit" /> | ||
</TextField> |
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.
중복된 TextField를 제거해주세요.
동일한 id와 register를 사용하는 TextField가 중복 구현되어 있습니다. 이는 다음과 같은 문제를 일으킬 수 있습니다:
- id 중복으로 인한 접근성 문제
- 동일한 필드에 대한 중복 등록
}; | ||
|
||
const handleChange = (e: ChangeEvent<HTMLTextAreaElement>) => { | ||
if (maxLength && e.target.value.length > maxLength) return; |
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.
…m-1-FE into feat/#3ab275847
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
apps/web/src/app/page.tsx
(3 hunks)
🔇 Additional comments (3)
apps/web/src/app/page.tsx (3)
3-3
: 폼 설정이 잘 구현되었습니다!타입 정의와 react-hook-form 설정이 깔끔하게 구현되었습니다.
Also applies to: 19-35
164-173
: 중복된 TextField를 제거해주세요.동일한 id와 register를 사용하는 TextField가 중복 구현되어 있습니다. 이는 다음과 같은 문제를 일으킬 수 있습니다:
- id 중복으로 인한 접근성 문제
- 동일한 필드에 대한 중복 등록
37-40
: 🛠️ Refactor suggestion폼 제출 처리 개선이 필요합니다.
현재 구현은 다음과 같은 개선이 필요합니다:
- 폼 제출 실패 시 에러 처리가 없습니다
- 성공 메시지가 하드코딩되어 있습니다
다음과 같이 개선하는 것을 제안드립니다:
- const onSubmit = (data: FormValues) => { - console.log('Form data:', data); - notify1(); // 성공 토스트 표시 - }; + const onSubmit = async (data: FormValues) => { + try { + // API 호출 또는 데이터 처리 + await handleFormData(data); + notify1(); + } catch (error) { + notify2(); + console.error('폼 제출 실패:', error); + } + };Likely invalid or redundant comment.
<TextField.Input | ||
placeholder="주제를 적어주세요" | ||
maxLength={5000} | ||
{...register('topic', { | ||
required: '주제를 입력해주세요', | ||
maxLength: { | ||
value: 500, | ||
message: '500자 이내로 입력해주세요', | ||
}, | ||
})} | ||
/> |
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.
문자 제한 설정이 일관되지 않습니다.
다음과 같은 문제점이 있습니다:
- maxLength prop이 5000으로 설정되어 있지만 validation은 500자로 제한되어 있습니다
- TextField 컴포넌트 간 maxLength 값이 일관되지 않습니다
다음과 같이 수정하는 것을 제안드립니다:
<TextField.Input
placeholder="주제를 적어주세요"
- maxLength={5000}
+ maxLength={500}
{...register('topic', {
required: '주제를 입력해주세요',
maxLength: {
value: 500,
message: '500자 이내로 입력해주세요',
},
})}
/>
Also applies to: 155-159
* chore(apps/web): react-hook-form 설치 * feat(packages/ui): isNill 함수 추가 * chore(packages/ui): isNill export * feat(packages/ui): TextField 컴포넌트 구현 * test(apps/web): 예시 추가 * fix(packages/ui): 디자인 요구사항 수정
* feat(packages/ui): chip 컴포넌트 * [Feat] TextField 컴포넌트 구현 (#65) * chore(apps/web): react-hook-form 설치 * feat(packages/ui): isNill 함수 추가 * chore(packages/ui): isNill export * feat(packages/ui): TextField 컴포넌트 구현 * test(apps/web): 예시 추가 * fix(packages/ui): 디자인 요구사항 수정 * [Feat] 아이콘, 색상 변경 사항 반영 (#72) * feat(packages/theme): 아이콘 변경 사항 반영 * fix(packages/ui): 누락된 아이콘 추가 * feat(packages/ui): chip 컴포넌트 * feat(packages/ui): Chip에 사용되는 아이콘 추가 * fix(packages/ui): Text 컴포넌트 color prop 없을 때 inherit으로 지정, 기본 line height 값 지정 * fix(packages/ui): Icon 컴포넌트 color 상속 시 path 태그 외의 다른 태그들도 상속 받을 수 있도록 수정 * fix(packages/ui): Chip 컴포넌트 스타일 수정 * feat: x 아이콘 color 수정 * feat: onClose 추가 * fix: x 아이콘 호버링 시 cursor pointer로 지정 * feat: 리뷰 반영 * fix(packages/ui): closable 버튼 보이지 않는 문제 * fix: 리뷰 반영 --------- Co-authored-by: MINSEONG KIM <[email protected]>
* [Feat] 프로젝트 스캐폴딩 (#2) * docs: 이슈, PR 템플릿 추가 * docs: codeoners 추가 * feat: web 앱 Next.js, React 버전 다운그레이드 * feat: eslint, tsconfig 종속성, prettier 추가 * feat: husky, lint-staged 설치 * feat: husky, lint-staged 테스트 * chore: husky, lint-staged 테스트 * chore: husky, lint-staged 테스트 2 * fix: eslint config 수정 * chore: husky, lint-staged 테스트 3 * chore: husky, lint-staged 테스트 4 * chore: husky, lint-staged 테스트 5 * feat: .nvmrc 추가 * feat: vanilla extract 설치, config 수정 * chore: web 앱 type: module 설정 제거 * chore: vanilla extract 설치, next.config.js 수정 * [Chore]: 리뷰어 선정 시 슬랙 알림 workflow 적용 (#33) * [Chore]: ui 패키지 초기 셋팅 (#34) * feat(packages/theme): theme 패키지를 생성해요. (#36) * [Chore]: build ci 추가 (#38) * feat: pnpm workspace 추가 (#42) * [Fix]: theme, ui 패키지의 vanilla-extract 빌드 설정 수정 (#45) * fix(apps/web, packages/theme, packages/ui): theme, ui 패키지의 vanilla-extract 빌드 설정, css 관련 수정 * chore(packages/theme, packages/ui): build 스크립트 수정 * chore(packages/theme, packages/ui): exports 수정 * chore(packages/theme, packages/ui): exports 수정 * wip * chore(packages/theme, packages/ui): 불필요 dependency 제거 * chore(packages/theme, packages/ui): 불필요 필드 제거 * fix: 공통 패키지 루트로 끌어올리기, 패키지 버전 의존성 적용 * fix: 테스트 컴포넌트 제거 * fix: 테스트 컴포넌트 제거 * chore(apps/web): 주석처리 * chore: 빌드 테스트 * chore: 테스트용 컴포넌트 제거 --------- Co-authored-by: kangnayeon <[email protected]> * [Feat]: theme 적용을 위한 Provider 추가 (#47) * [Feat] Spacing 컴포넌트 추가 (#49) * [Feat] Icon 컴포넌트 추가 (#48) * feat(packages/ui): Icon 컴포넌트 추가 * fix(packages/ui): 아이콘 속성 camelCase로 수정 * feat(packages/ui): svg 파일 import 스크립트, svgr 플러그인 설정 추가 * feat(packages/ui): Icon 컴포넌트 * fix(packages/theme): color 뎁스 낮추기 * [Feat] Spacing 컴포넌트 추가 (#49) * fix: resolve conflicts * fix(packages/theme): 컬러 토큰 변경에 따른 dark, theme 토큰 변경 * fix: resolve conflicts * chore: 주석 제거 --------- Co-authored-by: minseong <[email protected]> * [Fix] Icon 컴포넌트 수정 (#51) * fix(packages/ui): Icon 컴포넌트 수정 * chore(packages/ui): 색상 스타일 로직 개선 * fix(packages/ui): IconProps의 color 타입을 string으로 수정해요 * [Fix] 컬러 시스템 내의 색상만 사용할 수 있도록 Icon 컴포넌트 수정 (#53) * fix(packages/ui): Icon 컴포넌트 수정 * chore(packages/ui): 색상 스타일 로직 개선 * fix(packages/ui): IconProps의 color 타입을 string으로 수정해요 * fix(packages/ui, apps/web): 컬러 시스템 내의 색상만 사용할 수 있도록 Icon 컴포넌트 수정 * [Fix] Spacing 컴포넌트 수정 (#54) * fix(packages/ui): Spacing 컴포넌트 수정 * chore: name import 하도록 수정 * chore: 배럴 파일 수정 * chore: empty file 삭제 * chore(packages/theme): 색상 추가 (#56) * [Feat] Text 컴포넌트 추가 (#57) * feat(packages/ui): Text 컴포넌트 * feat(packages/ui): 컴파운드 객체 추가 * chore(packages/ui): TypographyType theme에서 가져오도록 수정 * fix(packages/ui): TextCompoundType 선언 시 중복되는 구문 수정 * fix(packages/ui): Compound Text 컴포넌트 선언 시 중복되는 로직 수정 * feat(packages/ui): Text 컴포넌트 사용 시 대문자 사용하도록 수정 * [Feat] Toast 컴포넌트 추가 (#52) * chore(packages/ui): ovarlay-kit 의존성 추가 * feat(packages/ui): Toast 컴포넌트 구현 * test(apps/web): Toast 컴포넌트 사용 예시 추가 * fix(packages/ui): 접근성 개선 * chore(packages/ui): lock 파일 업데이트 * chore(packages/themes): violet 색상 추가 * chore(packages/ui): success일 경우의 색상 변경 * fix(apps/web): Providers 컴포넌트 분리, OverlayProvider 이동 * [Feat] Badge 컴포넌트 구현 (#58) * feat(packages/ui, apps/web): Badge 컴포넌트 구현 * fix(packages/ui, apps/web): Badge 컴포넌트 수정 * chore(packages/ui): named import 변경 * [Feat] Checkbox 컴포넌트 추가 (#60) * feat(packages/ui): 누름 상태 관리를 위한 usePress 추가 * chore(packages/ui): 체크박스 아이콘 추가 * feat(packages/ui): 체크박스 컴포넌트 추가 * chore(apps/web): 사용 예시 추가 * fix(packages/ui): 키보드 접근성 수정 * [Feat] Label 컴포넌트 구현 (#61) * feat(packages/ui): Label 컴포넌트 구현 * chore(packages/ui): Label 컴포넌트 예시 * [Feat] Button 컴포넌트 추가 (#59) * feat(packages/ui): Button 컴포넌트 * fix(packages/ui): Icon color 속성 없을 시 currentColor 적용되도록 수정 * chore(packages/ui): Button 컴포넌트 export * fix(packages/ui): Button 컴포넌트 스타일 * fix(packages/ui): Icon default size 100%로 변경 * fix(packages/ui): Button 컴포넌트의 leftIcon, rightIcon prop을 leftAddon, rightAddon으로 수정 * feat(packages/ui): twincle icon 추가 * fix(packages/ui): 기존 태그의 prop을 상속 받는 경우 ComponentPropsWithoutRef 사용하도록 수정 * [Feat] Breadcrumb 컴포넌트 추가 (#62) * chore(packages/ui): @radix-ui/react-slot 설치 * feat(packages/ui): Breadcrumb 컴포넌트 구현 * test(apps/web): 사용 예시 추가 * [Feat] px -> rem 변환 (#64) * fix: px 단위 rem으로 변환 * fix: body font-size 1.6rem으로 지정 * [Chore] Checkbox 컴포넌트의 label fontSize 변환 (#66) * chore(packages/ui): Checkbox 컴포넌트의 label fontSize 변환 * chore(packages/ui): className 빈 값 string 기본값 지정 * [Feat] LottieAnimation 컴포넌트 추가 (#63) * feat(packages/ui): 로티 파일, 생성 스크립트 추가 * feat(packages/ui): LottieAnimation 컴포넌트 추가 * fix(packages/ui): LottieAnimation 따로 export 하도록 수정, 에셋 상대경로로 수정 * fix(packages/ui): 스크립트 오타 수정 * feat(packages/ui): 코드리뷰 반영 * fix: 빌드 에러 수정 * [Feat] TextField 컴포넌트 구현 (#65) * chore(apps/web): react-hook-form 설치 * feat(packages/ui): isNill 함수 추가 * chore(packages/ui): isNill export * feat(packages/ui): TextField 컴포넌트 구현 * test(apps/web): 예시 추가 * fix(packages/ui): 디자인 요구사항 수정 * [Feat] 아이콘, 색상 변경 사항 반영 (#72) * feat(packages/theme): 아이콘 변경 사항 반영 * fix(packages/ui): 누락된 아이콘 추가 * [Feat] IconButton 컴포넌트 (#68) * [Feat] Spinner 컴포넌트 추가 (#69) * feat(packages/ui): Spinner 컴포넌트 * feat(packages/ui): Spinner span 태그로 감싸기 * fix(packages/ui): SpinnerColorType 추가 * [�Fix]: ThemeProvider 패키지 이동, 불필요 배럴 파일 정리 (#74) * wip * chore(apps/web): 파일 구조 변경 * chore(packages/theme, apps/web): 배럴파일 정리 및 provider 별도 export * chore(packages/theme): provider 별도 export * fix(packages/theme, packages/ui): ThemeProvider 이동 * remove(apps/web): 퍼블리싱 삭제 (별도 PR 예정) * [Feat] RadioCards 컴포넌트 추가 (#73) * feat(packages/ui): RadioCards 관리를 위한 context 추가 * feat(packages/ui): RadioCards 컴포넌트 구현 및 JSDoc 추가 * feat(packages/ui): RadioCards 사용 예시 추가 * fix(packages/ui): RadioCards 구조 변경 * test(packages/ui): RadioCards 예시 변경 * docs(packages/ui): JSDoc 업데이트 * fix(packages/ui): 키보드 접근성 개선 * [Feat] Modal 컴포넌트 추가 (#83) * feat(packages/ui): PortalConsumer 컴포넌트 * feat(packages/ui): PortalConsumer 컴포넌트 * feat(packages/ui): Modal로의 포커스를 위한 FocusTrap 구현 * feat(packages/ui): Modal 컴포넌트 구현 및 JSDoc 작성 * test(apps/web): Modal 컴포넌트 사용 예시 추가 * fix(packages/ui): overlay-kit에서 이미 제공하고 있으므로 PortalConsumer 제거 * [Feat] 스켈레톤 컴포넌트 (#84) * feat(packages/ui): 스켈레톤 컴포넌트 * feat: displayName 속성 추가 * feat: 리뷰 반영 * [Fix] ui 패키지 컴포넌트 사용 시 모든 컴포넌트가 암묵적으로 import 되는 현상 (#79) * fix(packages/ui): 아이콘 생성 스크립트 확장자 변경 * feat(packages/ui) 컴포넌트 별 배럴 파일 생성 * fix: 공통 로직 임포트 경로 수정 * fix(packages/ui): esm 방식만 지원하도록 수정 * chore: 사용되지 않는 컴포넌트 제거 * chore: 사용되지 않는 아이콘 제거 * fix(packages/ui): 사용되지 않는 플러그인 제거 * fix: 빌드 에러 * fix: 빌드 에러 * fix: 빌드 에러 수정 * feat: svgr 라이브러리 제거, 아이콘 컴포넌트 생성 스크립트 추가 * fix: build error * fix: icon 매핑 스크립트 수정 * feat(packages/ui): 컴포넌트 전체 export 추가 * [Feat] Chip 컴포넌트 추가 (#70) * feat(packages/ui): chip 컴포넌트 * [Feat] TextField 컴포넌트 구현 (#65) * chore(apps/web): react-hook-form 설치 * feat(packages/ui): isNill 함수 추가 * chore(packages/ui): isNill export * feat(packages/ui): TextField 컴포넌트 구현 * test(apps/web): 예시 추가 * fix(packages/ui): 디자인 요구사항 수정 * [Feat] 아이콘, 색상 변경 사항 반영 (#72) * feat(packages/theme): 아이콘 변경 사항 반영 * fix(packages/ui): 누락된 아이콘 추가 * feat(packages/ui): chip 컴포넌트 * feat(packages/ui): Chip에 사용되는 아이콘 추가 * fix(packages/ui): Text 컴포넌트 color prop 없을 때 inherit으로 지정, 기본 line height 값 지정 * fix(packages/ui): Icon 컴포넌트 color 상속 시 path 태그 외의 다른 태그들도 상속 받을 수 있도록 수정 * fix(packages/ui): Chip 컴포넌트 스타일 수정 * feat: x 아이콘 color 수정 * feat: onClose 추가 * fix: x 아이콘 호버링 시 cursor pointer로 지정 * feat: 리뷰 반영 * fix(packages/ui): closable 버튼 보이지 않는 문제 * fix: 리뷰 반영 --------- Co-authored-by: MINSEONG KIM <[email protected]> * [Refactor] Spinner 컴포넌트 css 방식으로 변경 (#92) * fix:(packages/ui): Spinner 컴포넌트 css 방식으로 구현 * fix(packages/ui): Button 컴포넌트 스타일 수정, isLoading 상태 스피너 추가 * [Feat] useToast 추가, DynamicLottie 컴포넌트 추가 (#89) * [Feat]: useModal 추가 (#91) * chore(packages/ui): overlay-kit 설치 * feat(packages/ui): useModal 추가 * test(apps/web): useModal 사용 예시 추가 * fix(packages/ui): 옵셔널로 치환 * fix(packages/ui): 자잘한 수정 * fix(packages/ui): 자잘한 수정 * docs(packages/ui): JSDoc 추가 * test(apps/web): 사용 예시 추가 * chore(packages/ui): 코드 간소화 * fix(packages/ui): 프로미스를 반환할 수 있도록 수정 * fix(packages/ui): isNil수정, isNotNill 추가, export 수정 * fix(package/ui): nullish 체크 * fix(packages/ui): 모달 doubleCTA의 각각 버튼 공간이 절반 차지하도록 수정 * test(packages/ui): 예시 수정 * chore: lock 파일 업데이트 * [Feat] ImageManager TypeA 컴포넌트 추가 (#94) * chore(apps/web): Provider -> provider로 변경 (네이밍 컨벤션 통일) * feat(apps/web): ImageManager TypeA 컴포넌트 구현 * chore(apps/web): 대소문자 git 이슈 해결 * chore(apps/web): baseUrl 설정 * fix(apps/web): 자잘한 수정, 접근성 개선 * chore(apps/web): 키 상수화 * fix(apps/web): 유효성 검사 수정 * chore(apps/web): 경로 수정 * [Feat] 주제 설정 페이지 퍼블리싱 및 폼 연동 (#95) * chore(apps/web): motion 추가 * chore(packages/ui): styles export 변경 * feat(packages/theme): 색상 추가 * feat(packages/theme): spacing 추가 * feat(apps/web): KeywordChip 컴포넌트 추가 * feat(apps/web): ImageManager 컴포넌트 추가 * feat(apps/web): 주제 설정 페이지 퍼블리싱 * refactor(apps/web): 컴포넌트 분리 및 자잘한 수정 * fix(apps/web): react-hook-form watch를 통한 조건부 렌더링 * feat(apps/web): react-hook-form을 통한 폼 관리 * fix(apps/web): ImageManager 컴포넌트 packages/ui로 이동 예정 * fix(apps/web): ImageManager TypeA css 수정 * fix(apps/web): GradientAnimatedTitle로 수정 * fix(apps/web): GradientAnimatedTitle로 수정 * feat(apps/web): isEmptyStringOrNil 유틸 추가 * fix(apps/web): ImageManager TypeA 제어형으로 사용 가능하도록 변경 * refactor(apps/web): 컴포넌트 분리 * chore(apps/web): px->rem 변경 * fix(app/web): defaultValues 수정 * fix(apps/web): css 수정 * fix(apps/web): placeholder 수정 * [Feat] ky, tanstack-query 설정, presigned-url 모듈, 뉴스 카테고리 api 연동 (#97) * fix(packages/ui): onClick 누락 수정 * fix(packages/ui): onClick 누락 수정 * feat(apps/web): 필수 항목 입력 후 홈 BreadCrumb 클릭 시 모달 * feat(apps/web): tanstack-query 셋팅 * fix(apps/web): tanstack-query 셋팅 수정 * feat(apps/web): ky 셋팅 * fix(apps/web): KeywordChipGroup 컴포넌트 수정 * feat(apps/web): 뉴스 카테고리 api 연듕 * feat(apps/web): put, patch, delete 추가 * feat(apps/web): put, patch, delete 추가 * fix(apps/web): nullish 검증 * chore(.github/workflows): env 추가 * fix(apps/web): staleTime, gcTime 수정 * fix(apps/web): 자잘한 수정 * fix(apps/web): 토큰 string으로 관리 * chore(apps/web): shared로 폴더명 변경 * feat(apps/web): presigned-url 모듈 구현 및 연동 * [Feat] 주제 설정 페이지 api 연동, 디자인 추가 반영 (#100) * fix(apps/web): MainBreadcrumbItem 이미지 수정 * fix(apps/web): suspense 래핑 * remove(apps/web): 불필요 코드 제거 * feat(apps/web): 스크롤 감지 훅 추가 * feat(apps/web): 반투명 NavBar 추가 * fix(apps/web): 스타일링 수정 * fix(apps/web): 스타일링 수정 * fix(apps/web): ImageManager TypeA가 File이 아닌 이미지의 url로 받도록 수정 * feat(apps/web): 공통 타입 분리 * feat(apps/web): 게시물 그룹 및 게시물 생성 API 연동 * feat(apps/web): ImageManager TypeA 최적화 및 UI만 그리도록 관심사 분리 * fix: Images 폴더명을 images로 수정 * fix(apps/web): 자잘한 수정 * fix(apps/web): 자잘한 수정 * fix(apps/web): 타입 개선 * fix(apps/web): ImageManager 단일로 관리 * [Feat] Accordion 컴포넌트 (#99) * fix(packages/ui): Chip 컴포넌트 개별 export * feat(packages/ui): Accordion 컴포넌트 * chore: Accordion 컴포넌트 예시 추가 * chore(packages/ui): displayName 추가 * fix: 코드리뷰 반영 * fix: resolve conflicts * [Fix] 컴포넌트 스타일 수정 (#102) * fix: 폴더명 Images를 images로 변경 * fix(apps/web): 간단한 레이아웃 수정 * fix(apps/web): NavBar 레이아웃 수정 * fix(packages/ui, apps/web): TextField 레이아웃 깨짐 수정 * fix(packages/ui): Checkbox width 수정 * docs(packages/ui): TextField JSDoc 수정 * [Feat] 결과 수정 - 상세 페이지 퍼블리싱 (#86) * feat(apps/web): ContentItem 컴포넌트 * feat(apps/web): getMinutesAgo 유틸 함수 추가 * feat(apps/web): ContentItem 컴포넌트 * fix(packages/ui): Chip 컴포넌트 개별 export * feat(packages/ui): Accordion 컴포넌트 * chore: Accordion 컴포넌트 예시 추가 * feat(apps/web): EditSidebar 추가 * feat(packages/ui): 아이콘 에셋 추가 * fix(apps/web): getMinutesAgo 함수 getTimesAgo 함수로 수정 * fix(packages/ui): IconButton 컴포넌트 props에서 type도 받도록 수정 * fix(apps/web): ContentItem 컴포넌트 디자인 수정 반영 * feat(apps/web): PostEditor 추가 * feat(apps/web): EditPromptField 추가 * feat(apps/web) EditPost 영역 추가 * feat(apps/web): ContentItem 컴포넌트 * chore: Accordion 컴포넌트 예시 추가 * fix: resolve conflicts * fix: resolve conflicts * fix: 빌드 에러 * fix: 빌드 에러 * fix(apps/web): TextField 수정 반영 * fix(packages/ui): Accordion 컴포넌트 스타일 수정 * [Feat] vercel 자동 배포 빌드 스크립트 (#105) --------- Co-authored-by: MINSEONG KIM <[email protected]> Co-authored-by: minseong <[email protected]>
관련 이슈
#39
변경 사항
TextField 컴포넌트를 컴파운드하게 제공할 수 있도록 했어요. 제어 컴포넌트, 비제어 컴포넌트로 모두 활용 가능하고, 에러 상태를 context를 통해 관리할 수 있도록 설계했어요.
TextField.Label의 경우는 기존 Label 컴포넌트를 재활용했어요. TextField.Submit의 경우는 추후 IconButton이 만들어지면 교체할 예정이에요.
스크롤 및 디자인 변경사항
레퍼런스
Summary by CodeRabbit
Summary by CodeRabbit
새로운 기능
react-hook-form
라이브러리 추가TextField
컴포넌트 도입isNil
추가로 null/undefined 체크 기능 강화버그 수정
문서화
유틸리티
mergeRefs
함수의 경로 수정