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
5296
Archived fixes / Re: Attachment handler bug
« on April 29th, 2012, 08:45 AM »
Okay, fixed...!
5297
Features / Re: New revs - Public comments
« on April 29th, 2012, 08:21 AM »
Quote from willemjan on April 28th, 2012, 03:06 PM
I'm not sure what you guys have done, but this site allways looked great on my phone. Today well errr lets say it did not. It seems to have shrinked in width or something?
Shrunk where?
There's a default mobile theme. You can change it if you don't like it... But seriously, I don't understand how you could find the desktop version to be more desirable (for an HTC Desire) than the wireless skin, which is precisely geared towards improving readability and usability...
Heck, I can't live without it now.
5298
Features / Re: New revs - Public comments
« on April 29th, 2012, 08:19 AM »
Quote from Arantor on April 28th, 2012, 02:17 PM
Well, it was annoying me that we had about a 1/3 of the area tied up with an almost entirely empty pair of table cells, which were legacy and needed to be moved somewhere.
Then are you annoyed too at the extra space left by the sidebar in long pages...?
(Heck, I could very well set up the sidebar so that it's a float and thus allows the page to extend, but I'm not a big fan of the idea of not letting the user control the maximum width of a post, at least per page...)
Quote
In that case, check the board's configuration and check you set the default ordering correctly ;)
Default ordering? There's default theme, default language, but no default ordering, is there...?
5299
Features / Re: New revs
« on April 29th, 2012, 12:39 AM »
rev 1569
(4 files, 3kb)

! Fixed attachment handler not correctly disabling/re-enabling the file input after going over or below the maximum file limit. (post.js)

+ Added slide animations to adding and deleting attachment files in the post page. This adds 20 bytes of code but I saved over 50 with some optimizations in the same time... (post.js)

* Saving a few bytes, again... (editor.js)

* I don't like redeclaring a local var... Will need to move all that code to a JS file later anyway. (Post.template.php)

* Aligning icons vertically in blog posts. (MessageIndex.template.php)
5300
Archived fixes / Re: Attachment handler bug
« on April 28th, 2012, 10:57 PM »
I'm so obsessed with optimizations lol.
5301
Archived fixes / Re: Attachment handler bug
« on April 28th, 2012, 09:06 PM »
Saved another 14 bytes by converting the this.parentNode stuff with:

Code: [Select]
$(this.parentNode.element).remove();
$(this.parentNode).remove();

It sounds too good to be true, but jQuery allows objects to remove themselves... Any idea why you didn't do it that way, Pete? In case you didn't know it's possible, here's me making sure to spread the word :)
5302
Archived fixes / Re: Attachment handler bug
« on April 28th, 2012, 08:52 PM »
Okay, the disable=false not triggering bug was that it was targetting the wrong input, because of a buggy current_element assignation at the end of the input creation code. (The longer one, not the createFileSelector one.)
Removing it fixed it...
(Plus, as usual -- it saves 32 extra bytes :P)
5303
Archived fixes / Attachment handler bug
« on April 28th, 2012, 03:02 PM »
This is minor but should be fixed because there's code in the implementation that doesn't work as expected.

