Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nao
5221
Features / Re: Action buttons: positioning
« on May 13th, 2012, 10:19 PM »
It doesn't help much to avoid stuff :whistle:

What do you think of this, generally...?
5222
Features / Re: Action buttons: positioning
« on May 13th, 2012, 10:09 PM »
One solution would be to just position the menu according to $(parent).offset(), but it sucks a bit... Especially when it comes to animating from the right (I can't seem to find a solution for now for this.)

Meh...
I'm not a big fan of positioning according to the offset. I already met many problems with this when I implemented Zoomedia. Although it's not something that's unthinkable... I kinda like the 'simplicity' of Wedge's current menu positioning. (i.e. set 'right' to 0 to make it scroll from the right, etc.)
5223
Features / Re: Action buttons: positioning
« on May 13th, 2012, 09:32 PM »
Okay, so it's a CSS issue... -_-

.mimenu
    position: absolute

Action menu works, user menu fails to show.

.mimenu
    position: relative

Both menus work, but of course as they're relatively positioned, the animations will push other elements aside.
GRMPF...

Reminds me of that IE8 issue I'm having with main menus.
5224
Features / Re: Action buttons: positioning
« on May 13th, 2012, 07:12 PM »
lol. Forgot to add a z-index to minimenus ;) will do soon.
Posted: May 13th, 2012, 06:15 PM

So I fixed that, but I'm still at a loss why User menus aren't working on my iPod while Action menus work just fine... They're using the same code pretty much -- same JS except for a test, where I tried to remove the differences to no avail, and some CSS where I don't see how it's going to make a difference... Safari doesn't report any errors...

Maybe it can be reproduced on a desktop browser. Anyone? Try hovering my user name on the left... You know, 'Nao', if you need the help ;)
5225
Features / Re: New revs
« on May 13th, 2012, 05:14 PM »
rev 1581
(20 files, 30kb -- and THAT's my big commit... Phew! Some files I could have committed separately, but don't push me too far please...)

* Rewrote mini-menus nearly from scratch. The JS code is now nearly twice shorter, and this saves 230+ bytes off the gzipped topic.js file (1200+ bytes uncompressed). It also fixes z-index issues on low-resolution displays, although as of now, it adds a new bug to iOS 4.x (maybe later as well), which I'll work on ASAP. (Display.template.php, topic.js, index.css, sections.css, index.ie6.css, index.ie7.css, sections.iphone.css, Warm/index.css)

* Rewrote large areas of the Display template as well. Most notably, the Action buttons and Likes saw many changes in both template and CSS... And it's still a work in progress. (Display.template.php, PersonalMessage.template.php, index.language.php, index.ie6.css, index.member.css, index.rtl.css, sections.css, index.ie6.css, index.ie7.css)

* Rewrote ignored posts to use shorter, sweeter and simpler markup. The footer gets a generic div around it to hide everything in one go, saving us the need to generate some id's for multiple divs that aren't used otherwise. I could have wrapped everything into the msg_xxx div, but I'm not sure it'd be for the best. Well, it's my "last-minute change" from this commit, so it may very well be breaking something else, and I'll make sure to fix it if this happens... Obviously. (Display.template.php, Post.template.php, index.member.css, index.language.php)

! Fixed ignored posts JavaScript (probably) not working in IE6 on Post pages. (Post.template.php, post.js)

+ Just FYI -- added a $main_font_size CSS variable to help you customize your starting font size in case the font's x-height is really incompatible with Arial. (index.css)

* Some stuff related to this commit or earlier ones (on_time notably), that needs to be applied here too. (MessageIndex.template.php, Post.template.php, Recent.template.php, Xml.template.php)

* Rewrote script.js to save over 50 bytes of data. Makes expandPages a tad slower, but it's still immediate even in IE6 with its lousy JS engine, so why bother? Removed selectText() which is an AeMe-only function (moved it to the Media template which I'll commit as soon as I'm done with its rewrite), etc. Also, the help pop-up feels a bit better now, but it's a matter of taste I guess. (script.js)

* My first use of the universal selector... *sob* I just wanted to say arrivederci to all of these LongWordsThatBreakYourLayoutBecauseYourUsersLikeToPlayWithYourMind. Forever. This won't work in Opera < 10.5, but Opera users are geeks, and they update their lot. (index.css, sections.css)

+ Added some clear visual reminder for your own PMs in Conversation mode. (index.member.css)

+ Added a notenice (will change name later) class to note/warn stuff, because it's not always a neutral or negative notice. (index.template.php, Display.template.php, index.css)

@ Note: it would seem that the main menu is currently buggy in IE8 -- menus pop up at the left, rather than below their parents. It works fine in IE6, IE7 and IE9 and I don't know how to look into this for now... Also, since I removed some of the 'display: table' hacks for topic posts, I need to hack into the hacks I hacked for IE6 to ignore the table hack. Hopefully I won't do a hack job of it...
5226
Features / Re: New revs
« on May 13th, 2012, 01:18 PM »
rev 1580
(14 files, 6kb) -- some of the 'easy' commits I can do separately from the BIG ones... Phew...

