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
2476
Features / Re: AJAX Quick Reply
« on September 28th, 2013, 09:51 PM »
Just for the story-- I was at a garage sale today... We made a total of about 70 bucks, about 10 bucks per hour. Considering it took days to prepare the sale, and a $30 investment in material needed for transport, in the end it was horribly not worth it. Plus, we saw an indecent amount of rude[1] passersby who'd just browse through stuff, ask for prices, and leave without saying anything, even after we said hello, thank you, good bye etc...
I hadn't made a garage sale in a few years. I don't think I'll ever have one again. My trashcan is more polite and doesn't force me to stay somewhere for 7 hours with nothing else to do than despair.
 1. And no, that's not because I'm in France........... Oh, wait, maybe it is :P
2477
The Pub / Re: Infinite Scroll
« on September 28th, 2013, 09:45 PM »
So... Infinite scrolling. We meet again.

I just wanted to say something about it.

Really, infinite scrolling is for *static content*. All websites that show infinite scrolling will only do it on items that they know are built in a way to 'accept' being nested into other pages and not corrupting them.

Earlier today, I noticed that the More button was broken in infinite-scrolling-loaded pages. I then realized it was broken by a small change in rev 2262 that fixed infinite scrolling on IE 11, or something... But broke many things everywhere else. So, back to the old code...
Unfortunately, it still doesn't execute some things correctly-- e.g. the code BBC hack for Chrome... And, I'm not exactly sure why.
It also tends to duplicate DOM objects that are modified by JavaScript. For instance, the board selector. I tend to fix these manually. Up until now, the quick edit button would be duplicated; it's no longer the case, but...

It's freaking annoying, knowing that in years from now, some people will just break their teeth on their plugin because it does some modifications to individual posts, and it doesn't play along with infinite scrolling.

I gave another try to the iframe-based version, but it's even worse, really... I should have kept a copy of the 'working' version I had before. Maybe it was fixable. I'm not so sure, right now... What I do know, though, is that it's unrealistic to use that right now.

So, I'm asking again... Guys, do you think the infinite scrolling feature is fantastic enough to guarantee that plugin authors will happily comply with its complicated rules..? Or should infinite scrolling simply, well... Redirect to the previous/next page through insistent mouse wheel scrolling? (i.e. if you scroll down for a second, instead of loading the next page via Ajax and showing it below the current page, it'll simply redirect you to the next page.)
That's the 'chicken' solution, but honestly... It also carries zero issues with it, and when I say zero, I do mean zero...
2478
Features / Re: AJAX Quick Reply
« on September 28th, 2013, 11:57 AM »
Just FYI -- it's a bug in Wedge itself; an undefined constant. It should be defined, though, so this must execute before it's defined, or something... I don't have time to work on Wedge today, I was hoping to have an Internet connection outside where I'm supposed to be but there isn't, so I'm just saying hi while stopping by my house. I'll be back in a few hours... And might be able to fix that. In the meantime, be assured that all your posts ARE sent, they just don't show up without a page refresh.

Also, John -- not crucial or anything, but I've noticed that something like half of your plugin's JS is taken straight from Wedge's infinite scrolling code... Which isn't freely available to use anywhere. It's perfectly fine if you want the plugin to actually be core in Wedge (and I'd love for it to be), but other than that, you just can't release it with a free license. I'm supposed to 'protect' our codebase, otherwise anyone can do anything with it, and I don't want that. Not while I'm deep into the project anyway!

