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
2716
Features / Re: More sidebar complications...
« on July 12th, 2013, 12:06 AM »
Quote from Nao on July 11th, 2013, 10:54 AM
all I could think of is to reset the top position of the sidebar to whatever is your current scrollTop position, it's a cop-out, but it might work. It also means that if you accidentally close the sidebar and re-open it, its scroll position will be reset, but... Whatever. Is this something that most people would be interested in, or not..?
Started working on this..... And as expected, it's harder than I hoped.
It's working, though... And it seems 'usable' enough, but I'm having issues with the sidebar when the container page is shorter than it.
Then again, the exact same problem already exists in the current version (just click my user name in mobile mode, and open the sidebar... It'll systematically be shown on top of the footer...), so really, it's not that big a deal.


I'll probably end up reverting a couple of things in the implementation, e.g. the table-to-block override for the sidebar div, hopefully this will help keep the sidebar visible at all times, although people might start wondering why there's empty space in profile pages... (Said empty space being there to prevent the sidebar from overflowing when opened, of course.)
What's best, then..?
2717
Features / Re: New revs
« on July 11th, 2013, 09:06 PM »
rev 2181
(5 files, 4kb)

+ Added a 'like' icon next to the notification popup text for likes. This makes it easier to spot low-priority notifications like these. (Notifications.language.php, index.css)

! Fixed responsive sidebar not resetting correctly in IE + software mode. Oh, the ugly hacks... Well, at least they're not too long. (script.js)

* Finally committing the search popup animation rewrite, which I did months ago, but for some reason never came around to publishing... I mean, it looks better, it doesn't really take more space, perhaps I was simply hoping I'd improve it even more..? (script.js)

! Wedge didn't allow you to use the X link on notifications after they were previewed. That may have been a bit harsh, I think... (script.js)

! IE8 was broken in responsive mode. Yeah, yeah, the usual... (sections.css)
2718
Features / Re: New revs
« on July 11th, 2013, 12:33 PM »
rev 2180 -- owwww, it feels so good committing all of these leftovers...!!
(3 files, 3kb)

+ Rewrote the Ajax indicator, as used in the last few weeks on wedge.org, i.e. very similar to my earlier code for Zoomedia. Need to update Zoomedia to use it, actually... Nice animation and everything, I just can't live without this one anymore. (script.js, index.css, sections.css)

+ Prevent mobile browsers from zooming into input boxes and textareas when tapping them. I hate that, and most people hate it, too. I need to ensure the text size is readable in non-zoom situations though, so it'll probably need more tweaking later. Also, it doesn't seem to work on my iPod. Ah well, if anyone knows why... I personally couldn't care less right now, Android FTW. (script.js)

! A couple of much needed fixes to the notifications popup JS. Honestly, I can't remember what these fixes do, but they work. (script.js)
2719
Features / Re: New revs
« on July 11th, 2013, 12:24 PM »
rev 2179 -- styling, styling, styling...
(6 files, 6kb)

+ Added a top_bar layer to more easily target this area for your plugins, and planning to add one for upper_section later. (index.template.php, skeleton.xml)

* Language flags are now shown in a #flags div, and the random_news block is shown above the linktree, in the main area. This is better for the top bar, as it gives it more breathing space, and makes the random news easier to spot. Finally, since these both are in a div, which should be easier to style. Generally, styling generic tags is a bad idea anyway. (index.template.php, index.css)

! Chrome recently started to fail correctly positioning sub-menu arrows in the main menu, so I rewrote the code to work better. Incidentally, this will also probably help with other browsers. (index.css)

* Tweaked the header text to be smaller on mobile, and try to show the slogan as well. Previously, I didn't even bother with it... (index.css, sections.css)

* Tweaked search box to prevent smaller screens from severely cutting off its associated popup. (index.css, sections.css)

* Language flags are now in a correctly styled #flags div... (index.css)

* Updated Wine and Wuthering to support the new responsive sidebar, still needs some work though. Warm will come later, as I have yet to decide whether I'll commit it entirely or partially (it was largely rewritten months ago.) (Wine/extra.css, Wuthering/extra.css)
2720
Features / Re: New revs
« on July 11th, 2013, 11:59 AM »
rev 2178 -- the dreaded moment... Will it work, or will it break...?
(6 files, 12kb)

+ Okay, I'm finally committing the responsive sidebar rewrite... So, instead of a visible sidebar at the end of the page, you'll be getting a menu button (fixed on mobile devices, or static in the header on desktop browsers), that you can click to show or hide the sidebar. (index.language.php, script.js, index.css, extra.ios.css, sections.css)

* Tweaked responsive mode topics to use all available horizontal space. Seriously, you don't want stupid margins when you're already in a narrow window... (sections.css)

@ Should I target specifically mobile devices (there's a flag for that) when doing the min-resolution media query..? It would save some bandwidth on other devices... (sections.css)

@ You can also dismiss the sidebar with a click/tap outside of it. And on desktop, you can also call the sidebar by clicking the mouse wheel (i.e. middle-clicking), and clicking it again to dismiss it. It won't interfere with proper uses of the middle button to open links in new tabs, but might be a problem otherwise, so I'll need to gather feedback on this...

@ Hardware acceleration is used when available, to show the sidebar. OldIE can't use it, and I'm also forcibly disabling it when the sidebar button HTML is contained within the area that gets scrolled, because the W3C standards call for a new stacking context to be created on a fixed position element, or something to that effect, effectively justifying Chrome's decision to turned fixed elements into absolute elements when their containers are being animated... So, whatever.

@ I had to add a hack for Firefox when it comes to the middle button, not my fault. It won't work perfectly on it, hopefully I can improve that later.

@ This is all barely optimized for size. It adds about 1.3KB unzipped (and even more CSS), and 400 bytes gzipped, which is bad by my standards, but I really couldn't do better for now... And it's already much better than my initial code, which had swipe events and all (see previous commit.)
2721
Archived fixes / Re: Cannot edit own posts.
« on July 11th, 2013, 10:56 AM »
I'm only fixing my own mistakes... Least I can do, really... :^^;:
2722
Features / Re: More sidebar complications...
« on July 11th, 2013, 10:54 AM »
Quote from MultiformeIngegno on July 11th, 2013, 02:40 AM
On iOS 6 if I'm at the bottom of a long page and press the button to open the sidebar, it's blank. I need to go to the top of the page to view the sidebar content. It should be set as position fixed I think.
Nope, nope, nope...

position: fixed is all I did in the beginning, and for several days, until I gave up on it.
It was (position-) absolute hell.

- Earlier versions of iOS don't support it correctly at all. Not that I care, but...
- Mobile devices only implement it half-heartedly, meaning that if you scroll the main screen, you can clearly see the sidebar struggling to keep up, probably because mobile devices implement position: fixed with some kind of JavaScript hack, or at least they refresh the position with a low priority, lower than the main screen's scroll thread, if you know what I mean...
- Scrolling within a fixed-position sidebar with overflow-hidden, while possible (and very much necessary, given that it also holds the main menu), is excruciatingly slow and unresponsive on my Galaxy S3... I can't even begin to imagine how slow it might be on older devices.
- When you reach the end of the sidebar, the browser will then bubble up the scrolling request to the main screen, meaning you find yourself with a static fixed sidebar and a scrolling screen, even though you're attempting to scroll the sidebar itself... It's really unintuitive, and I wrote some code to prevent that, which worked perfectly in desktop browsers, but failed on my S3. I couldn't get it to work, and I tried hard. I actually committed that piece of code to the attic, at the end of the "Unused-swipe.js" file, if anyone wants to look into it, but I'd hold my horses, if I were you...

So, yeah, for all these reasons, I started looking into using position: absolute, and it simply worked better for me... Yes, of course, you end up with empty space if you're at the end of a topic, but I can't help it. I could do something more convoluted, believe me I've thought about it[1], all I could think of is to reset the top position of the sidebar to whatever is your current scrollTop position, it's a cop-out, but it might work. It also means that if you accidentally close the sidebar and re-open it, its scroll position will be reset, but... Whatever. Is this something that most people would be interested in, or not..?

Or am I just trying too hard..? I mean, I guess everyone but me was happy with having the sidebar at the bottom, uh..? I just couldn't take the pressure of properly positioning the elements horizontally, sometimes it just looked so fucking ugly, I wanted an alternative, but I didn't expect it'd take me so long, and for that, I'm not grateful to my own quest for perfection... :-/
 1. When opening the sidebar, calculate the current screen scrollTop position, determine whether the sidebar is shorter than that; if yes, absolutely position the sidebar to the bottom of the screen instead. It's counter-intuitive, and only works 'as intended' if the screen is not more than twice higher than the total sidebar height, otherwise you still end up with empty space when you're opening the sidebar while scrolling in the middle of the page...
2723
Features / Re: More sidebar complications...
« on July 11th, 2013, 10:42 AM »
Quote from Godboko on July 11th, 2013, 12:21 AM
I almost wish there was a persistent bar with notifications, search, and the sidebar. Scrolling to the top for all those neat features is a pity. I am liking the direction thats for sure :)
There was, at one point, such a bar... Actually, I committed a (partial) change to skeleton.xml the other day, to submit a new extra layer, top_bar, which as its name indicates, holds all of the elements that could/would/should be in a persistent top bar. However, after some tests, I gave up on it, for two reasons:

- it's mostly useful on mobile devices, *and* mobile devices are the ones where saving space is a most important matter, so I couldn't make it too big, but if it was too small, it started losing its 'practicality'...

- this one is more technical, but having a persistent bar at the top, takes about 30 to 50px height, and there's no way to tell the browser that this space shouldn't be used, so it actually still keeps showing stuff behind this... For instance, doing "html { margin-top: 50px }" will only add 50px at the top, so... Whatever... And I don't think doing a position fixed would help either, ah ah... Anyway, because the browser still uses that extra space behind the top bar, when you click on a topic link for instance, you're taken to a specific post, right..? Well, this post anchor is shown right behind the top bar... In order to be able to see who wrote the post, you'd have to scroll up. So, I started implementing various ideas, such as using JS to fix that (it sucked), and then using pure CSS to do it -- there was a solution that worked very well, but... Only if the anchor was linked to an empty div or a tag. Or a simple one, but linking it to a <div style="display: table"> would break the table layout, which absolutely SUCKS, even more than the JS solution....

I spent about half a day on this one, and the persistent top-right menu button is the only leftover of this. This *is* the top bar... Yes, the only solution I found to 'fix' the anchor, was to simply not care about it, and show a button that doesn't hide anything. (As it is, in fact, it hides the "expand" button in the header, but I'm assuming it's not a big issue...)

So, if you can find a solution for this, you're welcome to suggest one...!
2724
Features / Re: More sidebar complications...
« on July 11th, 2013, 10:34 AM »
Quote from Arantor on July 11th, 2013, 12:06 AM
We should add this as a rule, that all suggestions must have feedback within an hour and if no feedback is received, just proceed. Same with bug fixes, if no-one says it's got issues inside an hour, assume it's fixed.
I'm assuming that you read all of the forum posts, because you're strong. I don't. Especially if the topic already has a lot of comments. I'll usually keep it for later... I guess @ mentions only solve part of the problem, but... I don't always check out my notifs either, at least until it's working 100%. Yeah, I'm not helping I know... :^^;:
Quote
Also, side bug discovered with infinite scroll on a not-so-huge window, see attached.
Ah, yes, this is because topic.js is using a relatively old version of the code, and I wasn't correctly removing the extra #forumposts layer. I've rewritten the code to work; I'm not using the newer version, because I know for a fact that *this one* is working, while I'm not 100% sure about the latest one, and I don't want to finish my work on topic.js before I'm done on script.js...
2725
Features / Re: New revs
« on July 11th, 2013, 08:54 AM »
rev 2177 -- that time of the month, as Google updated their CDN...
(2 files +2-2, 181kb)

! The global I added in rev 1930 wasn't even the correct one... (I'm guessing the days where people tested new commits are long gone.) For those who forgot, this meant that changing a 8-char-required password to a less-than-8-char password from within the profile area would trigger "needs at least 4 chars". (Profile-Modify.php)