Reproducing: attach 2 files to a post (let's say there are 4 attachments max), and save.

Edit post again. There are two files in there, let's click to add one.. Done... Click again to add one... Done. The Browse button is still active, even though we technically reached the limit.
Now, go to post.js and do this.checkActive() BEFORE current_element is assigned to element. This fixes the bug.
However, it creates another one -- if you then click Delete to remove one of the files, the Browse button is still disabled. This bug might be due to my rewrite though, as I changed a few blocks in here (which is why I'd rather we discuss this bug than commit something and force me to resolve the conflict, eh eh.)

Anyway, I'm sure it's an easy fix, but I didn't write the code logic so I'm not sure how best to handle it without looking into it very seriously. (And I have to leave for now.)
5304
Features / Re: New revs - Public comments
« on April 28th, 2012, 12:27 PM »
So... About the new blog style...

- I actually liked the earlier one, but that's because I'm crazy, don't worry about me. Mainly, I want the post width to be approx. the same as in display mode, because blog posts can be fine-tuned to the pixel, and it's always best to have a consistent width on them. Of course, I could apply some restrictions by CSS, or simply take from my Noisen templates...
- The view count... Wouldn't it be best next to the reply count? I don't know.
- This is unrelated to the style, but it looks like blog posts are ordered by last answer -- and it actually gives the last post's date as the original post date in the header... (Just have a look at the dev blog :))
5305
Features / Re: New revs
« on April 28th, 2012, 12:12 PM »
rev 1568
(22 files -1, 11kb) (bit in a hurry, hope I didn't screw up anything...)

* Tweaked mini-menu code to make the resulting HTML shorter and avoid outputting empty strings. Note for later: array_map() is super-slow, especially compared to foreach. (Display.php, topic.js)

* Renamed we_prepareScriptUrl to weUrl because I added support for more than just dealing with we_script ($scripturl), and optimized the function (a bit). Also removed aeva_prepareScriptUrl which was unused (probably a SMF1 compatibility leftover.) (index.template.php, Packages.template.php, Post.template.php, SplitTopics.template.php, Themes.template.php, editor.js, mediadmin.js, post.js, register.js, script.js, stats.js, suggest.js, topic.js, up.js)

* I think that periods should be in language files, rather than in the template. Better support for exotic languages... (MoveTopic.template.php, ManageTopics.language.php)

* Removed AeMe feed icon and replaced it with the default one. (images/aeva/feed.png, Media.template.php)

* Saved a few bytes off the ajaxRating function, the wedgeAttachSelect object, the editor object, and various other JS areas. (Media.template.php, script.js, post.js, editor.js)

* Translation. (EmailTemplates.french.php, Login.french.php)

* Commenazi. (Subs-Cache.php)
5306
Archived fixes / Re: Drafts being saved is not shown in QR
« on April 28th, 2012, 10:36 AM »
Ah, the human spammers...

Anyway, Pete -- I checked all ;xml additions, and apart from ajaxRating (which always deals with a long URL that has no chance to fail), it'll always use weUrl()/we_prepareScriptUrl() as a basis anyway.
Ah ah, found a way to get rid of my .charAt... Using .match instead :) (or .test, FWIW... Same bytesize results. Saves over 10 bytes compared to the charAt version, and this in just one line of code, eh...)
5307
Archived fixes / Re: Drafts being saved is not shown in QR
« on April 28th, 2012, 01:39 AM »
So... I did a bit of a (tiny) rewrite to we_prepareScriptUrl(), which is 'the' function that did what I remembered: it takes the script URL and adds a question mark if not there, or a semicolon if a question mark is found.
So I renamed it to the more generic 'weUrl' and added a parameter to specify the original URL. If it's empty, it uses we_script. (Obviously!)
I'm a bit annoyed by the function itself... At some point it uses url.charAt(url.length - 1), when I could use url.substr(-1) (and save 6 bytes off the gzipped size...), but it's not supported in IE (even 10!). So I switched to url[url.length-1] but I remembered that we discussed this at some point and gave up on it because of poor support... However, I just tried in IE6 (emulated in a virtual box) and it frigging works...?!
5308
Archived fixes / Re: Drafts being saved is not shown in QR
« on April 27th, 2012, 09:14 PM »
It's a pretend function you know. You didn't forget anything ;)
5309
Archived fixes / Re: Drafts being saved is not shown in QR
« on April 27th, 2012, 09:01 PM »
Yeah I had a look at your code and, hmm... (sUrl.indexOf('?') > 0 ? ';' : '?') could be replaced by addQMark(sUrl), where we return ? or ; depending on whether ? is in the URL... It'd be a slightly shorter call but I don't know how shorter it would be in the final gzipped code... Probably not at all.
5310
Features / Re: Multiple default skins?
« on April 27th, 2012, 08:52 PM »
Quote from Arantor on April 27th, 2012, 05:55 PM
It certainly feels a bit more natural, especially with the quick edit button there as well. Though having quite a dark line either side of it does break up the post + action bar + signature a bit much.
Yeah but try removing it, and suddenly it's hard to determine whether these icons are part of the post or not...
And removing the bottom line is also a problem.
Quote
The problem with the checkbox where it is right now, it seems like it's just random and out of place.
Maybe we should have a poll about what people think about this change... It's not much work in terms of HTML code, but it's certainly not a trivial change.

@nend> Nope, that's the sidebar... We're talking about the action buttons (Quote, Modify, More...) below the post.

As for what you're suggesting -- it would only be possible if the sidebar contents was smaller than the height of your viewport... Which is hardly going to be the case most of the time...
Heck, that's why I added that subtle gradient in the sidebar. So that you have something to stand for the sidebar when you scroll down too much... And not many websites take balance into consideration :P