-
Notifications
You must be signed in to change notification settings - Fork 1
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
✨ 웹뷰 iPhone 뷰포트 설정 #41
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
기존에 사용하고 있었던 react-infinite-scroller 라이브러리가 해당 웹뷰 뷰포트 세팅과 호환되지 않아서 라이브러리를 변경
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Legitgoons
approved these changes
May 9, 2024
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.
수고 많으셨습니다. 실제 레이아웃과 비슷한 형태라 소통과 개발에 큰 도움이 될 것 같네요. 병합하셔도 좋습니다!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업 이유
작업 사항
1️⃣ iPhone 추가
1. iPhone
iPhone은 웹 기준으로 width값이 1440px 이상일 때만 다음과 같이 렌더링 되게 됩니다.
실제와 동일한 환경을 구성하기 위해, 위에 Status 바 이미지를 추가하였습니다.
(참고) 👍 저는 폰트 크기 67%일 때가 가장 적합한 iPhone 뷰포트 환경이였어요~
2. 🚨 주의할 점
해당 PR의 경우 프로젝트를 원활한 프로젝트 진행을 위한 기능 구현입니다. 그렇기 때문에 실제 PROD 모드에서는 iPhone Layout이 렌더링되지 않도록 해야 합니다.
하지만 실제 릴리즈 이전까지는 Amplify 및 https://wv.dev.pennyway.co.kr/ 에서도 해당 레이아웃을 확인할 수 있도록 하는 것이 좋다고 생각하여 PROD 모드에서도 iPhone이 표시되도록 하겠습니다.
2️⃣ 라이브러리 수정 (
react-infinite-scroller
->react-intersection-observer
)기존에 FeedMainList 컴포넌트에서 사용하고 있었던 react-infinite-scroller 라이브러리의 경우, 무한스크롤을 document를 기반으로 진행하고 있어 iPhone 뷰포트 환경에서 작동이 어려운 부분이 있었습니다.
하지만 iPhone 뷰포트 환경 설정을 위한 작업이다 보니, 실제 PROD 모드에는 반영되지 않는 부분이였기에 다음과 같은 점을 고민하였습니다.
1. 번들 사이즈 비교
2. 구현 난이도
기존의 react-infinite-scroller와 비교하여 react-intersection-observer 또한 무한 스크롤을 구현하기 위해 유사한 개념을 활용하고 있다고 생각하였기에, 구현 난이도는 높지 않다고 생각하였습니다.
리뷰어가 중점적으로 확인해야 하는 부분
발견한 이슈
라이브러리 교체로 인해, Intersection Observer를 이용하게 되면서 테스트 코드를 수정하였습니다.
vi.fn()
)