-
Notifications
You must be signed in to change notification settings - Fork 0
유저 활동기록 문의하기 답변완료시 ui 수정 ( #issue 338 ) #342
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
Changes from all commits
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 | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||||||||||||||||||||
| import styled from 'styled-components'; | ||||||||||||||||||||||||||||||||
| import styled, { css } from 'styled-components'; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const Container = styled.div` | ||||||||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||||||||
|
|
@@ -25,6 +25,20 @@ export const InquiryState = styled.div` | |||||||||||||||||||||||||||||||
| text-align: center; | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const InquiryStateSpan = styled.span<{ $isCompletedAnswer: boolean }>` | ||||||||||||||||||||||||||||||||
| width: fit-content; | ||||||||||||||||||||||||||||||||
| color: ${({ $isCompletedAnswer, theme }) => | ||||||||||||||||||||||||||||||||
| $isCompletedAnswer ? theme.color.white : theme.color.green}; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ${({ $isCompletedAnswer }) => | ||||||||||||||||||||||||||||||||
| $isCompletedAnswer && | ||||||||||||||||||||||||||||||||
| css` | ||||||||||||||||||||||||||||||||
| background: ${({ theme }) => theme.color.navy}; | ||||||||||||||||||||||||||||||||
| border-radius: ${({ theme }) => theme.borderRadius.small}; | ||||||||||||||||||||||||||||||||
| padding: 0.2rem; | ||||||||||||||||||||||||||||||||
| `} | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const InquiryContentWrapper = styled.div` | ||||||||||||||||||||||||||||||||
| margin: 0.5rem 0; | ||||||||||||||||||||||||||||||||
| background: ${({ theme }) => theme.color.white}; | ||||||||||||||||||||||||||||||||
|
|
@@ -55,6 +69,30 @@ export const MessageWrapper = styled.div` | |||||||||||||||||||||||||||||||
| font-size: 0.8rem; | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const InquiryAnswerContentContainer = styled.div` | ||||||||||||||||||||||||||||||||
| margin-top: 1rem; | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const InquiryAnswerContentWrapper = styled.div` | ||||||||||||||||||||||||||||||||
| margin-top: 2rem; | ||||||||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||||||||
| gap: 0.5rem; | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const InquiryAnswerIconWrapper = styled.div` | ||||||||||||||||||||||||||||||||
| align-items: start; | ||||||||||||||||||||||||||||||||
| svg { | ||||||||||||||||||||||||||||||||
| width: 1rem; | ||||||||||||||||||||||||||||||||
| height: 1rem; | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
Comment on lines
+82
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. display: flex 속성을 추가해야 합니다.
다음 diff를 적용하여 수정하세요: export const InquiryAnswerIconWrapper = styled.div`
+ display: flex;
align-items: start;
svg {
width: 1rem;
height: 1rem;
}
`;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 부모에 이미 있잖아 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain@YouD0313 부모 컨테이너에 부모의 실제 사용 방식을 확인해보겠습니다. 🏁 Script executed: Length of output: 801 @YouD0313 맞습니다! 다시 확인해보니 이 경우 제 이전 제안이 틀렸습니다. 죄송합니다! 🐰💭 ✏️ Learnings added
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const InquiryAnswerContent = styled.div` | ||||||||||||||||||||||||||||||||
| font-weight: 400; | ||||||||||||||||||||||||||||||||
| font-size: 1.1rem; | ||||||||||||||||||||||||||||||||
| white-space: pre-line; | ||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| export const ModalImgContainer = styled.div` | ||||||||||||||||||||||||||||||||
| position: fixed; | ||||||||||||||||||||||||||||||||
| top: 0; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
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
텍스트에어리어 높이 자동 조절 로직을 개선하세요.
자동 높이 조절 기능은 좋지만 몇 가지 개선이 필요합니다:
handleChangeAnswer함수와 코드 중복이 있습니다다음과 같이 수정하세요:
useEffect(() => { - if (inputRef && inputRef.current) { + if (inputRef.current) { inputRef.current.style.height = 'auto'; inputRef.current.style.height = `${inputRef.current.scrollHeight}px`; } }, [answer]);그리고 높이 조절 로직을 별도 함수로 분리하여 중복을 제거하는 것을 권장합니다:
🧰 Tools
🪛 Biome (1.9.4)
[error] 49-49: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
🤖 Prompt for AI Agents