Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Justified layout still not flawless

07 Jan 2016, 15:01

Hi Karl

I noticed that the Justified layout is still not flawless when using Chrome.
I do not have any problems when using Internet Explorer, Edge or Firefox.

But with Chrome I've got arrangements like the one below with some galleries.
The strange thing is that within Firefox I notice patterns like this for a millisecond and then the layout rearranges itself and everything is neat and orderly.
Image
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

07 Jan 2016, 22:21

I will try to look into this issue, although its very difficult to diagnose as I can't reproduce it locally. It seems only chrome-win related, because here is chrome-mac:
Image
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

30 Jan 2016, 10:26

I noticed today that the irregular justified layout only appears when the gallery has 'Shuffle' as an option.
When changing to 'Ascending', the layout of the images is as straight as can be.... and stays that way...

I'm also under the impression that with 'Ascending' the loading of the gallery-page is much quicker... could that be so?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

30 Jan 2016, 11:44

Martin wrote:I noticed today that the irregular justified layout only appears when the gallery has 'Shuffle' as an option.
When changing to 'Ascending', the layout of the images is as straight as can be.... and stays that way...
Hmm, now that's an interesting observation. I guess it's how some browsers mix execution of the shuffle process with the construction of the justified layout. I would really like to look into it, although it's very difficult from here as I can't re-create it from my browsers.
Martin wrote:I'm also under the impression that with 'Ascending' the loading of the gallery-page is much quicker... could that be so?
That could be yes, although I did not notice myself yet. The shuffle layout is managed on client-side, not server, so it certainly adds another process. It would certainly be proportional to the amount of images in the gallery. If you have a large amount of images, then yes both the shuffle and justified layout will affect processing times, also depending on the device. I don't think the shuffle process would take much time though ... have a link?

I might look into procedures of the shuffle script ...
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

30 Jan 2016, 14:12

mjau-mjau wrote:I would really like to look into it, although it's very difficult from here as I can't re-create it from my browsers.
I'm in no hurry... for now, I can live with the images are sorted ascending.
mjau-mjau wrote: ... have a link? ...
This is my largest gallery (104 images ascending sorted):
http://martinbroeze.nl/places/madeira/
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

31 Jan 2016, 00:34

Ok, it was a very helpful observation anyway about the broken justified layout when using shuffle ... I will take a look before next release. I will also look into the shuffle process (speed), although Im not sure this can be improved.
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

31 Jan 2016, 11:14

mjau-mjau wrote: I will also look into the shuffle process (speed), although Im not sure this can be improved.
I wouldn't spend much time on this... it is hardly noticable...
mjau-mjau wrote:Ok, it was a very helpful observation anyway about the broken justified layout when using shuffle ... I will take a look before next release.
Well, the ascending sort is not always preventing a irregular layout, although most galleries do not show the problem anymore.
But this one: http://martinbroeze.nl/more/winter/ still shows the irregularity when it shows itself after clicking on 'more' - 'winter' in the menu carousel, but NOT when I click first on 'more' and after showing of the galleries I click on 'winter'.
Image
Image

Everytime I open a new browser window I see that the mentioned behavior above is consistent in time: clicking by means of the menu-carousel always shows the irregularity, clicking by means of 'more' in menu and 'winter' in folder always does not show the irregularity.
When I stay in one browser window, the irregularity does not repeat itself after the first time.

When I open the gallery by entering the URL, it has no problems.

Size of the browser window has no influence. Even when I make my window smaller and the sidebar appears the above mentioned behavior is the same.

The strange thing is that when it shows irregular, it is now always showing the same irregular pattern... probably because the images are now always ordered in the same way because of the ascending sort.

Typical of this gallery is that one image has a different size compared to the others (the middle one on top).
Image

Last remark: everything said above has to do with a gallery that has an ascended sort.
I haven't looked if a shuffle sort acts the same (could do it when it's helpful to you, just let me know).
Oh... and the behavior is still the same after clearing my browser cache AND the cloudflare cache.
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

