D1, terza parte: Dashboard come pagina iniziale ovunque, miniature anche del Giro
Richiesta di Alberto (#59, parte b): la Dashboard al posto di Attività, prima voce e
pagina iniziale, compatta, con l'anteprima del browser sempre visibile e le miniature di
ciò che è arrivato. La prima parte (d6c0ef8) aveva già pagina, rotte e anteprima; qui si
chiude ciò che mancava.
- La finestra di Febe per Windows apre /dashboard?gettone=… (non più /): tolto il
gettone l'indirizzo resta /dashboard.
- La voce Dashboard ha un'icona sua, layout-dashboard, disegnata in casa.
- Cronologia: anche le righe del Giro dei seguiti, che non hanno un account, mostrano le
miniature di ciò che è arrivato di tutti gli account; mai gli elementi importati. Indice
ix_entry_discovered nella migrazione 0002 (non ancora unita), così la domanda legge
solo le righe dei minuti della ricetta anche con 200.000 elementi.
- Anteprima ingrandita: le frecce funzionano anche con il fuoco sui pulsanti del piede,
«Apri l'account» segue l'elemento mostrato, chiudendo non si disegna più nulla.
- Al telefono il cruscotto è più basso (anteprima 196 px, miniature 40 px).
- Guida: «Attività e arresti» diventa «Dashboard e arresti», collegamenti e testi delle
altre pagine aggiornati; differenze dai mockup in docs/schermate/differenze.md; quattro
righe in docs/decisioni.md.
- Prove: DashboardApiTests (riga del Giro, importati esclusi, domande sbagliate),
DesktopCompositionTests (/dashboard), GuideTests; DashboardInterfaceTests con Chromium
(miniature, anteprima, frecce, Esc, una colonna sotto i 1000 px), solo nella CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0547c747c5
commit
34fe5e9073
31 files changed
+265
-78
No files matched your search
@@ -40,8 +40,34 @@ public sealed class DashboardApiTests
|
||||
|
||||
var (status, _, _) = await server.GetAsync($"/api/activity/arrived?account={marta.Id}&from={to}&to={from}");
|
||||
Assert.AreEqual(HttpStatusCode.BadRequest, status, "the end before the start");
|
||||
(status, _, _) = await server.GetAsync("/api/activity/arrived?account=uno");
|
||||
Assert.AreEqual(HttpStatusCode.BadRequest, status);
|
||||
(status, _, _) = await server.GetAsync($"/api/activity/arrived?account=uno&from={from}&to={to}");
|
||||
Assert.AreEqual(HttpStatusCode.BadRequest, status, "an account that is no number");
|
||||
(status, _, _) = await server.GetAsync($"/api/activity/arrived?account={marta.Id}");
|
||||
Assert.AreEqual(HttpStatusCode.BadRequest, status, "no time");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task ALineOfTheGiroGetsWhatArrivedOfEveryAccountButNeverTheImportedFiles()
|
||||
{
|
||||
// The Giro dei seguiti saves posts of many accounts: its line has no account and shows what arrived of all of
|
||||
// them in its time. What an import brought in meanwhile is not something the engine downloaded.
|
||||
await using var server = await Part2.StartAsync();
|
||||
var marta = await server.Db.Accounts.AddAsync(Make.Account("marta.prova"));
|
||||
var luca = await server.Db.Accounts.AddAsync(Make.Account("luca.prova"));
|
||||
var start = Make.T0.AddHours(1);
|
||||
await server.Db.Entries.AddAsync(Make.Entry(marta.Id, "uno", Make.T0) with { DiscoveredAt = start.AddSeconds(5) }, [Make.Photo()]);
|
||||
await server.Db.Entries.AddAsync(Make.Entry(luca.Id, "due", Make.T0) with { DiscoveredAt = start.AddSeconds(20) }, [Make.Photo()]);
|
||||
await server.Db.Entries.AddAsync(Make.Entry(luca.Id, "importato", Make.T0) with { DiscoveredAt = start.AddSeconds(30), Provenance = Provenance.Imported }, [Make.Photo()]);
|
||||
await server.Db.Entries.AddAsync(Make.Entry(luca.Id, "dopo", Make.T0) with { DiscoveredAt = start.AddMinutes(5) }, [Make.Photo()]);
|
||||
|
||||
var from = Uri.EscapeDataString(start.ToString("O"));
|
||||
var to = Uri.EscapeDataString(start.AddMinutes(1).ToString("O"));
|
||||
var all = await server.GetJsonAsync($"/api/activity/arrived?from={from}&to={to}");
|
||||
Assert.AreEqual(2, all.Int("total"), "both accounts, without the imported entry and what came after");
|
||||
CollectionAssert.AreEqual(new long[] { luca.Id, marta.Id }, all.Items("tiles").Select(t => (long)t.Int("accountId")).ToArray(), "newest first");
|
||||
|
||||
var one = await server.GetJsonAsync($"/api/activity/arrived?account={luca.Id}&from={from}&to={to}");
|
||||
Assert.AreEqual(1, one.Int("total"), "a line of one account: never the imported entry");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
Reference in new issue
Block a user