Repository navigation
Mate 4.12.0 — the Trips calendar opens a range of days
Mate 4.12.0 — the Trips calendar opens a range of days
@arekm's #402: a week, a weekend or a
holiday opens in the Trips calendar in one gesture, and a calendar's drawer always shows the day
picked last.
A range of days in the Trips calendar — #402, @arekm
Three ways to pick it:
- on a computer, Shift-click a second day, forwards or backwards;
- or drag the mouse across the days: they are ringed as you go, and open when you let go;
- on a phone, hold a day for half a second — a dashed ring marks it — and tap the last one. A
tap on the held day, a scroll, or a day chosen another way lets it go.
The drawer opens with one heading for the whole range — the trips, the kilometres, the battery, the
driving time and the rest of a day's figures — and then each day with trips, newest first, under its
own heading, with its own figures and trips.
- A range stays inside the month on screen, as the calendar shows one month.
- A day's date under the range opens that day alone, with its 🔗 button for merging trips, which a
range does not have. - A reload brings the range back, as it brings a day back, and so does the way back from one of its
trips. - Charges, Wallbox and Refuels keep one day per click.
- A line under the Trips calendar names the three gestures.
When the car charged between the first trip and the last — over a few days it almost always has —
the range's battery reads as a day's already does with a charge in it: what the trips used, added up,
and what the charges added. In a day with a charge, the two figures now say what each one counts. A
day with no charge goes from its first reading to its last, so the range's figure need not equal its
days' figures added up: a day also counts what the car lost while parked between its trips.
The drawer shows the day picked last — #402, @arekm
Two days picked in quick succession sent two requests side by side, and a slow answer for the first
day could fill the drawer under the second day's ring — on all four calendars, and with the 🔗 merge
view on Trips. A new pick now replaces the request its drawer is still waiting for. A failed day's
"Try again" strip goes once another day is asked for, since its retry would replace the newer day;
the blocks that refresh themselves, such as the Overview's status card, keep theirs until their next
answer, as before.
Upgrade impact
- Normal update. Nothing in the stored data is migrated, recomputed or deleted, and there is no new
setting.
Verification
- CI green on the tag: 5,397 passed, 1 skipped (a test that needs a local-only file), plus 48
on the Windows job; the check that the released desktop shell still runs this Mate is green. - Locally, in the CI's image with Node.js and a MateDesktop checkout added — so that nothing is
skipped: 5,398 passed. - 28 of the new tests fail on 4.11.2 and pass now. The browser tests ran in Chromium, with the mouse
and with touch emulated, at 390 and 1280 px: each gesture sends one request, for the range only. - A test added during review: a block that refreshes itself keeps its "Try again" strip while the
refresh is on its way. It fails on the version of #402 that took the strip away from every block,
and passes now. On the Overview, with the refresh's answer held back 3 s, the strip stays, as on
4.11.2; on that earlier version it was gone for those 3 s. - Not tried: a real phone, Safari and Firefox.
- The Docker image, built from this commit, ran on the test instance with a real database before the
tag. There, over four ranges — all of August, all of September, 20–27 September and 1–8 October —
the drawer listed exactly the days with trips (29, 27, 6 and 8), and the range's trips and
kilometres are its days' added up, to within 0.1 km, the rounding of each day's figure.
Italiano
Mate 4.12.0 — il calendario dei Viaggi apre più giorni insieme
La #402 di @arekm: una settimana, un fine
settimana o una vacanza si aprono nel calendario dei Viaggi con un gesto solo, e il cassetto di un
calendario mostra sempre l'ultimo giorno scelto.
Più giorni nel calendario dei Viaggi — #402, @arekm
Tre modi per sceglierli:
- sul computer, Maiusc-clic su un secondo giorno, in avanti o all'indietro;
- oppure trascini il mouse sui giorni: si cerchiano mentre passi, e si aprono quando lasci;
- sul telefono tieni premuto un giorno per mezzo secondo — lo segna un bordo tratteggiato — e
tocchi l'ultimo. Un tocco sul giorno tenuto, uno scorrimento o un giorno scelto in un altro modo
lo lasciano andare.
Il cassetto si apre con un'intestazione per tutto l'intervallo — i viaggi, i chilometri, la batteria,
il tempo di guida e le altre cifre di un giorno — e poi ogni giorno con viaggi, dal più recente, sotto
la sua intestazione, con le sue cifre e i suoi viaggi.
- L'intervallo resta dentro il mese che vedi, perché il calendario mostra un mese.
- La data di un giorno sotto l'intervallo apre quel giorno da solo, con il suo pulsante 🔗 per unire i
viaggi, che l'intervallo non ha. - Ricaricando la pagina l'intervallo torna, come torna un giorno, e così tornando indietro da uno dei
suoi viaggi. - Ricariche, Wallbox e Rifornimenti aprono sempre un giorno per clic.
- Una riga sotto il calendario dei Viaggi ricorda i tre gesti.
Se tra il primo e l'ultimo viaggio l'auto ha caricato — in qualche giorno succede quasi sempre — la
batteria dell'intervallo si legge come già quella di un giorno con una ricarica: quanto hanno usato i
viaggi, sommato, e quanto hanno aggiunto le ricariche. In un giorno con una ricarica, adesso le due
cifre dicono cosa conta ciascuna. Un giorno senza ricariche va dalla prima all'ultima lettura, quindi la
cifra dell'intervallo può non essere la somma di quelle dei suoi giorni: un giorno conta anche quello
che l'auto ha perso da ferma tra i suoi viaggi.
Il cassetto mostra l'ultimo giorno scelto — #402, @arekm
Due giorni scelti in fretta mandavano due richieste insieme, e una risposta lenta per il primo giorno
poteva riempire il cassetto sotto il bordo del secondo — in tutti e quattro i calendari, e con la vista
🔗 di unione nei Viaggi. Adesso una nuova scelta sostituisce la richiesta che il suo cassetto sta ancora
aspettando. La striscia «Riprova» di un giorno non caricato sparisce quando se ne chiede un altro,
perché il suo nuovo tentativo sostituirebbe il giorno più recente; i blocchi che si aggiornano da soli,
come il riquadro di stato della Panoramica, tengono la loro fino alla risposta successiva, come prima.
Impatto dell'aggiornamento
- Aggiornamento normale. Niente dei dati salvati viene migrato, ricalcolato o cancellato, e non c'è
nessuna impostazione nuova.
Verifica
- CI verde sul tag: 5.397 passati, 1 saltato (un test che ha bisogno di un file solo locale), più
48 sul job Windows; il controllo che il guscio desktop pubblicato faccia ancora girare questa Mate è verde. - In locale, nell'immagine della CI con Node.js e una copia di MateDesktop aggiunti — così che non si
salti niente: 5.398 passati. - 28 dei test nuovi cadono sulla 4.11.2 e passano adesso. I test nel browser hanno girato in Chromium,
col mouse e col tocco simulato, a 390 e 1280 px: ogni gesto manda una sola richiesta, solo per
l'intervallo. - Un test aggiunto durante la revisione: un blocco che si aggiorna da solo tiene la sua striscia
«Riprova» mentre l'aggiornamento è in viaggio. Cade sulla versione della #402 che toglieva la striscia
da ogni blocco, e passa adesso. Sulla Panoramica, con la risposta dell'aggiornamento trattenuta 3 s, la
striscia resta, come nella 4.11.2; con quella versione spariva per quei 3 s. - Non provati: un telefono vero, Safari e Firefox.
- L'immagine Docker, costruita da questo commit, ha girato sull'istanza di prova con un database vero
prima del tag. Lì, su quattro intervalli — tutto agosto, tutto settembre, dal 20 al 27 settembre e
dall'1 all'8 ottobre — il cassetto ha elencato esattamente i giorni con viaggi (29, 27, 6 e 8), e i
viaggi e i chilometri dell'intervallo sono la somma di quelli dei suoi giorni, a meno di 0,1 km,
l'arrotondamento della cifra di ogni giorno.