Repository navigation
ProfileTab의 View 구성 요소와 렌더링 입력을 분리한다 - #945
Merged
Merged
Conversation
This file contains hidden or 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
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.
🔗 연관된 이슈
🎯 의도
계산 프로퍼티로 구성한 내부 View는 그 안에서 읽은 상태가 바뀌면 부모 View의 body 전체가 다시 평가되는 구조
상태 변화로 재평가가 필요한 영역만 별도 View로 분리하고, 해당 상태를 부모가 아닌 분리한 View의 body에서 읽도록 구성하여 부모 body의 재평가 범위를 줄이는 것
📝 작업 내용
📌 요약
ProfileView,AccountView에서 상태를 읽는 영역을 같은 파일의 private View로 분리🔍 상세
ProfileViewGoalSummaryCard에 넘기던 목표 상태 입력(developmentGoals,isDevelopmentGoalsLoading,hasDevelopmentGoalsLoaded,hasDevelopmentGoalsLoadFailure)을store를 전달받는 private View로 분리ProfileGoalSummary: 목표 상태를 읽어GoalSummaryCard에 값으로 전달하고 재시도send를 연결UserInfoCard,ActivityCard,RecentActivityCard,QuarterPickerSheet는 이미store를 받아 자체 body에서 상태를 읽고 있어 변경 없음titleBar와destinationView, 시트·알림·오버레이 등 프레젠테이션 modifier는 부모에 유지GoalSummaryCard는 반복 항목이 아닌 값 입력 카드로 기존 시그니처 유지AccountViewstore를 전달받는 private View로 분리AccountCurrentSection:currentProviderAccountSocialSection:currentProvider,connectedProviders,isLoading,activeLoadingProvider,presentationContextProviderRow,ProviderIdentity는 반복 항목이므로 기존대로 값만 전달alert로 한정topBar,onAppear,WindowSceneIdentifierReader는 부모에 유지📸 영상 / 이미지 (Optional)
Instruments 측정 (View Body)
View Body (Legacy), 변경 전후 각 5회 교차 측정 후 중앙값 비교, 괄호는 5회 측정 범위프로필↔오늘탭 전환 10회(1초 간격)계정 연동진입 후 복귀 10회계정 화면 (설정 → 계정 연동 진입·복귀 10회)
AccountViewAccountCurrentSectionAccountSocialSectionProviderRowAccountView는 진입·복귀 1회당 body 평가가 3회에서 2회로 감소프로필 탭 (
프로필↔오늘탭 전환 10회)ProfileViewGoalSummaryCardProfileGoalSummaryGoalSummaryCard+ProfileGoalSummary)ProfileViewbody 평가 횟수는 동일하며 시간 차이는 측정 범위가 거의 맞닿아 개선으로 보지 않음isSelected, 시트 상태를 계속 읽는 구조GoalSummaryCard재평가 횟수가 66회에서 24회로 감소