Options

Why does my multiple image home page change layout on refresh?

spider-tspider-t Registered Users Posts: 443 Major grins
edited August 14, 2013 in SmugMug Customization
I have a bunch of pictures from an unlisted gallery showing on my homepage in that landscape collage style. Without changing my browser window size, I have seen this set of images show with 3 across the top, 4 across the top and 5 across the top. I can get different results by hitting the refresh button, or by navigating to another location and returning. See attached screen shots. Is this expected behavior? Feels broken to me.

thanks!
Trish

Comments

  • Options
    spider-tspider-t Registered Users Posts: 443 Major grins
    edited August 13, 2013
    attachment
    spider-t wrote: »
    I have a bunch of pictures from an unlisted gallery showing on my homepage in that landscape collage style. Without changing my browser window size, I have seen this set of images show with 3 across the top, 4 across the top and 5 across the top. I can get different results by hitting the refresh button, or by navigating to another location and returning. See attached screen shots. Is this expected behavior? Feels broken to me.

    thanks!
    Trish
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 13, 2013
    In the settings for that multiple photos block, turn off the "vary photo height" tickbox.

    The purpose of that feature is so that if you have all of your images the exact same aspect ratio, it tries not to arrange them as a perfectly regular grid, which would look a bit boring. If you've got plenty of variation in aspect ratio already, you don't really need this turned on.
  • Options
    spider-tspider-t Registered Users Posts: 443 Major grins
    edited August 13, 2013
    perfect. thanks!
    Lamah wrote: »
    In the settings for that multiple photos block, turn off the "vary photo height" tickbox.

    The purpose of that feature is so that if you have all of your images the exact same aspect ratio, it tries not to arrange them as a perfectly regular grid, which would look a bit boring. If you've got plenty of variation in aspect ratio already, you don't really need this turned on.
  • Options
    afxafx Registered Users Posts: 102 Major grins
    edited August 14, 2013
    Lamah wrote: »
    In the settings for that multiple photos block, turn off the "vary photo height" tickbox.

    The purpose of that feature is so that if you have all of your images the exact same aspect ratio, it tries not to arrange them as a perfectly regular grid, which would look a bit boring. If you've got plenty of variation in aspect ratio already, you don't really need this turned on.

    That does not really explain that it recalculates all the time. Why not calculate it once when setting up that block?
    I have three different renderings of that block depending on the mood of the algorithm, and when I turn that setting off, I have straggling image on bottom, see also http://www.dgrin.com/showthread.php?t=238525

    Only when vary photo height is on, I get a decent rendering about a third of the time. With it off, I always get a straggler.

    cheers
    afx
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 14, 2013
    That does not really explain that it recalculates all the time. Why not calculate it once when setting up that block?

    There isn't really a good moment to calculate and store that, because virtually any operation you undertake on the site, completely unrelated to that block, can cause its contents to change (e.g. changing the keywords on a photo, uploading more photos, moving photos). In addition, since the layout is completely dependant on the exact size of your browser window, there isn't a good way of saving this in a way that makes it repeatable or useful for the second visit. Nothing you see on a Collage Landscape block bears any relationship to what it will look like on your customer's monitors, Vary Height enabled or no.
    Only when vary photo height is on, I get a decent rendering about a third of the time. With it off, I always get a straggler.

    This is a strength of Vary Height - because stragglers are an unavoidable consequence of the line-by-line layout algorithm that Collage Landscape uses, if there was no randomisation you could be stuck with only that straggler layout forevermore, with no possibility of seeing that decent rendering. Randomised behaviour means that you don't end up seeing the same poor layout every single day, if it happened to end up making poor choices on your monitor. You get a more even mix of layouts.

    Better layout algorithms lay out multiple rows of photos at the same time, so there is nothing special about the final row of photos and there isn't a tendency to produce stragglers. I developed such a layout:

    http://www.sherlockphotography.org/Customisations/Collage-Landscape

    But alas, we cannot use it because JavaScript is not supported. (It's still enabled in my galleries though, if you want to have a play).
  • Options
    afxafx Registered Users Posts: 102 Major grins
    edited August 14, 2013
    Lamah wrote: »
    There isn't really a good moment to calculate and store that, because virtually any operation you undertake on the site, completely unrelated to that block, can cause its contents to change (e.g. changing the keywords on a photo, uploading more photos, moving photos).
    Not at all, as all images are explicitly selected by me for that block. It is completely static.
    In addition, since the layout is completely dependant on the exact size of your browser window
    Nope. It is a property of the block, again, completely static.

    And it still does not explain why I would get three different layouts in exactly the same sized browser windows. Basically non-deterministic behavior from completely deterministic and static starting parameters.

    cheers
    afx
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 14, 2013
    afx wrote: »
    Not at all, as all images are explicitly selected by me for that block. It is completely static.

    I'm saying that the algorithm has been created with that in mind, that the multiple photos block can easily be changed by a hundred different things they cannot keep track of, so it is infeasible to store and properly invalidate a layout.
    And it still does not explain why I would get three different layouts in exactly the same sized browser windows. Basically non-deterministic behavior from completely deterministic and static starting parameters.

    It's intentionally randomised by turning on the Vary Height option?
  • Options
    afxafx Registered Users Posts: 102 Major grins
    edited August 14, 2013
    Lamah wrote: »
    It's intentionally randomised by turning on the Vary Height option?
    Why should it randomize? And why should two of the three possible results deliver a layout with stragglers?
    That algorithm needs work.

    cheers
    afx
  • Options
    thenickdudethenickdude Registered Users Posts: 1,302 Major grins
    edited August 14, 2013
    Why should it randomize?

    The answer to that is related to the answer to this:
    And why should two of the three possible results deliver a layout with stragglers?

    The current algorithm cannot possibly eliminate stragglers, because it lays out one row of photos at a time in a greedy fashion without considering what the size of the remainder at the end will be. Consequently, at least 50% of the layouts will end up with a final row which is 50% full or less.

    SmugMug could certainly make the random perturbation made by Vary Height the same on every browser window opening. However, if you're currently seeing a poor "straggler" layout on your screen, you would always see that forever, due to the deterministic layout for your screen size. Instead, if there is a per-run randomisation, you see an even mixture of all the nearby layouts including many good ones, so if the poor layout is very rare, you may never randomly land on it again. It turns "my layout always looks like crap" into "my layout usually looks fine, is sometimes great, and occasionally bad".

    Meanwhile, no matter what you do, it's not going to look the same on your customer's screen, so it hardly matters either way.
    That algorithm needs work.

    No argument from me there.
  • Options
    afxafx Registered Users Posts: 102 Major grins
    edited August 14, 2013
    Lamah wrote: »
    The current algorithm cannot possibly eliminate stragglers, because it lays out one row of photos at a time in a greedy fashion without considering what the size of the remainder at the end will be. Consequently, at least 50% of the layouts will end up with a final row which is 50% full or less.
    But if there are multiple outcomes, it should not be to hard to analyze them and use the one that fits best...
    SmugMug could certainly make the random perturbation made by Vary Height the same on every browser window opening. However, if you're currently seeing a poor "straggler" layout on your screen, you would always see that forever, due to the deterministic layout for your screen size. Instead, if there is a per-run randomisation, you see an even mixture of all the nearby layouts including many good ones, so if the poor layout is very rare, you may never randomly land on it again. It turns "my layout always looks like crap" into "my layout usually looks fine, is sometimes great, and occasionally bad".
    Currently it is my layout looks like crap 66% of the time as only a third of the possible outcomes works without stragglers.
    Meanwhile, no matter what you do, it's not going to look the same on your customer's screen, so it hardly matters either way.
    On all people's screens I looked at it, I had the same results as on my 30" and 24" desktop screens or my 15" notebook or 13" netbook because, as already mentioned, I use a fixed width box.
    So that argument is bogus.

    cheers
    afx
Sign In or Register to comment.