01 Feb 2016, 00:25

Hi Karl,

Just an addition to my previous post: it could very well be that it is not the shuffle sort that is causing the problem. Because the behavior I described in my previous post is very consistent. It doesn't matter which gallery I choose, when I select it through the menu-carousel it shows an irregular image pattern. But only the first time... after that all the galleries are o.k..
When, after opening a new browser window, I choose a gallery through method 2 everything is o.k. from the start.

Strange :-)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

01 Feb 2016, 01:54

First of all, was a bit disappointed that it was not shuffle, which would have isolated the issue. Furthermore, as mentioned earlier, I can't get it to not work here, making diagnostics very difficult unless I can recreate it on another platform.
Martin wrote:Everytime I open a new browser window I see that the mentioned behavior above is consistent in time: clicking by means of the menu-carousel always shows the irregularity, clicking by means of 'more' in menu and 'winter' in folder always does not show the irregularity.
This is an interesting observation, that seems to indicate it's either related to the menu, or the current page before switching to the new page-layout. What happens if you first click 'more', and then click 'winter' in the menu-carousel? What happens if you scale browser down (<1024px), and click the 'winter' from the slidemenu? Would be interesting to see if the issue could be menu-related.
Martin wrote:When I stay in one browser window, the irregularity does not repeat itself after the first time.
Martin wrote:The strange thing is that when it shows irregular, it is now always showing the same irregular pattern... probably because the images are now always ordered in the same way because of the ascending sort.
I didn't quite get the two above quotes ... They seem to contradict each other.
Martin wrote:Size of the browser window has no influence. Even when I make my window smaller and the sidebar appears the above mentioned behavior is the same.
Good to know. So the issue occurs also when navigating from the sidebar menu? ... It still works here when clicking first 'more' then 'winter' from the page folders listing?
Martin wrote:Typical of this gallery is that one image has a different size compared to the others (the middle one on top).
Image
To be honest, I think this is a bit random ... I believe its related to two position-related processes crashing into each other, for some reason only in some browsers, under certain conditions. Seems maybe the menu could be involved.
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

01 Feb 2016, 14:02

mjau-mjau wrote:What happens if you first click 'more', and then click 'winter' in the menu-carousel?
1) new browser window
2) clicking on 'more' (so the folder appears)
3) clicking on 'winter' in the menu-carousel
==> regular pattern
mjau-mjau wrote:What happens if you scale browser down (<1024px), and click the 'winter' from the slidemenu?
1) new browser window
2) clicking on 'menu' in the sidemenu
3) clicking on 'winter' in the sidemenu
==> irregular pattern (=consistent behavior with large screen/top menu)
Remark: when I scale down so that the gallery shows only one column of images ==> regular pattern (perhaps obvious)
mjau-mjau wrote:
Martin wrote:When I stay in one browser window, the irregularity does not repeat itself after the first time.
Martin wrote:The strange thing is that when it shows irregular, it is now always showing the same irregular pattern... probably because the images are now always ordered in the same way because of the ascending sort.
I didn't quite get the two above quotes ... They seem to contradict each other.
What I tried to say, is that in a new browser window only the first time of clicking on 'winter' in the menu-carousel shows this irregular pattern. When I stay in the same browser window I only get regular patterns regardless of what I do. Only after closing this browser window and opening a new one I can show the irregular pattern after clicking on 'winter' in the menu-carousel.
My second remark above is, that when an irregular pattern is seen, it is always the same irregular pattern ... always the same images are sticked together.
mjau-mjau wrote:
Martin wrote:Size of the browser window has no influence. Even when I make my window smaller and the sidebar appears the above mentioned behavior is the same.
Good to know. So the issue occurs also when navigating from the sidebar menu? ... It still works here when clicking first 'more' then 'winter' from the page folders listing?
Yes, the irregular pattern also shows from the sidebar.
And yes, the irregular pattern also shows when clicking on 'more' in the sidebar and then on 'winter'
mjau-mjau wrote:
Martin wrote:Typical of this gallery is that one image has a different size compared to the others (the middle one on top).
To be honest, I think this is a bit random ... I believe its related to two position-related processes crashing into each other, for some reason only in some browsers, under certain conditions. Seems maybe the menu could be involved.
Yes, I think you're right... even with a gallery in which all the images are the same I get an irregular pattern when in a new browser windown I click in the menu-carousel on 'more'/ 'winter'.

