Skip to content
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] 프로필 모달창 구현 #44

Merged
merged 2 commits into from
Jan 19, 2025
Merged

Conversation

ahnsui
Copy link
Member

@ahnsui ahnsui commented Jan 19, 2025

🔥 Issues

#19

✅ What to do

  • 프로필 모달창 구현

📄 Description

image

학생 아이콘을 누르면 모달창이 나온다.
바깥부분을 누르면 모달창이 꺼지고 바깥 부분의 다른 기능은 사용할 수 없다.

🤔 Considerations

  1. 모달창 css 구현 고민
    -> fixed, absolute를 사용.
    -> inset-0으로 top, right, bottom, left를 모두 0으로 설정하여 배경이 화면 전체를 차지하도록 함.
    -> z-50로 모달이 다른 UI 요소보다 위에 표시되도록 함

  2. 바깥 부분을 누르면 모달창이 종료되도록 하였는데 모달 내부를 눌렀을 때도 종료가 된다.
    -> e.stopPropagation()를 이용하여 이벤트가 상위 DOM으로 전파되지 않도록 막는다.

🛠️ Improvements to Make

API 받아오는 부분 수정해야 할 것 같다.
디자인 완성되면 UI 수정해야 한다.

👀 References

https://bolob.tistory.com/entry/JavaScript-epreventDefault%EC%99%80-estopPropagation%EC%9D%98-%EC%B0%A8%EC%9D%B4%EC%A0%90

https://joylee-developer.tistory.com/184

@ahnsui ahnsui requested a review from yongaricode as a code owner January 19, 2025 16:57
@ahnsui ahnsui merged commit c1719ab into develop Jan 19, 2025
@yongaricode
Copy link
Member

바깥 누르면 모달창 닫히는 것 좋은 것 같습니다~ 수고하셨습니다!

onClick={() => setModalOpen(false)} // 닫힘
>
<div
className="absolute top-10 flex flex-col py-5 w-1/3 h-3/5 bg-primary_100 rounded-[16px]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w를 1/3로 주니까 모바일에서 화면 확인했을 때 이렇게 나오네요! min-width를 줘서 최소 크기를 정하는게 좋을 것 같습니다!
IMG_8094

@ahnsui ahnsui deleted the feature/#19-roomlist-edit branch January 23, 2025 13:45
@yongaricode yongaricode added the ✨ Feat 새로운 기능을 추가할 경우 label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feat 새로운 기능을 추가할 경우
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants