From 576058497aa54e72f8c82f190ac04e8366c7cebd Mon Sep 17 00:00:00 2001 From: goon-foss Date: Tue, 18 Aug 2026 12:23:04 +0200 Subject: [PATCH] fix(ui): grupuj changelog po miesiacu, zdejmij naglowek z Sites Changelog: 17 sierpniowych wpisow drukowalo "AUGUST 2026" 17 razy, bo naglowek szedl przy KAZDYM wpisie. Teraz wpisy sa laczone w grupy miesieczne (sa juz newest-first, wiec wystarczy sklejac kolejne z tym samym `date`), naglowek leci raz na grupe. Sites: usuniety tytul "SITES" + licznik i podpowiedz "tap a tube -> newest scenes". Byl jedynym ekranem-zakladka z wlasnym naglowkiem, przez co jego tresc zaczynala sie nizej niz na pozostalych. Martwe style (headerRow/headerLabel/headerCount/hint) wyciete. Co-Authored-By: Claude Opus 5 --- mobile/src/changelog.ts | 8 ++++++++ mobile/src/components/WhatsNewModal.tsx | 24 ++++++++++++++++++------ mobile/src/screens/SitesScreen.tsx | 21 --------------------- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/mobile/src/changelog.ts b/mobile/src/changelog.ts index 2af1beb..4f0b5ae 100644 --- a/mobile/src/changelog.ts +++ b/mobile/src/changelog.ts @@ -16,6 +16,14 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + id: '2026-08-18f', + date: 'August 2026', + items: [ + 'This list now shows the month once per group instead of repeating it above every single entry.', + 'Sites: dropped the redundant title and hint line, so the list starts right where the other tabs do.', + ], + }, { id: '2026-08-18e', date: 'August 2026', diff --git a/mobile/src/components/WhatsNewModal.tsx b/mobile/src/components/WhatsNewModal.tsx index 40cb814..a86c638 100644 --- a/mobile/src/components/WhatsNewModal.tsx +++ b/mobile/src/components/WhatsNewModal.tsx @@ -8,7 +8,6 @@ import React from 'react'; import { Modal, Pressable, ScrollView, StyleSheet, Text, View } from 'react-native'; import { - CHANGELOG, NEWEST_CHANGELOG_ID, unseenEntries, type ChangelogEntry, @@ -48,6 +47,19 @@ export function WhatsNewModal() { if (NEWEST_CHANGELOG_ID) setLastSeenChangelog(NEWEST_CHANGELOG_ID).catch(() => {}); }, []); + // Nagłówek miesiąca RAZ na grupę, nie przy każdym wpisie. Wcześniej 17 sierpniowych + // wpisów drukowało „AUGUST 2026" 17 razy (zgłoszenie 2026-08-18). Wpisy są już + // newest-first, więc kolejne z tym samym `date` po prostu doklejamy do bieżącej grupy. + const months = React.useMemo(() => { + const out: { date: string; items: string[] }[] = []; + for (const e of entries) { + const last = out[out.length - 1]; + if (last && last.date === e.date) last.items.push(...e.items); + else out.push({ date: e.date, items: [...e.items] }); + } + return out; + }, [entries]); + if (!visible || entries.length === 0) return null; return ( @@ -56,10 +68,10 @@ export function WhatsNewModal() { What's new - {entries.map((e) => ( - - {CHANGELOG.length > 1 ? {e.date} : null} - {e.items.map((it, i) => ( + {months.map((m) => ( + + {m.date} + {m.items.map((it, i) => ( • {it} @@ -101,7 +113,7 @@ const styles = StyleSheet.create({ marginBottom: 14, }, scroll: { flexGrow: 0 }, - entry: { marginBottom: 14 }, + month: { marginBottom: 16 }, entryDate: { color: theme.accentText, fontSize: 12, diff --git a/mobile/src/screens/SitesScreen.tsx b/mobile/src/screens/SitesScreen.tsx index ec7ff61..71a93f4 100644 --- a/mobile/src/screens/SitesScreen.tsx +++ b/mobile/src/screens/SitesScreen.tsx @@ -73,12 +73,6 @@ export function SitesScreen() { return ( - - Sites - {items.length} - - tap a tube → newest scenes · tap the ★ → rating breakdown - @@ -267,21 +261,6 @@ function RatingModal({ source, onClose }: { source: SourceOut | null; onClose: ( const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: theme.bg, paddingHorizontal: SCREEN_PAD_H, paddingTop: SCREEN_PAD_TOP }, - headerRow: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'space-between', - paddingBottom: 4, - }, - headerLabel: { - color: theme.muted, - fontSize: 12, - textTransform: 'uppercase', - letterSpacing: 1.2, - fontWeight: '700', - }, - headerCount: { color: theme.fg, fontSize: 22, fontWeight: '800' }, - hint: { color: theme.mutedDim, fontSize: 11, marginBottom: 12 }, segment: { flexDirection: 'row', gap: 8, marginBottom: 12 },