Comment on Multiple Image Layouts I'm working on fixing/changing the way # Friendica
hypolite@friendica.mrpetovan.com 20 hours ago
@randompenguin The three-image masonry layout should indeed display like the second version. This was the intention and I’m not sure why it doesn’t do that currently.
I’m also personally against the literal grid layout because it requires to open images to see them in their original format, which for a reason that will forever escape me, doesn’t work in iOS Add to Home Screen context, where both the Javascript AND the native click events are being fired, resulting in the image opening in the same virtual browser without any navigation controls, which forces me to exit the “app” and open it again.
randompenguin@dillyofapickle.com 19 hours ago
@hypolite Sounds a lot like what I've run into with legacy code that used JS to make the UI work on touch interfaces but when it's run in modern browsers that do a good job on their own of mapping touch input to desktop events, it causes it to fire both events.hypolite@friendica.mrpetovan.com 18 hours ago
@randompenguin I’d be inclined to agree with you, but it only does this in this particular environment. Not in any mobile browsers I’ve tested, not in any desktop browser I’ve tested. To make matters worse, the Add to Home Screen feature caches dependencies heavily, so any changes in the code requires to delete the virtual app, clear the cache somehow by waiting an indeterminate amount of time, and adding the app again. At some point I threw the towel and I don’t touch images in my feed.
To note: it also fails with the New Post button but this leads to the Composer page (instead of just opening the jot) which has navigation, so it isn’t debilitating.
randompenguin@dillyofapickle.com 1 hour ago
@hypolite The masonry layout doesn't display like the second version because of this conditional at the top of the layout function:
The array of images is run through both
array_mapand a "chunk" operation to split it into pairs. If the length of the chunk is "1" it duplicates the one image and lower down in the code gets the dimensions as if there were a duplicate of that image next to it. But the total count for display is still the original count of images so it never actually displays that image twice at the end.Comment out/remove that conditional and the last image is scaled to span the columns above it.