* Updated jQuery to 2.0.3 and 1.10.2. (Load.php, scripts/*)
2726
Features / Re: More sidebar complications...
« on July 10th, 2013, 11:47 PM »
So... Anything left hanging?? Or is it commit-time for me, at last...?
Posted: July 10th, 2013, 11:46 PM

(I'll take it that the complete lack of comments following my iPad fix is the current equivalent of thinking "oh yes it works now" and clicking the "Like" button...? :^^;:)
2727
Features / Re: More sidebar complications...
« on July 10th, 2013, 10:51 PM »
This should be fixed now... I figured out it was a problem with extra.ios.css, and indeed, a lot of this file was deprecated because of the new responsive rules... Meh!

Perhaps I should just drop the file entirely, it seems to work overall without it...
2728
Features / Re: More sidebar complications...
« on July 10th, 2013, 09:30 PM »
Screenshot Pete..?
2729
Archived fixes / Re: Cannot edit own posts.
« on July 10th, 2013, 07:06 PM »
I'm at a loss...

I guess I'll have to create another of those test accounts, and test by FTP etc...
Posted: July 10th, 2013, 05:44 PM

Okay, fixed...
Wasn't a Wedge bug; really, it was a mismatched file, i.e. I'd forgotten to update the Mentions plugin with the new notification code, and it was sending the wrong parameters as a result, hmm........
2730
Features / Re: More sidebar complications...
« on July 10th, 2013, 05:31 PM »
Quote from Arantor on July 10th, 2013, 05:29 PM
iPad 3 / iOS 6.1.3: Sidebar does not disappear entirely, something like 13 pixels remains on the right hand side of the screen.
Ah, yes, I forgot about that one... I have the same on my iPod, and can't figure out why for now...
Did I say how much I hate iOS and XF these days...? :whistle: