-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT] 타이머, 타임박스 API 연동 (재생/연장/완료/종료) #184
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
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
a806556
feat(web): 타이머 정지 API를 연동한다 (#162)
jjangminii a729882
feat(web): 홈/사이드바 타이머 API를 연동한다 (#162)
jjangminii 5fb6a9e
fix(web): 타이머 완료/중지 판정 기준을 시간 소진 여부로 수정한다 (#162)
jjangminii 6989e1a
refactor(web): 활성 타이머 폴링을 클라이언트 카운트다운으로 대체한다 (#162)
jjangminii 687269e
fix(web): 포커스 태스크 아이템의 시간 배지가 연장분을 반영하지 않던 문제를 수정한다 (#162)
jjangminii b6cbf99
feat(web): 시간 소진 시 종료 모달 자동 표시 및 연장 구간 오버타임 링을 연동한다 (#162)
jjangminii 6a19c33
refactor(web): FocusSessionContainer의 로직을 use-focus-session 훅으로 분리한다 …
jjangminii 967b55f
feat(web): 새로고침·페이지 이동 후에도 오버타임 링 상태를 유지한다 (#162)
jjangminii d2f65c2
fix(web): 타이머 mutation 성공 시 홈 뷰 쿼리도 함께 무효화한다 (#162)
jjangminii a228e4f
refactor(web): 타이머 plannedLabel 표시 형식을 분 단위로 단순화한다 (#162)
jjangminii 3c8366d
fix(ui): z-index 토큰 이름을 --z-index-* 컨벤션에 맞게 수정한다 (#162)
jjangminii ddbb03c
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
jjangminii 909490e
fix(web): 홈 투두 카드의 재생 아이콘이 활성 타이머 상태를 반영하지 않던 문제를 수정한다 (#162)
jjangminii 1379f3b
fix(web): 타이머 시간 표시에서 1분 미만 초를 내림 대신 올림 처리한다 (#162)
jjangminii 6059533
fix(web): 시간 소진 시 타이머를 자동 일시정지하고 연장 시 재개한다 (#162)
jjangminii afcd505
fix(web): 타이머 링이 값이 몰아서 바뀔 때만 트랜지션 없이 스냅되게 한다 (#162)
jjangminii 4f6b827
fix(web): 타이머 정지 시 투두 완료 처리 API를 함께 호출한다 (#162)
jjangminii b508fa0
fix(web): 종료 버튼 클릭 시 모달 분기 기준을 재생 여부 대신 시간 소진 여부로 수정한다 (#162)
jjangminii 1ef1af2
fix(web): 홈에서 투두 순서 변경 시 포커스 페이지 쿼리도 무효화한다 (#162)
jjangminii 592a3e4
fix(web): 타이머 정지 성공 후에만 투두 완료 상태를 변경하도록 순서를 보장한다 (#162)
jjangminii 7da8e77
fix(web): 홈에서 투두/서브태스크 완료 처리 시 포커스 페이지 쿼리도 무효화한다 (#162)
jjangminii 425da74
feat(web): 홈 투두 카드 체크박스도 포커스 페이지와 동일하게 정지 확인 모달을 거치도록 한다 (#162)
jjangminii e3c01dc
feat(web): 다른 투두의 타이머가 실행 중일 때 재생을 막고 토스트로 안내한다 (#162)
jjangminii 786b8b2
refactor(web): 활성 타이머/홈 뷰 쿼리 무효화 로직을 useTimerQueryInvalidation 훅으로 공통…
jjangminii a829f7c
refactor(web): 타이머 액션 핸들러를 useTimerActions 훅으로 공통화한다 (#162)
jjangminii 2162b89
fix(web): Timer의 렌더 간격 비교용 ref 갱신을 렌더 이후로 옮긴다 (#162)
jjangminii ea5bf7e
refactor(web): 홈 뷰/포커스 쿼리 무효화 중복 호출을 invalidateHomeAndFocus로 묶는다 (#162)
jjangminii 75210bc
fix(web): 오버타임 연장 시 RESUME 성공 후에만 extendTimer를 호출하도록 순서를 보장한다 (#162)
jjangminii 1c440ff
fix(web): 오버타임 저장값 초기화를 하이드레이션 안전하게 하고 손상된 값을 방어한다 (#162)
jjangminii 1716114
feat(web): 타이머 아이콘을 투두가 선택한 IconGraphic으로 교체한다 (#162)
jjangminii d29ba5d
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
jjangminii 63453d4
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
jjangminii 2a02b18
feat(web): 포커스 투두 메모를 연동하고 icon 검증 크래시를 방지한다 (#162)
jjangminii 000bcf0
refactor(web): 홈 모달/토스트 UI 상태를 훅에서 컨테이너로 옮긴다 (#162)
jjangminii 7705fe5
fix(web): 계획 시간이 60분을 넘으면 시/분 형식으로 표시한다 (#162)
jjangminii 95c6e06
feat(web): 사이드바 타임박스 패널에 타임박스 API를 연동한다 (#162)
jjangminii 8cde952
feat(web): 타이머 조작과 투두 체크 시 타임박스 쿼리도 함께 무효화한다 (#162)
jjangminii eab4ad3
fix(web): 타임박스가 같은 timerId면 끊긴 구간도 진행 중으로 표시한다 (#162)
jjangminii b072d04
style(web): 타임박스 라벨 폰트를 11px로 줄이고 세로 중앙정렬로 바꾼다 (#162)
jjangminii 996f97e
style(web): 타임박스 패널 행 높이와 라벨 배치를 조정한다 (#162)
jjangminii 7c5a0bd
Update apps/timo-web/app/[locale]/(main)/(with-time-sidebar)/home/_co…
jjangminii 1de49a8
Update apps/timo-web/app/[locale]/(main)/focus/_hooks/use-focus-sessi…
jjangminii d21a381
refactor(web): 포커스 세션 UI 상태를 컨테이너로 옮긴다 (#162)
jjangminii 124cf57
refactor(web): 트리비얼 토스트 닫기 핸들러를 인라인한다 (#162)
jjangminii 36896d7
chore(web): 이름을 그대로 되풀이하는 불필요한 주석을 제거한다 (#162)
jjangminii 7fe278f
Merge branch 'feat/web/162-timer-api-integration' of https://github.c…
jjangminii 3ef3556
chore(web): 남은 주석을 마저 제거한다 (#162)
jjangminii 10d7c8c
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
jjangminii bb7737b
chore(web): 남은 주석을 마저 제거한다 (#162)
jjangminii bac9d73
rename(web): HomeStopCompleteModal을 HomeStopCompleteModalContainer로 이…
jjangminii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
60 changes: 60 additions & 0 deletions
60
.../(main)/(with-time-sidebar)/home/_containers/todo-card/HomeStopCompleteModalContainer.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| "use client"; | ||
|
|
||
| import { Modal } from "@repo/timo-design-system/ui"; | ||
| import { useEffect, useRef, useState } from "react"; | ||
|
|
||
| import { TimerCompleteModalPanel } from "@/components/timer/TimerCompleteModalPanel"; | ||
| import { TimerStopModalPanel } from "@/components/timer/TimerStopModalPanel"; | ||
|
|
||
| export interface HomeStopCompleteModalContainerProps { | ||
| pendingToken: number | null; | ||
| plannedMinutes: number; | ||
| actualMinutes: number; | ||
| feedbackText?: string; | ||
| onConfirm: () => void; | ||
| } | ||
|
|
||
| export const HomeStopCompleteModalContainer = ({ | ||
| pendingToken, | ||
| plannedMinutes, | ||
| actualMinutes, | ||
| feedbackText, | ||
| onConfirm, | ||
| }: HomeStopCompleteModalContainerProps) => { | ||
| const [step, setStep] = useState<"stop" | "complete">("stop"); | ||
| const hiddenTriggerRef = useRef<HTMLButtonElement>(null); | ||
|
|
||
| useEffect(() => { | ||
| if (pendingToken === null) return; | ||
|
|
||
| setStep("stop"); | ||
| hiddenTriggerRef.current?.click(); | ||
| }, [pendingToken]); | ||
|
|
||
| return ( | ||
| <Modal> | ||
| <Modal.Trigger | ||
| ref={hiddenTriggerRef} | ||
| className="hidden" | ||
| aria-hidden="true" | ||
| tabIndex={-1} | ||
| /> | ||
| <Modal.Overlay /> | ||
| <Modal.Panel> | ||
| {step === "stop" ? ( | ||
| <TimerStopModalPanel | ||
| minutes={actualMinutes} | ||
| onSwitch={() => setStep("complete")} | ||
| /> | ||
| ) : ( | ||
| <TimerCompleteModalPanel | ||
| plannedMinutes={plannedMinutes} | ||
| actualMinutes={actualMinutes} | ||
| feedbackText={feedbackText} | ||
| onComplete={onConfirm} | ||
| /> | ||
| )} | ||
| </Modal.Panel> | ||
| </Modal> | ||
| ); | ||
| }; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.