Oh, and to finish: I'm still undecided on whether the infinite scrolling code will use Ajax or an iframe.
iframes are good because they solve all JavaScript issues; they make it more complicated to handle form elements though (it'll mostly be with the moderation checkboxes, so I can add some code to account for them), and auto-resizing when the iframe is resized. (Most people on the net do it by, ahem, resizing after the onload event... Which is silly, because to be very precise, you'll need a setInterval to update it whenever it's needed. So if you're loading 10 pages in one go, it means that, for instance, you'll get 10 events that run on your tab, each fighting to get iframe size data. A one-second interval seems okay, but maybe not in all situations.
Ajax is good because it solves all of the iframe issues... See the pattern? :P But it also causes any JavaScript on the page to be duplicated and executed twice, which causes trouble, just look at the quick board selector which would need fixing.
I think that doing quick reply with an iframe would be best, actually, even if infinite scrolling keeps using Ajax.

But one funny thing... If you send a quick reply on page 5 when there are 10 pages in the topic, will the reply appear on page 5? If yes, if you then scroll down, and trigger infinite scrolling, you'll get your page 10 post lost between pages 5 and 6... ;)

Okay, gotta go, I'm super late...
2479
Features / Re: AJAX Quick Reply
« on September 28th, 2013, 08:07 AM »
Test.
2480
Features / Re: AJAX Quick Reply
« on September 28th, 2013, 07:49 AM »
(Didn't show as working, but obviously worked. Posting this from desktop.)
:edit: There's a JS bug.
2481
Features / Re: AJAX Quick Reply
« on September 28th, 2013, 07:46 AM »
Testing from my s3...
2482
Features / Re: Plugin revs
« on September 27th, 2013, 05:44 PM »
rev 91 -- hey John! I really need to install your plugin here, and then test it... :) Can you open a new topic, maybe..? Or use an existing one.
18 files, 8kb

* first_th removal. (Calendar.template.php, EditHistory.template.php, WedgeDesk.template.php)

* postbg removal. (WedgeDesk-Display.template.php)

* wedge.org update. (WedgeDotOrg.php)

* Minor maintenance. (15 files)
2483
Features / Re: New revs
« on September 27th, 2013, 04:46 PM »
rev 2264 -- how long am I gonna keep posting bug fixes...? :P
(6 files, 5kb)

* Saved 150 bytes by simplifying the moderation strip code. Really. This JS was just too... Afraid of doing something wrong. (topic.js)

* More Quick Edit fixes/changes...

    ! Entities were being shown in plain view. This was due to the recent changes; used to have bodies injected into a string that was then turned into HTML, but I made it faster by first building the DOM object and then injecting the data into it, which jQuery shows verbatim. I needed to also remove entities at the source. (QuoteFast.php)

    ! If a post was longer than the space available to edit it in to begin with, it should already show scrollbars, not just when we reach the limit while editing. (topic.js)

    ! After sending your edit, the post header (subject and modified) wasn't updated at all. This was an old bug I'd say, not related to the recent changes. (topic.js)

    ! Also, the Modified string was incorrectly formatted, due to a structure change in $txt. Well, that's an old one, too... (JSModify.php)

    * Changed the textarea to keep showing the action bar. The jury's still out on this one. It's obviously better to hide it, because more space and everything, but (1) one might still want to immediately delete their post after first trying to edit it, and having to first cancel the edit is annoying, (2) I don't know, I feel it looks more professional that way, or something... (topic.js)

! Forgot to commit a change related to the UTF encoding tweaks from last rev. This also fixes a debug char bug. Not a debug codeblock. Just a character. Really. (Subs-Template.php)

* Harmonizing an underscore into a dash. Yawn. (Subs-Post.php)

* Commenazi. (Subs.php)
2484
Features / Re: New revs
« on September 27th, 2013, 12:52 PM »
rev 2263 -- the leftovers, and some language handling fixes. Oh, and I just found a bug with quick edit (the single quote entities)... Will have to work on that ASAP.
(8 files, 7kb)

! Post-moderation delete button was missing an icon. (index.member.css)

! #new anchors were eaten up by soft-merging. (Msg.template.php)

! Meh. Extra space, not needed, not wanted... (pm.js)

! Okay, I'm adding that silly IE 11 hack I mentioned in passing. Just in case it's also in there in the final release... And it's only a few more bytes, anyway. (topic.js)

! Since jQuery will use entities 'as is' in button values, I had to be more severe and convert named entities to \u strings as well. Works well. (Subs-Cache.php)

* Used the opportunity to convert numeric entities to UTF-8 at language caching time. Again-- it saves bandwidth altogether. (Load.php, Subs-Cache.php)

+ A small addition to loadLanguage, while I'm at it... Ability to force reloading all previously loaded language files, can be useful when doing a language change midway through page load. It's not being used anywhere for now, but it's nice having it around. (Load.php)

* Commenazi. (Class-String.php, Load.php, Subs-Cache.php, ManageLanguages.php)
2485
Features / Re: New revs
« on September 27th, 2013, 12:52 AM »
rev 2262 -- finally, the BIG one! I'm happy with it!
(6 files, 19kb)

+ Committing the changes that now allow Firefox, IE 10 and IE 11 to use the flexbox model to show posts in topics. This is way cool, but wait for the next item in this changelog... (sections.css)

+ A very, very thorough rewrite of the Quick Edit code. While most of it is internal stuff geared at making it cross-browser (and it required many subsequent rewrites over the week), here's what you definitely WILL notice when quick-editing a post:

    + The Cancel button shows up right on top of the Quick Edit button, meaning you can click it without moving the mouse if you quick edited by mistake. Mouse path optimization FTW..?! (topic.js, sections.css)

    + The textarea will no longer show scrollbars (unless it gets very long, in which case I added some code to make them reappear); instead, it will grow and shrink depending on the length of your text. (topic.js, sections.css)

    + Additionally, the window will stay focused on the bottom of your posts, moving to the bottom each time you create a new line; this helps you write an entire book without ever having to scroll. Well, maybe not a book... A novella, maybe. Okay, a short story. What, too long? Kids these days... Okay, you can write "LULZ" just like you used to, it's just the same to me. Nobody's reading these changelogs anyway. (topic.js)

    * Moved the quick edit template string to the topic.js file itself; considering moving the quick edit code to post.js entirely (I think it would be the best place for it, needs checking). This is good for bandwidth, as JS files are cached. (Display.template.php)

    * Simplified QuickModify object, now it only holds a tabindex option, and even then-- I think it'd be safe to remove it entirely. Renamed the object to QuickEdit, too, renamed qm_* classes and functions to qe_*, etc. (Display.template.php, topic.js, sections.css, index.member.css)

    * The Quick Edit button is no longer hardcoded in the HTML, but added through JS, which is easy since there was already a can-mod class per message. I don't really mind about people who disable JS on a daily basis, but they won't dictate how I code my software, uh. (Msg.template.php)

    * The edit area is now a layer that shows up independently of the post itself, fixing a lot of minor animation issues. (topic.js, sections.css)

    * The textarea now has a clear 64KB size limit. Well, I put in 65.500 chars, dunno if it's for the best -- but it's still better than 'infinite', if you catch my drift. (topic.js)

    * The error box is relocated to the lower left of the textarea, and is slightly better styled. (topic.js, index.member.css)

    * Size optimizations. Mostly needed by the fact that the rewrite increased the topic.js filesize by 10%... Which, itself, is mainly due to the inclusion of the QuickEdit template into the JS itself. (topic.js)

* Clearly disabling follow_me on touch devices. That's until I get around to adding some proper skin settings to determine whether you want follow_me to be enabled or not. (topic.js)

* follow_me should also be called on a window resize, in case the padding around user boxes is changed. Which, as it happens, is the case in Weaving, my default skin... (topic.js)

! Fixed follow_me in infinite scrolling mode. (topic.js)

* Ensuring that user boxes can be enlarged vertically through CSS. This was needed by the quick edit rewrite. (topic.js)

* Moved IconList init code to topic.js. Okay, it's just one line... (Display.template.php, topic.js)

* Prioretize (prioritize?) DOM layout fixes over script execution in infinite scrolling; in human words, this means you should no longer have broken CSS in newly loaded posts if a script failed to load/run correctly. (topic.js)

* Slightly changed the attachment area's HTML layout, to make it easier to style (one div per thumbnail, and one p tag per description.) Remove a Firefox hack that was, very certainly, a leftover from the Firefox 3.x era. (Msg.template.php, sections.css)

! Attachments weren't being hidden in ignored posts. (Display.template.php)

! The Restore button icon was missing. (sections.css)

@ If you're curious -- yes, I'm planning to backport my quick edit changes into the main post editor.
2486
Features / Re: New revs
« on September 26th, 2013, 04:43 PM »
rev 2261 -- looked harder -- and found some last files to commit, before the big one.
(7 files, 2kb)

* You can now (plugin, skin, whatever...) add your own credits to the bottom of each page, without having to hack into language files. Beware! If $context['custom_credits'] is abused, I'll add some code to prevent it from getting too large. Push your credits to the credits page, that's where they should be, really. (index.template.php)

* The reqWin animation was a bit too over-the-top when the popup grew in size. Made it a bit more... respectable, say. (index.css)

* On focus, a button should still show some recognizable outline. This week's contribution of mine to accessibility. (index.css)

- Removed a rogue period. Oh, my, now I absolutely need, want to restore it... What's happening to me?! (index.language.php)

- Removed wedge.org-specific code from the index template, at last. (index.template.php)

- Removed a duplicate declaration. Thanks John! (Post.php)

- Removed some hardcoded styles. If these things ever get in the way, well... I'll look into it. There's one remaining in the Display template, but it's scheduled for next commit... (MessageIndex.template.php, Recent.template.php)
2487
Features / Re: New revs
« on September 26th, 2013, 04:33 PM »
rev 2260
(1 file, 5kb)

+ IE 11 is now recognized as supporting flexbox by Wedge. I needed proof, you see... I won't test a lot on it, though, so if it breaks... Deal with it. (Class-CSS.php)

+ Added support for IE 10 flexbox model. Meaning you can now simply use @if can_flex and add your Final Flexbox model code, and it'll automatically run in IE 10 as well, even though it's using the 'Tween model internally. Oh, and yes, just like Firefox, IE 10 now uses flexbox for messages. Self high five! (Class-CSS.php)

+ As one would expect, Firefox, IE 10 and IE 11 now correctly support the flexbox path of the msg skeleton, i.e. tables will no longer killed for the making of a topic. Not that I care, but... Apparently, there's an SPCA branch devoted to tables. (Class-CSS.php)

- Removed indirect support for non-final flexbox models to eliminate some confusion, i.e. if you type 'display: box', it won't be renamed to 'display: -webkit-box' in older Safari, for instance. You'll have to provide the generic suffix. Why? Because I want to encourage the use of the final flexbox model, that is. Since Final and Tween models are now supported transparently in Wess, the only browsers that require manual adjustments are old IE (no support at all) and non-latest Safari/iOS. And if you're using these, you can always upgrade if you want flexbox coolness. (Class-CSS.php)

@ Note: flexbox still doesn't work correctly in the aforementioned browsers at this point, but that's because I'm saving the sections.css rewrite for a later commit. I've still got many things to sort through, before it's committable.
2488
The Pub / Re: Random question
« on September 24th, 2013, 10:35 PM »
Hmmmmmmmmm....
But perhaps then, perhaps it's something to do with the fact that infinite scrolling will need to add that separator anyway..? :P

Nah, who am I kidding... Yeah, it's a bug, there shouldn't be a separator on the last post of every page, and I shan't blame infinite scrolling for that. I somehow remember 'fixing' separators years ago, long before I thought of infinite scrolling, actually...
Okay, so I'm seeing that I'm basing my calculations off id_last_msg, which is a bit silly.

Oh, bugger, I had a quick look, and couldn't find a variable that determines the position in the page... Something based off $counter, or whatever.
Maybe I should just leave all separators in, and count on themers to just NOT style the last one too differently, by targeting it through .sep:last-child, or something...?
2489
Archived fixes / Re: Random patch
« on September 24th, 2013, 10:26 PM »
Thanks, done then.. ;) (Well, you might have seen it, latest rev :P)
2490
Features / Re: New revs
« on September 24th, 2013, 04:08 PM »
rev 2259 -- whatever I can commit separately from my huge upcoming rewrite of the quick edit stuff, really...
(8 files, 5kb)

* Updated msg skeleton to add a new layer (and macro), msg_entry, which holds the exact content that should be kept in soft-merging situations, i.e. post header, body and action bar. The HTML counterpart is a new <article> tag, which is also semantically nice, and makes it a bit faster to soft-merge. (Subs-Template.php, Msg.template.php, macros.xml, skeleton.xml)

- Removing some WIP code that I thought I'd already removed before, but... Whatever. (Subs-Cache.php)

- Removing the footer tag from ignored posts; no need for it, in the end... Can't remember why I thought I'd need it, either. (Msg.template.php)

* Moved some credits out of language files, and into Credits.php, to avoid having to update language files every time something gets changed there. (Credits.php, Who.language.php)