Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Aaron on April 4th, 2013, 11:01 AM

Title: Wedge.org today
Post by: Aaron on April 4th, 2013, 11:01 AM
This is what Wedge.org looks like to me today... Firefox 20 on Linux, fwiw.
Title: Re: Wedge.org today
Post by: Nao on April 4th, 2013, 11:04 AM
Firefox 20 is supposed to support the flexbox mode by default (i.e. no flags to enable). Isn't it the case in Linux..?

Oh my, I don't know why I've been having so many flex problems since precisely yesterday... Why oh why? Is something up there trying to make me give up on flex...?!
Title: Re: Wedge.org today
Post by: kimikelku on April 4th, 2013, 04:46 PM
Im using firefox 20 on win8 and i have the same problem.
Title: Re: Wedge.org today
Post by: Nao on April 4th, 2013, 04:53 PM
I don't use Firefox stable, but in Aurora (running v21a1, then updated to v21a2), it's working 'as expected'.

However, there IS an issue, but in another topic, but some text overlap. Not related to this one though...

I'm thinking, the world isn't ready for flex yet. I'll just disable it everywhere... <sigh>
I've written an alternative JavaScript function (~60 bytes) that does exactly the same, though. And it works :lol:

It's probably best to use that, instead of wasting my time fighting against windmills.
Title: Re: Wedge.org today
Post by: Nao on April 4th, 2013, 06:21 PM
Hmmm... How annoying.

Although my code worked great 'theoretically', I forgot to take something into account: images... Loading avatars, signatures and attachments will change the post's height over time, so in order to enforce a proper minimum height for posts, we have to do it on $(window).load() as well.

So, here are the various solutions...

- Just do it on DOMContentReady. Pro: it's done quickly, you don't see any changes to the page. Cons: any time you have an image (e.g. an avatar!!) in your post, the proper height is incorrect. So you get the action bar halfway between the bottom of your body, and the bottom of the post. Meh... :-/

- Just do it on Load. Pro: it's accurate. The results are the same as with display: flex, and they work across ALL browsers. Cons: on posts with short messages, i.e. where the function will take full effect, you can clearly see the action bar move to the bottom once the page is loaded. Of course how long it takes depends on the number of images in the page... Wedge has less issues than SMF with that, for instance. But it still needs to load avatars...

- Do it in both places. Pro: it's accurate, and the action bar displacement is less visible. The height of the move roughly matches the height of the current avatar. Con: well, you still get the glitch. Also, it takes 6 more bytes than the Load-only solution.

- Do it nowhere... To hell with action bars in the bottom? (Let's just say, I'm... not a fan of that solution.)

- Do it nowhere, keep doing the flexbox model, and pray that all browsers will end up fixing the ton of bugs they have with it.

- Do it nowhere, and use <table> tags for posts. (Right now, if using the JavaScript solution, Wedge uses display:table, which is supposed to be the same as <table>, but isn't exactly -- display:table doesn't support colspan/rowspan, making it impossible to have a flexible height post body, only the last row is flexible.)

Any comments...?

PS: I'm installing the JS hack on Wedge.org, so you can see in action the effect of the "Do it in both places" solution. Also, executing the function on a full topic page takes about 20 to 50ms, multiply that by two if calling twice, although doing it on .load() will have little to no impact on performance.
Posted: April 4th, 2013, 06:16 PM

(And, of COURSE, it isn't working properly in here... -_- Oh, frak. I'm leaving it as is for now.)
Title: Re: Wedge.org today
Post by: Nao on April 7th, 2013, 07:25 PM
Didn't any feedback on this, so I'll just bump and add an extra one...
Tested the code in Firefox, and it doesn't follow the same standards as Chrome, ah ah... Basically, it's considering 'min-height' to be the same as 'height' (in a table-cell, it should be the reverse!), and on top of that, it completely ignores margins to enforce its maximum height... Bugger.
So, I changed the code to set the height instead of the min-height, and it started working... But broke horrible in Chrome! :lol:

That's a nice one... It looks like I just can't do anything that's cross-browser compatible[1]. Thank you, browser vendors... :-/
 1. Not that I'm particular happy with a JS solution, on the contrary... I very much prefer the flex model for that, but it seems to be even worse when it comes to browser implementation. To think that everyone is considering flexbox to be the holy grail of positioning... My ass!
Title: Re: Wedge.org today
Post by: Arantor on April 7th, 2013, 08:45 PM
The great thing about standards is that there are so many of them >_<