-
Notifications
You must be signed in to change notification settings - Fork 6
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
[FE] 방 비교 페이지 옵션 모달 추가 및 카테고리 점수 리스트 기능을 수정한다. #187
Conversation
frontend/src/assets/icons/delete.svg
Outdated
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.
이건 그냥질문인데 삭제하신 이유가있을까요?
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.
close 아이콘이 두개나 존재해서 하나로 동일했습니다.
통일 과정에서 불분명한 이름인 XIcon 을 삭제했습니다.
기존 있던 아이콘이 CloseIcon
삭제한 아이콘이 XIcon
입니다.
export const checklistList = { | ||
checklists: [ | ||
{ | ||
checklistId: 1, | ||
roomName: '스튜디오 아파트', |
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.
interface 타입이 바뀜에 따른 업데이트인가요?
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.
api 전달 값을 반영한 업데이트입니다.
case 'center': | ||
return css({ | ||
top: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
borderRadius: '8px', | ||
width: '100%', | ||
maxWidth: '85%', | ||
}); | ||
case 'bottom': | ||
return css({ | ||
bottom: '0px', | ||
transform: 'translate(-50%, 0%)', | ||
borderRadius: '16px 16px 0px 0px', | ||
width: '100%', | ||
boxSizing: 'border-box', | ||
}); | ||
} |
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.
저의 이해로는 여기선 css``로 사용할수있을거같은데 {}를 사용하신 이유가있으실까요?
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.
함수와 switch-case를 이용해서 매핑하기보단 객체를 이용해서 매핑할수있을까요?
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.
아 이전에 코드와 통일되게 사용할 수 있겠네요 일단 현재 리안이 수정 중이라 이후 리팩토링하도록 하겠습니다.
|
||
const isHightestRoom = count === 1 ? true : false; | ||
const [isModalOpen, setIsModalOpen] = useState(false); |
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.
잘 써주셨지만 이 모달 로직을 훅으로 뺼 수 있을 것 같다는 생각이 드네요! 다음에 재사용하기도 훨씬 편해질 것 같습니다:)
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.
모달 내부 로직을 리팩토링해봐야겠네요
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.
알겠습니다!
label={categoryName} | ||
isLabeled={isHightestRoom} | ||
item={ | ||
<FaceMark> |
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.
이 표시 컴포넌트는 하위 컴포넌트로 분리해도 좋을 것 같다는 생각이 들긴 하네요! 근데 이건 취향 차이라 참고만 해주세요!
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.
표시 컴포넌트가 의미하시는게 뭘까요? 표정 아이콘을 말씀하시는 걸까요?
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.
넵 그렇습니다! 사실 이미 합성 컴포넌트라서 잘 되어있긴 한데, 하나의 props에 태그가 여러개 들어간 게 어색해서 드린 말씀이었어요!
</S.CloseIcon> | ||
)} | ||
</S.ModalInner> | ||
{children} |
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.
모달 내부가 훨씬 깔끔해 졌어요!
top: '50%', | ||
transform: 'translate(-50%, -50%)', | ||
borderRadius: '8px', | ||
width: '100%', |
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.
bottom postion의 모달의 width 를 100% 로 고정시킨 것은 잘 하신 것 같아요! 근데 center 도 width 를 100% 로 한다면 모달의 다양한 사용을 막을 수도 있을 것 같아요.
저는 위와 같이 알림 모달도 사용하려면 px 이 정해져 있어야 한다고 생각해요. 사실 헤일리의 의도는 반응형을 고려한 것이라, 이해는 됩니다. 아마 더 구체적인 모달의 사이즈 조정이 필요한 것 같아요.
const modalSize = {
mobile: {
small: {
width: '90%',
maxWidth: '320px',
maxHeight: '80%'
},
large: {
width: '100%',
maxWidth: '400px',
maxHeight: '90%'
}
},
screen660: {
small: {
width: '80%',
maxWidth: '500px',
maxHeight: '70%'
},
large: {
width: '90%',
maxWidth: '600px',
maxHeight: '80%'
}
}
};
위와 같이 모달의 크기를 조정하면 어떨까요? 위와 같은 코드를 짜면 다음과 같은 장점이 있습니다.
- width 이 반응형으로 잘 늘어남.
- max-height 만 준다면 해당 콘텐츠의 길이만 차지하게 됨.
- 모바일과 데스크톱의 사이즈를 분리하므로서 어느 화면에서도 어색하지 않음.
(참고 모바일은 일반적으로 360px ~ 480px 의 너비를 가진다고 하네요!)
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.
사실상 maxWidth
가 maxWidth: '85%',
으로 해당 페이지의 85프로만 사이즈를 가지고 있을거 같네요.
알림 모달 사용을 위해 더 작은 width 의 모달이 필요하신걸까요?
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.
이 부분은 제가 착각했네요!
const url = new URL(request.url); | ||
const roomIds = url.searchParams.getAll('id'); | ||
|
||
if (!roomIds[2]) return HttpResponse.json(twoRoomsForCompare, { status: 200 }); |
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.
오 세부적인 handler 작성 좋아요!!
개인적으로 옵션 모달은 botttom 보다 center 가 적합하다고 생각해요! 물론 사이즈 조정이 된다는 가정하에요! 그전에는 그리드를 사용했었습니다. 하지만 헤일리 의견대로 한다면 (bottom일 떄 100%) 데스크톱일 떄 css 의 완성도가 떨어집니다. 그냥 flex로 하면 위와 같이 되서, 반응형으로 600일떄와 모바일일 때 grid를 다르게 적용시켜야 하는데, 저는 사실 이것이 조금 불필요하다고 생각해요. 만약 center 로 한다면 다음과 같은 이점이있다고 생각합니다 .
헤일리의 의견은 어떠신가요? |
이전에 구두로 전달해드린 것과 같이 모바일 뷰일 때 그리드를 다르게 적용시킬 필요가 없어서 전달 드렸습니다~
이건 조금 더 고민해볼 필요가 있는거 같네요. |
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.
approve합니다
❗ Issue
✨ 구현한 기능
++ 모달 컴포넌트도 센터 포지션일 때 패딩이 없는 것, 최대 사이즈가 355이었던 것들 모두 수정했습니다.
📢 논의하고 싶은 내용
🎸 기타