feat: 문제 탭 하단 타이머 바 + 상태바 남은 시간 표시 (#16)#17
Merged
Conversation
카운트다운 상태를 CountdownPanel private 필드에서 TimerService(프로젝트 서비스)로 추출하고 세 UI가 공유: - 타이머 탭: 기존 UI 유지, 상태는 서비스에 위임. 버튼 라벨(시작/재개)· 필드 활성화를 서비스 상태에서 유도해 어디서 조작해도 일관되게 동기화 - 문제 탭 하단 타이머 바: 남은 시간 + 시작/일시정지·초기화 버튼. 문제를 보면서 시간 확인 가능 - 상태바 위젯: CTK 텍스트 옆에 남은 시간 표시. 초기 상태에서는 숨기고 실행 중이거나 중간에 멈춘/종료된 타이머만 표시 타이머는 33ms 간격으로 틱하므로 문제 탭 바와 상태바는 표시 문자열이 바뀔 때만 갱신하여 불필요한 리페인트 방지.
- 스톱워치 상태(경과 시간·실행 여부)도 TimerService로 추출하고 StopwatchPanel은 표시·랩 기록만 담당하도록 변경 - 문제 탭 하단 바를 왼쪽 타이머 그룹 + 오른쪽 스톱워치 그룹으로 확장, 각각 시작/일시정지·초기화 버튼 제공 - 바 상단에 남은 시간 비율을 보여주는 3px 프로그레스 바 추가 (int 0~1000 단위라 같은 값이면 setValue가 no-op이므로 별도 스로틀 불필요)
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.
Fixes #16
문제
타이머가 타이머 탭 안에만 있어서 문제 탭으로 전환하면 남은 시간을 볼 수 없음.
변경 사항
TimerService 신설 (프로젝트 서비스)
카운트다운 상태(남은 시간·총 시간·실행 여부)가
CountdownPanel의 private 필드에 갇혀 있어 다른 UI가 관찰할 수 없었음. 기존CodingTestKitActionService+ 상태바 구독 패턴을 따라 서비스로 추출하고 리스너 허브 역할을 부여.세 UI가 같은 타이머 공유
CTK: 플랫폼 #번호옆에⏱ 27:31형태로 남은 시간 표시. 초기 상태에서는 숨기고, 실행 중이거나 중간에 멈춘/종료된 타이머만 표시성능
타이머 틱이 33ms 간격(원형 타이머 애니메이션용)이므로, 문제 탭 바와 상태바는 표시 문자열이 바뀔 때만 갱신.
동작 보존
테스트
./gradlew compileKotlin test통과