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
3616
Bug reports / Re: Mini-menu implementation
« on February 17th, 2013, 03:13 PM »
Quote from Arantor on February 17th, 2013, 02:55 PM
No, I was being flippant. It's a joke from H2G2 about a ship fitted with a device that makes something infinitely improbably and the 'quasi reciprocal nature of the universe' means that something that is supposed to be infinitely improbable is bound to happen almost immediately.
Ah, yes, thoughts to an enthusiastic whale who left us in its prime!

Still, there are two ways to 'fix' the problem if it ever happens...
- Server: just reupload the index.css or script.js files. Or whatever is needed. This will change the number obviously...
- Client: empty file cache... Or, quite simply, don't do anything: chances that if the number is in conflict with an earlier version of the file, it was not 100,000 seconds ago, but 50,000 * 100,000 seconds ago in average, that is once every 158 years... Heck -- if anything, I could simply do a mod on 10,000 because that means potentially means one conflict in average per 1.58 years... And who exactly has a hard drive large enough to keep a cached copy of whatever JS/CSS file on whatever website for 1.58 years..? I don't think any file's filetime in a cache is more than a few weeks. Are there any studies on this..?
Quote
I'm not sure where it would be useful, though. I'm fairly sure that anyone using such buttons would just drop the relevant ul in the first place.
Possibly (probably), but don't forget that we use the Like button in Top Likes stats, and that we had trouble making it show up... With my rewrite, it no longer is a problem. Also, as I managed to save a few bytes instead of it taking an extra 100 bytes as I originally thought, I don't really have another reason to keep these buttons as children of ul.actions any longer.

Oh, BTW, I've come to a point where I'm relatively satisfied with the thought rewrite. Expect a commit today or tomorrow at the latest... :)
3617
Bug reports / Re: Mini-menu implementation
« on February 17th, 2013, 10:44 AM »
Quote from Arantor on February 16th, 2013, 11:56 PM
And you just know that the 1 in 100 chance will come back to bite. Still there's always the clear-file-cache ;)
Not 100 but 100.000... (I don't remember if it's spelled 100,000 or 100.000 in the UK... It's 100 000 in France :P)
Quote
Where would we want to use buttons, exactly?
Anywhere outside of an ul.actions block... Well, I mean I'm sure that plugins would be glad to be able to use them.
Quote
There aren't many places I can think of where this would actually be an issue.
It's a non-issue in the end.
I reverted back and recompiled, and discovered that the code was actually 10 bytes larger than my 'fixed' one...
The reason I'd brought it down by 100 bytes was that at one point, all of the buttons were in their own root class *but* unextended. And a button that just says "background-position" without an actual background to move is pretty much useless... ;)
Quote
And unless the word Android is used elsewhere on the page, it's not going to compress particularly well anyway ;)
Oh, still better than 12 bytes :P
3618
Features / Re: Multiquote
« on February 16th, 2013, 11:24 PM »
Low importance. I tend to use that (and not fight the system) when it's default, otherwise I'd avoid it. I very much prefer to answer all messages one by one, and then doing post merging as needed.

This feature is also potentially incompatible with a threaded representation of the topic, although it could be solved by shoving the QR button/textarea below every single post, and allowing people to reply multiple posts and then click Submit on any post and the other posts would all be sent at the same time. Sounds a bit crazy, though... I guess it's bed time for me :lol:
3619
Bug reports / Re: Mini-menu implementation
« on February 16th, 2013, 11:22 PM »
And there we go again... Plenty of new posts/topic updates... :^^;: And I still haven't had time to catch up with last week's!
Quote from Arantor on February 16th, 2013, 07:11 PM
That sort of makes it difficult to make extensible, which is something I did want to do as well.
Hmm... Well, I guess that one's still doable.

Oh, a funny CSS extensibility issue I had tons of problems with before -- and still do right now.
Remember how our buttons are based on "ul.actions a", because it solves some inheritance issues and also makes it compress better...?
Well, this system added a problem for .unlike_button, because it wouldn't keep the requested background position.

So, what was my stupid idea of the day..?
"Give up on that strange inheritance thing, and use root classes for buttons."
Oh my.
So, I created a 'virtual button' virtual class, which loads the sprite and sets default paddings and height. Because of the paddings, I was forced to inherit all buttons from that virtual class, even those that overwrite the sprite image. First bad thing...
Then, the .more_button would be screwed up. Why? Because it inherits two classes (the virtual button and .upshrinks), and the upshrinks image is defined BEFORE the virtual button... However, it obviously needs the upshrinks image. So, I had to move the virtual button to before upshrinks... More gzipped bytes. -_-

So, right now it SEEMS to be working for everything...
At a cost of over 100 gzipped bytes.

I spent 2 days on JS files to save a hundred bytes and partly counter the impact that moving the .mime plugin to script.js would have on the main JS file. In the end, it's all lost because of that new problem...

I'm tempted to go back to how it was a few hours ago. But it also means dropping the possibility of finally being able to use buttons anywhere, without them having to be inside an ul.actions class...

What do you think?
I realize I'm pretty mental, but at least it means I'm half cured.
Quote
And if you did that you'd erase the 13 bytes of savings. -android-4.0 for example is 12 bytes... and it will only be used once on the page...
12 bytes before compression.
Also, my latest local files save about 8 bytes in the headers compared to the committed one. I achieved that through passing the $latest_date variable through a % 1000000 operation. So it shaves a few chars off the beginning of the date. Each time you're regenerating the cache files, there's one chance out of a million that the filename will conflict with an earlier version of the cache. And one out of one million means that even if it happens, nobody's going to have the previous version in their cache, it'll be long gone (hopefully)... Heck, I could even reduce it to % 100.000 (I think that's what's currently in my local install), it just means it's one chance out of 100.000...

Anyway.
Quote
Non mobiles need a visual cue too...
The '+' button is a better visual clue that whatever there was before...
Quote
Then use the same delay if any as the topic pages.
I think I'm probably going to remove the delay entirely.
3620
Bug reports / Re: Mini-menu implementation
« on February 16th, 2013, 06:51 PM »
- By order of optimization importance: index template HTML, script.js, any other JS file. I'd suggest looking into providing the bare necessary, such as <div id="searchx" data-tid=topicID data-bid=boardID></div>, and then using a cached JS block to suggest a search destination. (Isn't it a good thing that $txt can be cached too by now? :P)

