Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apps/web/src/screens/my-changes/ChangeDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
groupByIssue,
isNewStandard,
needsRework,
RETURNED_TO_SEEN_TEXT,
sameStandardVersions,
} from './format.ts';

Expand Down Expand Up @@ -130,13 +131,14 @@ export function ChangeDetail(props: {
>
<Text typography="t6" fontWeight="bold" color={C.grey800}>
{replacingVersion === null
? '새 버전으로 대체됐어요'
? RETURNED_TO_SEEN_TEXT
: `새 버전(v${replacingVersion})으로 대체됐어요`}
</Text>
<div style={{ marginTop: 4 }}>
<Text typography="t7" color={C.grey600}>
답하기 전에 결정이 또 바뀌었어요. 이 변경에는 답하지 않아도 되고,
새 버전을 확인해주세요.
{replacingVersion === null
? '이 변경에는 답하지 않아도 돼요.'
: '답하기 전에 결정이 또 바뀌었어요. 이 변경에는 답하지 않아도 되고, 새 버전을 확인해주세요.'}
</Text>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/screens/my-changes/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ describe('카드 표시', () => {
expect(findReplacingVersion(superseded, changes)).toBe(3);
expect(findReplacingVersion(superseded, [superseded])).toBeNull();
expect(supersededText(3)).toBe('새 버전 v3으로 대체됐어요');
expect(supersededText(null)).toBe('새 버전으로 대체됐어요');
expect(supersededText(null)).toBe(
'새 버전으로 대체됐다가, 내가 이미 확인한 값으로 돌아왔어요. 답하지 않아도 돼요',
);
});
});

Expand Down
9 changes: 8 additions & 1 deletion apps/web/src/screens/my-changes/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,16 @@ export function findReplacingVersion(
return higher.length > 0 ? Math.min(...higher) : null;
}

/**
* 대체한 버전이 목록에 없으면 그 버전이 자동으로 닫힌 거예요. 내가 이미 확인한 값으로 되돌려져서
* 새 확인할 변경이 생기지 않았고, 자동 닫힘은 화면에 보이지 않아요 (notify.pending.last-seen-order, notify.pending.hide-auto-closed)
*/
export const RETURNED_TO_SEEN_TEXT =
'새 버전으로 대체됐다가, 내가 이미 확인한 값으로 돌아왔어요';

export function supersededText(version: number | null): string {
return version === null
? '새 버전으로 대체됐어요'
? `${RETURNED_TO_SEEN_TEXT}. 답하지 않아도 돼요`
: `새 버전 v${version}으로 대체됐어요`;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/타입명세서.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ try {

- **내 이름(`me`)**: 주소에 `?me=<이름>`을 붙여 열면 브라우저에 저장하고 주소에서 지워요. 다음부터는 저장한 이름을 써요. 이름을 고르는 화면은 만들지 않아요 (10/15 호윤, `apps/web/src/me.ts`). 예시 데이터로 열면 이름이 없어도 예시를 받는 사람(`INBOX_RECIPIENT`)으로 열려요.
- **예시 데이터**: `@sil/core`의 `inboxIssues`, `inboxVersions`, `inboxPendingChecks`, `inboxAnswers`예요. 화면의 상태(사람이 바꾼 결정 사항, PR에서 찾음, 새 결정 사항, 대체됨, 되돌림, 답함)를 모두 담았어요.
- **대체한 버전 번호**: 서버가 알려 주지 않아서 같은 목록에서 같은 결정 사항·같은 이슈의 더 높은 버전 중 가장 가까운 것을 찾아요. 못 찾으면 번호 없이 "새 버전으로 대체됐어요".
- **대체한 버전 번호**: 서버가 알려 주지 않아서 같은 목록에서 같은 결정 사항·같은 이슈의 더 높은 버전 중 가장 가까운 것을 찾아요. 못 찾으면 대체한 버전이 자동으로 닫힌 것이라(내가 이미 확인한 값으로 되돌려짐) "새 버전으로 대체됐다가, 내가 이미 확인한 값으로 돌아왔어요"라고 써요.
- **OS 알림(A1)**: 창이 열려 있는 동안 구독으로 목록을 다시 읽고, 처음 불러온 뒤 새로 생긴 대기 변경만 `showChangeNotification`으로 띄워요. 제목은 40자 이하로 줄여요 (app.notify.title-length).

### 11-6. 아직 남은 것
Expand Down
Loading