From cf45b6ea2daa0237f54e7b74ab0f07d47722d354 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 18 Nov 2026 08:15:18 -0700 Subject: A post's run of pictures goes into one grid instead of a screen each. "on a note with lots of images like this could we put them into a masonry grid layout within the post kinda like we do on our images feed so they don't take up so much real estate as we scroll?" (Adam, 2026-11-18). Two or more pictures with only blank space between them now share one box of justified rows, laid out like the Images feed: 140 px rows, 100 px on a phone, each tile at its own proportions and cropped to fill. A thirteen-photo post that ran thirteen screens long now takes a few rows. A tap still opens the picture in the pager, with the post's others a swipe away. A lone picture is shown as before. feed-picture-pager-test (two pictures side by side at one height, a lone one not in a grid, pager unchanged), feed-media-views, compose-preview and features-smoke pass. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6TV6sjEZSpqqBen9T5 --- tools/feed-picture-pager-test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tools') diff --git a/tools/feed-picture-pager-test.js b/tools/feed-picture-pager-test.js index f74c981..7578e01 100644 --- a/tools/feed-picture-pager-test.js +++ b/tools/feed-picture-pager-test.js @@ -82,6 +82,17 @@ try { await waitText('receive', 20000); await page.evaluate(() => document.querySelector('.app-nav-button[aria-label="Feed"]').click()); check('the pictures are in the feed', await waitFor(() => document.querySelectorAll('.notes-feed img.note-img').length >= 4, null, 20000)); + // a post's run of pictures shares one box of justified rows (the Images + // feed's layout), not a screen each; a lone picture stays as it was + const gal = await page.evaluate(() => { + const r = [...document.querySelectorAll('.notes-feed [data-key]')].find((n) => n.textContent.includes('two pictures')); + const one = [...document.querySelectorAll('.notes-feed [data-key]')].find((n) => n.textContent.includes('one picture')); + const g = r && r.querySelector('.note-gallery'); + const im = g ? [...g.querySelectorAll('img.note-img')].map((i) => i.getBoundingClientRect()) : []; + return { n: im.length, sameRow: im.length === 2 && Math.abs(im[0].top - im[1].top) < 1 && Math.abs(im[0].height - im[1].height) < 1.5, h: im[0] ? Math.round(im[0].height) : 0, lone: !!one && !one.querySelector('.note-gallery') && !!one.querySelector('img.note-img') }; + }); + check('two pictures in a post: one gallery, side by side, one height', gal.n === 2 && gal.sameRow && gal.h > 50 && gal.h < 300, JSON.stringify(gal)); + check('a lone picture is not put in a gallery', gal.lone); console.log('\n[a tap on the picture that opened it shows its details; the next closes it]'); const y0 = await openPic('two pictures'); -- cgit v1.2.3