- Mobile is something I strive to look into, but it's not my absolute priority. I did fix something related to this today though, I added 13 bytes of JS to disable username clicks on Android if they're associated with a mini-menu. Fair trade. (..............And here's me thinking about adding browser name/version to JS filenames :lol:)
Anyway, all I can say is, mobiles need a visual clue for a menu, so I guess it's best to show one of the '+' icons and just have the menu show up when hovering these...

- Can't use one delay in a page and no delay in another... :-/
3621
Bug reports / Re: Mini-menu implementation
« on February 16th, 2013, 05:58 PM »
Good then.

Alright, I'm still stuck on mini-menus...
I made my peace with the idea of repositioning the menu horizontally based on the mouse position. While it's very nice if the menu hover area is quite large, when it comes to user names and actions, it makes more sense to have the mini-menu position itself right below the element, rather than a few pixels off to the right or left... (Plus, the shortest code I managed to write for this still took an additional 30 bytes... For just a single line...)
The 'solution' for thoughts is, I suppose, to limit the hover area to somewhere small. Something like an "Actions" button that would show on every line. I don't know... Any ideas..?

I know that this feature rewrite doesn't excite anyone right now (and me even less), but for anyone who's been using the thoughts feature, especially on the homepage, this will have an influence on your perceived enjoyment of it...
Posted: February 16th, 2013, 05:45 PM

Oh, also I'd like to know if you think a delay before opening the mini-menus is good or not...
It doesn't add a lot of bytes, because the code is mostly copied from the main menu stuff, and I added it because I originally had the entire area of the thought list hoverable, so it really looked ugly to have a mini-menu open (and close) for each single thought entry just because I was scrolling through the page and moving the mouse around quickly... I added a 200ms delay, which 'works' nicely there, but is annoying in user name & action menus.
I could either reduce the delay to 50ms or so, or completely remove the code and assume that mini-menus will always be applied only to a limited portion of hoverable content.
3622
Bug reports / Re: Mini-menu implementation
« on February 16th, 2013, 09:06 AM »
If you're working on making use of Sortable in 'public' areas of Wedge......... Please consider using a plugin that doesn't require jQuery UI.
Seriously, I won't give a pass to something that forces people to download jQUI on any public page.
Doing it on a page that's called through the action of a registered member is more acceptable (which is why you had my okay for sorting pinned topics), but it's still something to be careful about.
I haven't been spending an entire day on saving 50 measly bytes in script.js just to have you add 100KB to the lot... :P
3623
Bug reports / Re: Mini-menu implementation
« on February 15th, 2013, 11:13 PM »
My stuff is commit material. It just isn't "proud author" material. You know. This thing you commit not because you like it but because it would probably hurt more not to commit it, and you start wondering if you're committing to show the amount of work you put into the thing before you get to revert it...

Bed time!
3624
Bug reports / Re: Mini-menu implementation
« on February 15th, 2013, 11:09 PM »
Not happy with script size or outcome.
Not happy with thought menu layout vs the buttons we currently have.

Still, it's at least more in line with the current ui.

Tomorrow I'll try to restore alignments because I really like these.we shall see.

I'm so tired of this...
And I haven't even committed my sbox fix, I just realized...

(No one cares anyway. I shouldn't waste my time saving bytes like that... what matters is adding new features.)
3625
Plugins / Re: Custom form (ideas, discussion)
« on February 15th, 2013, 07:26 PM »
Is this feature really something we're missing..?
3626
Features / Re: Bye Bye Recycle Bin?
« on February 15th, 2013, 04:56 PM »
Oh, all right. I thought it mainly meant that you'd solved the performance concern you had, that ultimately ended all of our earlier conversations on the subject... ;)
3627
Off-topic / Re: Strange behavior of jap chars on title="" tooltip
« on February 15th, 2013, 04:55 PM »
Quote from MultiformeIngegno on February 15th, 2013, 04:36 PM
EDIT: I edited my post and when I came back to the topic, the post was unread.. is this by design?
There's a topic about that, like....... right below yours or not far :whistle:
3628
Bug reports / Re: Mini-menu implementation
« on February 15th, 2013, 04:50 PM »
Saved about 50 more bytes by rewriting a large portion of the mini-menu code.

- It no longer requires the bUseDataId param to be set. It'll just 'guess' by itself... (And yes, that saves bytes. Sigh.)
- No longer shows two different animations (depending on the parent's text-align: look here, it isn't the same whether you hover the Action or User menus.) Instead, the animation is done from the place your mouse cursor is, and thus is 'centered' from here. As such, it doesn't need aligning any further...
- Just some generally smarter code, such as storing all CSS and animation variables in a closure rather than in DOM data().
- Doing something I'm a bit ashamed of -- turning some of the $('<div></div>') DOM creators into $('<div>')... Although jQuery considers it 'bad practice' and has to 'fix' the tags afterwards, I'd just like to say that it just doesn't make a single difference for the user... The only difference is that the short version saved me a couple of bytes, so whatever... :P

Current overhead of mime() plugin is 342 gzipped bytes right now.
Which proves that I had my math wrong yesterday!
Also, generation code = exactly 155 bytes now.
3629
Features / Re: Bye Bye Recycle Bin?
« on February 15th, 2013, 01:27 PM »
But this is how I suggested to do it, AFAICR..? Or am I wrong?
3630
Features / Re: Bye Bye Recycle Bin?
« on February 15th, 2013, 11:49 AM »
Yeah, this is one of the things I've always wanted to get rid of... I think we've talked about it for over 2 years now, but Pete wasn't so sure, so I'm just surprised he came up with the actual implementation. ^_^