I did an additonal test:
I changed the sort order of 'winter' back to shuffle, I deleted my browser cache, I purged my Cloudflare cache and I recreated my Site Object.
I get the same behavior as described before... irregular pattern when clicking on 'winter' in menu-carousel, etc...
But now something new enters the equation :-) :
Everytime I press F5 (refresh window) I get the irregular pattern again and again... and this is not so when the gallery is in ascending sort mode...

Stuff for thought....

EDIT:
Just a question: when is the Site Object being loaded?
Is it being loaded when clicking on 'winter' in the menu-carousel? Or is it being loaded only after clicking on a gallery in a folder?
Is it being loaded when refreshing the window with F5?

I've got the feeling that the irregular pattern shows itself when the Site Object is not yet loaded.
And what about the effect of shuffle sort in combination with the Site Object?
Just some questions from someone who lacks the technical insight :-)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

01 Feb 2016, 23:57

First of all, thanks for taking the time with this.
Martin wrote:
mjau-mjau wrote:What happens if you first click 'more', and then click 'winter' in the menu-carousel?
1) new browser window
2) clicking on 'more' (so the folder appears)
3) clicking on 'winter' in the menu-carousel
==> regular pattern
I'm a bit confused with this ... "regular pattern" here means correct layout? It seems that means that it "works" also from the menu in this case, if you are on the "more" page before clicking "winter" ... This would insinuate that it is not an issue related to the menu, but possibly related to layout-factors of the current page when clicking "winter". I am trying to figure out the following:

- Is the flaw related to clicking in the menu ...
- Or is the flaw related to "current" page factors, when navigating to the new page.

Btw. Does the layout ALWAYS render correctly when clicking the "winter" item from the folders listing (not menu)?
Martin wrote:What I tried to say, is that in a new browser window only the first time of clicking on 'winter' in the menu-carousel shows this irregular pattern. When I stay in the same browser window I only get regular patterns regardless of what I do. Only after closing this browser window and opening a new one I can show the irregular pattern after clicking on 'winter' in the menu-carousel.
My second remark above is, that when an irregular pattern is seen, it is always the same irregular pattern ... always the same images are sticked together.
Ok, so you only get the corrupted layout ONCE per browsing session? If you re-visit the same page that was previously corrupted, from the menu, it would always display correctly, within the same browsing session?
Martin wrote:Yes, the irregular pattern also shows from the sidebar.
And yes, the irregular pattern also shows when clicking on 'more' in the sidebar and then on 'winter'
So basically, you also get the corrupted layout also when clicking the item in the folders-listing on the "more" page? I thought earlier you said that it works when clicking the "winters" item from the page folders-listing.
Martin wrote:Just a question: when is the Site Object being loaded?
Is it being loaded when clicking on 'winter' in the menu-carousel? Or is it being loaded only after clicking on a gallery in a folder?
Is it being loaded when refreshing the window with F5?

I've got the feeling that the irregular pattern shows itself when the Site Object is not yet loaded.
And what about the effect of shuffle sort in combination with the Site Object?
Just some questions from someone who lacks the technical insight
The site object starts loading a couple of seconds after you first load the application. If the site object is not already loaded when you click an item in the menu, it will load the normal page-object first. After the siteobject is loaded once, unless you make changes from the panel, the siteobject is stored in your html5 "localstorage", and will be available immediately on page load.

I really don't see how this could have anything to do with the corrupted layout. You could disable the preload option and check yourself, but I am pretty sure it will have no effect.
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

02 Feb 2016, 14:59