! IE 6-8 doesn't like addEventListener, so I moved some data around (and, as always, saved a few bytes in the process.) (sbox.js)

- Rewrote help popup to no longer turn %1$s into $scripturl -- just use <URL> per our standards, or %2$s into the session var -- it works fine without that and wasn't used anywhere. (Help.php, Help.language.php)

! Fixed Aeva bug where embedding would spectacularly fail when at least two videos are embedded in a sentence and Embed in Sentences is disabled. (Aeva-Embed.php)

! Fixed Vimeo embeds to use their new iframe code. (Subs-Aeva-Sites.php)

! Fixed Merge Topics feature failing when selecting another target board (due to a recent rewrite.) (SplitTopics.php, SplitTopics.template.php)

* The error log shouldn't show table headers and error filters if there are no errors to show in the first place... (Errors.template.php)

* Fixed some typos were 'dependant' was use (it's the French spelling, not the English one, at least not for that meaning... I'm counting on everyone to make sure my changes are for the best :)) (ManageNews.php, MangePermissions.php, Modlog.php, SplitTopics.php, Help.english.php, ManagePaid.english.php, PersonalMessage.english.php)
5227
Features / Re: Action buttons: positioning
« on May 13th, 2012, 08:51 AM »
Works well in iOS 4 except the user menu doesn't pop up at all. Odd!
Dragooon, was typing faster yesterday...?
5228
Features / Re: Action buttons: positioning
« on May 12th, 2012, 11:12 PM »
ERR... Where's everyone? ;)
5229
Features / Re: Action buttons: positioning
« on May 12th, 2012, 08:51 PM »
Up... and running :)
Click the Like button if you like better than the old style, lol, it's a mini-poll in itself ;)

:edit: Added screenshots of the 'old' style. Also, do tell me if it doesn't work in a browser... Only tested on Opera 11.64.
5230
Features / Re: Action buttons: positioning
« on May 12th, 2012, 08:49 PM »
So...
Got it done.
It's a bit annoying overall. The extra JS for bug fixing amounts to a hundred gzipped bytes which isn't exactly a victory to me, even though the final JS is still about 220 bytes shorter than the current version.

Also, I had to get rid of the current way I'm showing user names in posts. Currently, it's h4 { overflow: hidden; text-overflow: ellipsis } followed by h4:hover { overflow: visible }, to simplify.
In the new version, it's going to simply be h4 { word-wrap: break-word }, which is an IE proprietary CSS rule that is also working on all modern browsers (the most recent browser that doesn't support it is Opera 10.10, which is like 2 years old anyway). The CSS group renamed it to overflow-wrap or something, but right now everyone uses word-wrap and I don't see it taking off anyway. My main issue with word-wrap is that although it does work (showing long user names on two lines), it also has a 'clear' effect in that it shows the text at the beginning of the next line, rather than to the right of the Online icon. Meh, I'm not a big fan of this way of doing things...

Opinions please. Do you like the new version, or not?

Will upload ASAP. Just compare to your SVN version if you have it installed somewhere. For non-consultants, well... Use your memory :)
5231
Features / Re: Action buttons: positioning
« on May 12th, 2012, 07:33 PM »
Just FYI -- the bug I mentioned that is half-fixed in v1.7 is documented here:
http://bugs.jquery.com/ticket/8685

As they say, the 'only' way to fix it prior to 1.7 is to do away with any animations that use 'show', 'hide' and 'toggle' keywords, i.e. .animate({ something: 'show' }), .show(xxx), .hide(xxx), .slideToggle(), .fadeToggle(), .fadeIn(), slideUp(), etc...
Or, simply not use .stop() on them, or use .stop(true, true) instead of .stop(true)... This is what I did in sbox.js (using .stop(true, true), that is), although at the time I wasn't aware it was a jQuery bug and I implemented that only as a basic workaround.

So, in the end, what I'd need to do to fix it, is get the dimensions, and then call a clear .css() then a clear .animate() setting the dimensions instead of using .show() and .hide()... Let's just say I'm not a big fan of this.

Or I just forget about it, use .stop(true, true) and use .hide() instead of an animated one when the animation is stopped during execution. Meh...
5232
Features / Re: Action buttons: positioning
« on May 12th, 2012, 06:01 PM »
Quote from Arantor on May 12th, 2012, 04:53 PM
I'd stick with 1.4 or 1.5 than 1.7 to be honest - I'm not convinced that a lot of sites are using bleeding edge anyway, but stick with what works with the code they have.
Pretty much, yeah... The only point in going for 1.7 IMHO is the use of .on() and .off() instead of .bind() and .unbind(), which makes it a bit shorter in terms of compression, but OTOH I'm not ready to add 4KB to our main JS requirements just to save a few bytes off the other files... The only argument for it, would be that v1.7.2 is widespread enough to guarantee it's in the cache. Which we can't.
In fact, you mentioned v1.4 which is what we originally had in Wedge (it was the bleeding edge when we started the project), and I think we went from 1.4 to 1.5 after doing tests in 1.6 and noticing a few issues (that were fixed in 1.7)...
At the time, we were expecting later versions to be too big and settled on 1.5 because it didn't feel as 'dated' as 1.4 was... but in reality, 1.4 was never that 'dated', it's actually after 1.4 that it went downhill and into bloatware territory. Starting with the Ajax object rewrite that I really don't need (and frankly, do you know a lot of people who use the deferred object and things like that...?), etc, it sort of became a habit of theirs to add things because they wanted to move on.

