[TNT-214] TrainerAddPTSession 관련 신규 디자인 컴포넌트 추가 #59
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.
📌 What is the PR?
🪄 Changes
🌐 Common Changes
🔥 PR Point
지금 코드 상으로도 제대로 기능하는 것을 확인했습니다.
커스텀 타임피커를 만들게 된 이유는.. ㅠ
타임 피커의 pick UI 표시 방식은 아래와 같습니다.
2.1 - 각 FlatPickerColumn의 행에 GeometryReader를 사용하여 row의 midY를 계산하고, RowPreferenceKey를 통해 상위 뷰로 전달합니다.
2.2 - PreferenceKey 업데이트를 기반으로 현재 스크롤 컨테이너의 중앙과 가장 가까운 행을 찾아 선택 상태를 업데이트하며, 0.2초의 debounce를 통해 스크롤이 멈춘 시점에 중앙에 스냅되도록 구현했습니다.
타임 피커의 입력값 설명은 다음과 같습니다.
selectedDate를 통해 가져온 Date를 TTimePicker는 시간, 분, 오전/오후를 각각 FlatPickerColumn으로 표현하며, minuteStep를통해 1분, 5분, 10분 등 분단위를 지정 가능합니다.
사용법은 다음과 같습니다
📸 Screenshot
🙆🏻 To Reviewers
💭 Related Issues