mjau-mjau wrote:First of all, thanks for taking the time with this.
It's my pleasure... I like puzzles :-)
mjau-mjau wrote:
Martin wrote:
mjau-mjau wrote:What happens if you first click 'more', and then click 'winter' in the menu-carousel?
1) new browser window
2) clicking on 'more' (so the folder appears)
3) clicking on 'winter' in the menu-carousel
==> regular pattern
I'm a bit confused with this ... "regular pattern" here means correct layout?
Yes, that's what it means... after clicking on a gallery in a folder (that is, ignoring the menu-carousel) I cannot recreate the irregular pattern.
And it doesn't matter which gallery in which folder I choose... i.e. when I click on the menu-item 'Places' it's not possible anymore to get the irregular pattern with clicking on 'Winter' in the menu-carousel. Clicking on 'Places' is enough... I do not have to click on a gallgery in this folder.
mjau-mjau wrote: Btw. Does the layout ALWAYS render correctly when clicking the "winter" item from the folders listing (not menu)?

Yes, always
mjau-mjau wrote: Ok, so you only get the corrupted layout ONCE per browsing session? If you re-visit the same page that was previously corrupted, from the menu, it would always display correctly, within the same browsing session?

Well I thought so... but now I noticed that when I keep opening galleries by clicking on a gallery in the menu-carousel some of them are irregular... (this is contrary to what I wrote above... I will test it again tomorrow)
And there's one other thing I noticed: clicking on 'Home' has the same effect as starting a new browser window and that is that clicking on 'Winter' in the menu-carousel gives the irregular pattern again.
mjau-mjau wrote:
Martin wrote:Yes, the irregular pattern also shows from the sidebar.
And yes, the irregular pattern also shows when clicking on 'more' in the sidebar and then on 'winter'
So basically, you also get the corrupted layout also when clicking the item in the folders-listing on the "more" page? I thought earlier you said that it works when clicking the "winters" item from the page folders-listing.
No, I'm talking here about the sidemenu... when clicking on 'more' in the sidemenu the menu expands so that the names of the galleries under 'more' can be seen. And that's when I click on 'winter'. When the window is small so that the sidemenu appears, clicking on 'more' does not show the folders, it only expands the menu. (not that I think that you don't now this, but just to trying make clear what I want to say :-))
mjau-mjau wrote:
Martin wrote:Just a question: when is the Site Object being loaded?
I really don't see how this could have anything to do with the corrupted layout. You could disable the preload option and check yourself, but I am pretty sure it will have no effect.
No, I guess you're right... disabling the preload site object gives the same behaviors....
(off topic: nice to see how much slower my site is without the preload site object :-))
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

03 Feb 2016, 00:45

Sorry, there is still one question I can't find a clear answer to.

When you navigate to the "MORE" page first (from menu), what happens when you then click "WINTER" from the CAROUSEL menu?

If the layout is "irregular", it would mean the issue is likely related to the menu (since it works when clicking the folder item from the same page). If the layout is "regular", it would mean the issue is likely related to the page being viewed before the new page renders (since it works from the "more" page in all cases).
 
User avatar
Martin
Experienced
Topic Author
Posts: 651
Joined: 30 Jan 2011, 23:24

Re: Justified layout still not flawless

03 Feb 2016, 01:08

mjau-mjau wrote:Sorry, there is still one question I can't find a clear answer to.

When you navigate to the "MORE" page first (from menu), what happens when you then click "WINTER" from the CAROUSEL menu?

If the layout is "irregular", it would mean the issue is likely related to the menu (since it works when clicking the folder item from the same page). If the layout is "regular", it would mean the issue is likely related to the page being viewed before the new page renders (since it works from the "more" page in all cases).
When I click on the 'more' page first (from menu), the folder opens. And when next I click on 'winter' in the menu-carousel the pattern is regular. That would mean your second option is in effect: the issue is likely related to the page being viewed.

I will do some more tests with this option in mind.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Justified layout still not flawless

03 Feb 2016, 01:26

That's interesting to know. Perhaps you can check from what pages you get regular vs irregular? It might help us to find a pattern ...