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

Feature/home article modal #8

Merged
merged 37 commits into from
Jan 10, 2022
Merged

Conversation

kimyoungyin
Copy link
Collaborator

@kimyoungyin kimyoungyin commented Nov 11, 2021

모달 레이아웃 작업

home 브랜치에서 모달 쪽 기능을 구현하기 위해 분기된 브랜치입니다.
아래 이슈의 todo를 기반으로 구현 중인데, 모달 안에 모달 같은 추가 모달이 계속 나와서 좀 애를 먹고 있습니다.

ModalCard

modalType: "positioned | withBackDrop으로 두 가지 모달 wrapper를 모두 포함한 UI를 만들었습니다.

  • "positioned" 모달은 getBoundingClientRect() 메서드로 현재 위치를 prop으로 전해주면 이를 기반으로 모달의 위치를 결정합니다.
  • "withBackDrop" 모달은 뒤에 검은색 backDrop이 있는 모달로 내부는 width 400px의 Card UI이가 중앙에 위치하고 있습니ㅏㄷ.
  • ReactDOM.createPortal로 다른 root에 뜨도록 하였습니다.
  • 아래 모달들은 이 컴포넌트 wrapper로 하고 있습니다.

HoverModal("positioned")

username에 hover(mouseEnter)했을 때 나오는 유저의 요약본이 담긴 모달입니다.

FollowingModal("withBackDrop")

팔로잉을 취소할지 말지 고르는 모달입니다

ArticleMenuModal("withBackDrop")

... 클릭 시 나오는 전반적인 article 관련 메뉴 입니다.

분기 전 branch: home

이 브랜치는 home의 코드를 포함하고 있습니다. home에서는 전체적인 레이아웃을 대략 구현해놓고, 이 브랜치처럼 하나씩 하나씩 기능을 구현해 머지해나갈 생각입니다.
#7
#9

@kimyoungyin kimyoungyin linked an issue Nov 11, 2021 that may be closed by this pull request
6 tasks
@kimyoungyin kimyoungyin merged commit a2b51d9 into feature/home Jan 10, 2022
@kimyoungyin kimyoungyin deleted the feature/home-articleModal branch August 29, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

article 내부 모달
1 participant