Well, it's a bit like CoffeeScript doing some smart things to help with JavaScript notation (like, replacing prototypes transparently with classes, for those who don't know about prototyping, or using "->" for functions), and then adding more things that actually make it more complicated to follow... (like, using => instead of -> to get a cache to 'this'... Okay how's that NOT hacker stuff at this point?! And what about these object definitions where if you define a multi-dimensional array, you have to add a new line between them that is *exclusively* a single comma? How ugly...)

Anyway!!

jQuery 1.4.2 = 24KB
1.4.4 = 26KB, but these 2KB are put to good use. (Some things I actually use like automatic HTML5 data loading, others are speed improvements to things I use a lot.)

1.5.0 = 29KB, adds the Ajax changes which I don't care about, and severe speed improvements for .children(), .prev() and .next(), which I make use of. (It should be noted that they're about 2x faster in 1.5, except for Chrome where they're like 10x faster, but then again speed really matters only on slow devices, like mobile...)

1.5.1/2 = 29KB, mostly fixes bugs... Also from 1.4.4?! Why didn't they release a 1.4.5... :(

So I don't know, we could even go back to v1.4.4 if we wanted, we'd just have to check for extra bugs to fix...
Quote
Having a baseline in Wedge means that everyone has a version that's consistent and will likely work better with plugins as a consequence.
Yup, but that would be an argument (only argument, if anything) for the use of v1.7.x, instead of 1.4 or 1.5...
Quote
As for the other issues, do you feel they're likely to be more or less complicated to fix? (i.e. is it going to be a significant amount of time/effort to fix or would it be better to spend that time elsewhere)
I don't know... I'll look into it again.
Posted: May 12th, 2012, 05:58 PM

Just noticed that even 1.7 has a bug...
If you cut off an animation and restart it in the other direction, it'll work (as opposed to 1.5), but next time it opens, the box shadow gets cut off (probably because of a dynamic overflow:hidden added by jQ somewhere in the process.)
I don't remember seeing this happen in 1.5... Meh.
5233
Features / Re: Action buttons: positioning
« on May 12th, 2012, 04:43 PM »
Okay, I've fixed the biggest bugs I met while doing my rewrites...

The good:
- It looks nice. I'll upload the results on wedge.org before tonight.

The 'I don't know'...
- Whether or not it looks as good as the current version is up to you guys. I have a small preference for the current one, but honestly it adds so many potential issues... When the 'new' version is much shorter in code (nearly 300 bytes saved in topic.js.gz!), as well as closer in concept to the main menu, meaning I can easily look into using the menu code for it later on.

The bad:
- The last remaining bug wasn't a bug of mine, it was a jQuery bug. Actually, the only reason I managed to fix it, is because I read the .stop() documentation on jQuery.com, and found out about the 'bug' they mention about stopping toggler animations. Basically, they're saying that to fix it, you have to switch to jQuery 1.7... Yay.

So, I was thinking... Maybe it's not too bad to add a recent version with 4 extra kilobytes of code to download, because recent versions are likelier to get cached on other sites... But (1) jQuery is not actually used on my 'important' websites, especially not the Google CDN version... (2) even on 'big' sites that use it, they don't always keep up. Heck -- just look at jquery.com, it's referencing version 1.4.2!!! (1.4 is my favorite in terms of size vs feature set, btw, with 1.5 a close second, but 1.4.2 is not even the latest version of the 1.4.x branch!)

So... I don't know, really.
If I don't make the switch, the bug remains, but I suppose one can live with it -- it makes the animations visible when you're quickly hovering a menu parent while not intent on using that menu (e.g. you're moving from one link to another, and that menu happens to be in the way of your mouse cursor...). In jQuery 1.7, the animation stops and disappears as soon as you hover it. In jQuery 1.5, the animation stops then the menu is opened entirely, and it starts to quickly disappear with a hide animation. This is because if I don't open it entirely, it'll lose the toggle state and thus if you come back to the menu, there's a chance it won't open at all as it considers it to be shown already...

Suggestions?
5234
Features / Re: Action buttons: positioning
« on May 12th, 2012, 12:01 AM »
My current local version now sports an arrow like in the main menu. When you open an entry I mean.
It looks pretty nice and adds a closing animation. Still having bugs though. Will upload here tomorrow hopefully.
5235
Features / Re: Action buttons: positioning
« on May 11th, 2012, 08:58 AM »
It's exactly the same, except that the frame doesn't encompass the hovered item :P
Plus, the item is no longer clikable when the menu is opened. I'm not sure why, because there are no z-indexes involved any longer...
I'll try to get done with that, and my huge commit, today.

I'd like for more opinions from other users, too... you CAN post, you know!