Figma 설명 프레임 반영 — 로그인·온보딩·스플래시 · HOME · GALAXY · 퀘스트·이클립스·알림

This commit is contained in:
Sn-Kinos
2026-10-06 03:03:20 +09:00
parent 64825e72b0
commit ecf5998725
77 changed files with 2703 additions and 640 deletions
+7
View File
@@ -309,6 +309,13 @@ service cloud.firestore {
// 타인 배지가 실제로 보이는 곳은 S-M-HERO 히어로 랭킹 하나뿐이고,
// 그것은 /fandoms/{f}/members/{uid}.honorBadgeIds 비정규화 필드로 읽는다(설계서 §2.3·§4.4).
// 랭킹 하나 보여주려고 타인 문서를 통째로 여는 경로를 닫는다.
// 성운 일 1회 기록(`fn-nebula-create` 가 쓴다). GALAXY 「성운 생성」 버튼이 오늘 이미 만들었는지
// 보고 비활성화 · 초과 안내를 띄운다(Figma `540:19592`). 쓰기는 서버만.
match /users/{uid}/nebulaCreates/{day} {
allow read: if isSelf(uid);
allow write: if false;
}
match /users/{uid}/badges/{badgeId} {
allow read: if isSelf(uid) || isViewer();
allow write: if false;
@@ -105,6 +105,9 @@ export const fnAdminWrite = onCall(async (req) => {
await ref.set({
...(patch as Record<string, unknown>),
// 처음 쓰는 문서에는 생성 시각을 남긴다 — 퀘스트 목록 *퀘스트 생성 최신순 소팅*(Figma `518:88395`)의
// 정렬 키. 예전 문서는 `updatedAt` 만 있어 수정할 때마다 순서가 바뀌었다.
...(before.exists ? {} : { createdAt: FieldValue.serverTimestamp() }),
updatedAt: FieldValue.serverTimestamp(),
}, { merge: true });
@@ -67,3 +67,13 @@ it('master 도 원장 · 지표 · 감사 기록과 서버 산출 필드는 못
expect(doc.get('fpiScore')).toBeUndefined();
await getFirestore().doc('fandoms/admin-write-test').delete();
});
// 퀘스트 목록 *퀘스트 생성 최신순*(Figma `518:88395`) — 처음 쓴 문서만 생성 시각을 받고, 수정은 그대로 둔다.
it('처음 쓰는 문서에는 createdAt 을 찍고 다시 써도 바꾸지 않는다', async () => {
const ref = getFirestore().doc('notices/admin-write-test');
await run('ops', ref.path, { title: '첫' });
const first = (await ref.get()).get('createdAt');
expect(first).toBeDefined();
await run('ops', ref.path, { title: '둘' });
expect((await ref.get()).get('createdAt').isEqual(first)).toBe(true);
});
@@ -1772,3 +1772,15 @@ describe('테스트 자가 점검', () => {
expect(testEnvironment.projectId).toMatch(/^demo-/);
});
});
describe('성운 일 1회 기록 — GALAXY 「성운 생성」 버튼(Figma 540:19592)', () => {
test('본인 기록은 읽고, 남의 기록은 못 읽고, 아무도 쓰지 못한다', async () => {
await seedDocuments(testEnvironment, {
'users/alice/nebulaCreates/2026-10-06': { fandomId: 'f1' },
});
await assertSucceeds(getDoc(doc(dbFor('alice'), 'users/alice/nebulaCreates/2026-10-06')));
await assertSucceeds(getDoc(doc(dbFor('alice'), 'users/alice/nebulaCreates/2026-10-07')));
await assertFails(getDoc(doc(dbFor('bob'), 'users/alice/nebulaCreates/2026-10-06')));
await assertFails(setDoc(doc(dbFor('alice'), 'users/alice/nebulaCreates/2026-10-08'), { fandomId: 'f2' }));
});
});