E3: schermate di formati e fotogrammi, confronto e ritocchi
verifica / controlli (push) Successful in 23s
verifica / prove (push) Failing after 1h3m20s
verifica / installatore (push) Skipped
verifica / immagine (push) Skipped

Le schermate 15–21 dell'esportazione sono rifatte con i formati della
tappa E3 (la 15 intera, fino a «Conversione della libreria»), e se ne
aggiungono sei: finestra «Fotogrammi» dal visualizzatore (istante con
anteprima; «N in tutto» con la striscia, JPG «con perdita» e la cartella
delle copie), «Fotogrammi…» dalla selezione, righe delle copie con il
fotogramma nel visualizzatore, «Copia in…» con «Cambia» aperto e la
domanda della conversione della libreria. Nuovi passi del programma
delle schermate; nessuno converte, scarica o copia.

Il confronto con i mockup è in docs/schermate/differenze.md, con i limiti
della dimostrazione. Ritocchi trovati nel confronto: la riga «Fotogramma
a …» ora è centrata sul campo dell'istante, le note sotto «Formato» non
hanno più 12 px in più, e in «Copia in…» le etichette Foto e Video
stanno sopra i controlli, che così sono allineati.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-28 12:24:07 +01:00
1 parent d197715fc7
commit eb79b05fda
23 files changed
+244 -19

No files matched your search

