Opponent prep: the designer's review

The period caption shortens in a narrow row; «Last N» with both colours
shows «N + N»; the menu says from which date it counts; undated games
left out are named in the summary; no games in a period offer all games.
Without any dates a period by months takes all. Crisp icons (★, 🗐);
saved is a quiet mark. The list cuts long texts, names the colour in
words, opens on double-click, renames with Cancel, explains a missing
database, and tells while it opens one. CP_PREP_LIST for screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-31 21:47:08 +03:00
parent 570bd84dcf
commit e80933d48d
6 changed files with 456 additions and 169 deletions

View file

@ -764,6 +764,11 @@ impl App {
};
self.prep_dialog = Some(PrepDialog::new(path, entry));
}
// `CP_PREP_LIST=1`: the «Preparations» window at the start (screenshots).
if self.prep_list.is_none() && std::env::var_os("CP_PREP_LIST").is_some() {
static SHOWN: std::sync::Once = std::sync::Once::new();
SHOWN.call_once(|| self.prep_list = Some(crate::prep_ui::PrepList::new()));
}
let Some(index) = self.debug.open else { return };
let Some(path) = self.settings.databases.first().cloned() else {
return;
@ -934,7 +939,7 @@ impl App {
}
}
/// «📑 Preparations», and a saved preparation opened once its database is read.
/// «🗐 Preparations», and a saved preparation opened once its database is read.
fn prep_list(&mut self, ctx: &egui::Context) {
if let Some(start) = self.prep_waiting.take() {
if self.library.database(&start.path).is_some() {
@ -991,6 +996,7 @@ impl App {
};
if self.library.database(&start.path).is_none() {
self.library.load(&start.path, ctx);
self.toast(ctx, tr("Opening the database…"));
}
self.prep_waiting = Some(start);
ctx.request_repaint();