@@ -0,0 +1,16 @@
// «Conversione della libreria» in Impostazioni → Esportazione (spec §4.10, tappa E3; composed from mockups 08 and 07 and
// the dialogs of mockup 13): PNG chosen for the photos opens «Convertire anche i N file già in libreria?» with «Solo i
// nuovi» first. Nothing is answered: closed, the setting stays «Originale».
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const photo = () => document.querySelector('.sezione-conversione .scelta-formato[data-tipo=photo]');
await until(() => photo() && document.querySelector('.stato-conversione')?.textContent);
const body = document.querySelector('.corpo');
const section = document.querySelector('.sezione-conversione');
body.scrollTop = section.getBoundingClientRect().top - body.getBoundingClientRect().top + body.scrollTop - 24;
photo().querySelector('[data-value=png]').click();
const question = () => [...document.querySelectorAll('.dialogo')].find((d) => d.querySelector('.spazio-conversione'));
await until(question);
await sleep(500);
document.activeElement?.blur();
return [question().querySelector('h2')?.textContent, question().querySelector('.spazio-conversione')?.textContent];
@@ -0,0 +1,21 @@
// «Copia in…» on the whole Libreria with «Cambia» open (spec §4.10, tappa E3; composed from the dialogs of mockup 13,
// the segmented controls of mockup 07 and mockup 09): PNG chosen for the photos of this copy only, the summary and the
// rows asked again with that format. Nothing is started.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const button = () => [...document.querySelectorAll('.strumenti button')].find((b) => (b.getAttribute('aria-label') || '').startsWith('Esporta'));
await until(() => button() && document.querySelector('.tess[data-id]'));
button().click();
await sleep(400);
[...document.querySelectorAll('.menu button, .menu [role=menuitem]')].find((x) => x.textContent.includes('Copia'))?.click();
const dialog = () => document.querySelector('.dialogo.copia-in');
await until(() => dialog()?.querySelector('.riepilogo-copia'), 150);
dialog().querySelector('.riga-formato-testa .btn').click();
await sleep(200);
dialog().querySelector('.riga-formato .scelta-formato[data-tipo=photo] [data-value=png]').click();
// The choice asks the plan again: the button is off until the new plan is drawn.
await until(() => dialog().querySelector('.riepilogo-copia')
&& !dialog().querySelector('footer .btn.primo').disabled, 200);
await sleep(400);
document.activeElement?.blur();
return [dialog().querySelector('.testo-formato')?.textContent, dialog().querySelector('.riepilogo-copia')?.textContent];
@@ -0,0 +1,23 @@
// «Fotogrammi…» from the selection bar of the Libreria (spec §4.10, tappa E3; composed from the dialogs of mockup 13 and
// the choices of mockup 09): @marta.demo, «Seleziona», four tiles of videos and four of photos, then the dialog with
// the time field only (there is no single video) and the summary that says the photos are skipped. Nothing starts.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const tiles = () => [...document.querySelectorAll('.mosaico .tess[data-id]')];
const isVideo = (tile) => Boolean(tile.querySelector('use[href="#i-play"]'));
await until(() => tiles().filter(isVideo).length >= 4 && tiles().length >= 8);
[...document.querySelectorAll('.strumenti .btn')].find((b) => b.textContent.includes('Seleziona')).click();
await sleep(300);
const chosen = [...tiles().filter(isVideo).slice(0, 4), ...tiles().filter((x) => !isVideo(x)).slice(0, 4)];
for (const tile of chosen) {
tile.click();
await sleep(60);
}
const frames = () => document.querySelector('.salva .fotogrammi-selezione');
await until(() => frames() && !frames().disabled);
frames().click();
const dialog = () => document.querySelector('.dialogo.fotogrammi');
await until(() => dialog()?.querySelector('.riepilogo-fotogrammi .riepilogo-copia'));
await sleep(500);
document.activeElement?.blur();
return dialog().querySelector('.riepilogo-fotogrammi').textContent;
@@ -0,0 +1,42 @@
// The dialog «Fotogrammi» from the viewer in «N in tutto» (spec §4.10, tappa E3): 8 frames, the strip of the first six
// previews with «e altri 2», JPG with its note «con perdita: qualità 92», output «Nella cartella delle copie» with the
// row of the folder. Same video as fotogrammi-visualizzatore.js. Nothing is downloaded or copied.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const videos = [];
for (let cursor = null, i = 0; i < 20; i++) {
const page = await json(`/api/library?accounts=${marta.id}&mode=files&limit=600${cursor ? `&cursor=${encodeURIComponent(cursor)}` : ''}`);
videos.push(...page.tiles.filter((x) => x.cover && x.cover.kind === 'video'));
if (!(cursor = page.older)) break;
}
let found = null;
for (let i = 0; i < videos.length && !found; i += 16) {
const entries = await Promise.all(videos.slice(i, i + 16).map((x) => json(`/api/entries/${x.id}`)));
found = entries.find((e) => e.media.some((m) => (m.copies || []).some((c) => c.variant === 'frame')));
}
const { navigate } = await import('/js/core/shell.js');
await navigate(`/libreria?account=${found.account.id}&dal=${found.publishedDay}&al=${found.publishedDay}`);
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${found.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .azione-fotogramma') && document.querySelector('.vis video')?.readyState >= 1);
document.querySelector('.vis video').pause();
document.querySelector('.vis .azione-fotogramma').click();
const dialog = () => document.querySelector('.dialogo.fotogrammi');
await until(() => dialog()?.querySelector('.modo-fotogrammi'));
dialog().querySelector('.modo-fotogrammi').previousElementSibling.querySelector('[data-value=numero]').click();
const count = dialog().querySelector('input[type=number]');
count.value = '8';
count.dispatchEvent(new Event('input', { bubbles: true }));
[...dialog().querySelectorAll('[role=radio][data-value=jpg]')].pop().click();
dialog().querySelector('input[type=radio][value=cartella]').click();
await until(() => {
const images = [...dialog().querySelectorAll('.striscia-fotogrammi img')];
return images.length === 6 && images.every((i) => i.complete && i.naturalWidth > 0) && /Copia/.test(dialog().querySelector('footer .btn.primo').textContent);
}, 150);
await sleep(500);
document.activeElement?.blur();
return [dialog().querySelector('.altri-fotogrammi')?.textContent, dialog().querySelector('.riepilogo-fotogrammi').textContent];
@@ -0,0 +1,41 @@
// «Fotogramma» from the viewer (spec §4.6, §4.10, tappa E3; composed from the dialogs of mockup 13 and mockup 02): the
// video of @marta.demo that the demo has a frame of, the player at 1,25 s, the dialog «Fotogrammi» in «Questo istante»
// with its preview, the scrubber, the time field and «Fotogramma a …». Nothing is downloaded or copied.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
// The video with a frame copy: the newest of @marta.demo's videos whose viewer lists a «fotogramma» row.
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const videos = [];
for (let cursor = null, i = 0; i < 20; i++) {
const page = await json(`/api/library?accounts=${marta.id}&mode=files&limit=600${cursor ? `&cursor=${encodeURIComponent(cursor)}` : ''}`);
videos.push(...page.tiles.filter((x) => x.cover && x.cover.kind === 'video'));
if (!(cursor = page.older)) break;
}
let found = null;
for (let i = 0; i < videos.length && !found; i += 16) {
const entries = await Promise.all(videos.slice(i, i + 16).map((x) => json(`/api/entries/${x.id}`)));
found = entries.find((e) => e.media.some((m) => (m.copies || []).some((c) => c.variant === 'frame')));
}
const { navigate } = await import('/js/core/shell.js');
await navigate(`/libreria?account=${found.account.id}&dal=${found.publishedDay}&al=${found.publishedDay}`);
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${found.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .azione-fotogramma') && document.querySelector('.vis video')?.readyState >= 1);
const video = document.querySelector('.vis video');
video.pause();
video.currentTime = 1.25;
await until(() => !video.seeking && Math.abs(video.currentTime - 1.25) < 0.01, 50);
document.querySelector('.vis .azione-fotogramma').click();
const dialog = () => document.querySelector('.dialogo.fotogrammi');
await until(() => {
const img = dialog()?.querySelector('.anteprima-fotogramma img');
return img && img.complete && img.naturalWidth > 0 && /Fotogramma a/.test(dialog().querySelector('.istante-mostrato')?.textContent || '');
});
await until(() => dialog().querySelector('.riepilogo-fotogrammi .riepilogo-copia'));
await sleep(400);
document.activeElement?.blur();
return [dialog().querySelector('.istante-mostrato')?.textContent, dialog().querySelector('.riepilogo-fotogrammi')?.textContent];
@@ -0,0 +1,33 @@
// The viewer of the video the demo has a frame of (spec §4.6, §4.10, tappa E3; composed from mockup 02): in the File
// panel the copy rows with their form, «Copiato in Disco USB … · intero» and «… · fotogramma a 0:01,125 · PNG», and
// «Fotogramma» among the actions at the bottom.
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const until = async (test, tries = 100) => { for (let i = 0; i < tries && !test(); i++) await sleep(100); return test(); };
const json = (path) => fetch(path, { headers: { Accept: 'application/json' } }).then((r) => r.json());
const marta = (await json('/api/accounts')).accounts.find((a) => a.username === 'marta.demo');
const videos = [];
for (let cursor = null, i = 0; i < 20; i++) {
const page = await json(`/api/library?accounts=${marta.id}&mode=files&limit=600${cursor ? `&cursor=${encodeURIComponent(cursor)}` : ''}`);
videos.push(...page.tiles.filter((x) => x.cover && x.cover.kind === 'video'));
if (!(cursor = page.older)) break;
}
let found = null;
for (let i = 0; i < videos.length && !found; i += 16) {
const entries = await Promise.all(videos.slice(i, i + 16).map((x) => json(`/api/entries/${x.id}`)));
found = entries.find((e) => e.media.some((m) => (m.copies || []).some((c) => c.variant === 'frame')));
}
const { navigate } = await import('/js/core/shell.js');
await navigate(`/libreria?account=${found.account.id}&dal=${found.publishedDay}&al=${found.publishedDay}`);
const tile = () => document.querySelector(`.mosaico .tess[data-entry="${found.id}"]`);
await until(tile);
tile().click();
await until(() => document.querySelector('.vis .azione-fotogramma') && document.querySelectorAll('.vis .riga-copia').length >= 2
&& document.querySelector('.vis video')?.readyState >= 2);
const video = document.querySelector('.vis video');
video.pause();
video.currentTime = 1.125;
await until(() => !video.seeking, 50);
await sleep(600);
document.activeElement?.blur();
return [...document.querySelectorAll('.vis .riga-copia')].map((r) => r.textContent);