New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2175, on July 8th, 2013, 12:05 AM »
rev 2175 -- both of my non-notification, non-sidebar ready-to-commit thingies.
(3 files, 4kb)

* E-mails should now properly prettify Wedge URLs. Also note the new helper function, prettify_urls()! (Subs-Post.php, Subs.php)

! Fixed inden@zi feature to force complete unindenting of all lines that have less space than the amount flagged for removal. (Subs-Template.php)
Re: New revs
« Reply #2176, on July 10th, 2013, 04:04 PM »
rev 2176 -- more non-biggie ones...
(5 files +1, 14kb)

* Moved unread posts calculator to its own helper function, which should help me use it on more pages in the future, I hope... Technically, all you need to send the function is an array of arrays, each containing at least 'is_new' (a boolean flag determining if the topic has new posts), and 'topic' (the topic ID). I could probably restrict the parameter to a simple array of topic IDs, but I wanted the function to be compatible with ssi_recentTopicTitles(), or whatever. (Subs.php, Home.template.php)

! Forgot to move the random_news block to the main content, for Warm. (Warm/skeleton.xml)

+ Added a variable that stores the main content's surrounding padding, which was needed by my (yet uncommitted) script for responsive sidebars. Plus, it's cleaner... I really, really need to add more minor variables like this one, for use in sub-skins. (common.css)

* Moved attic JS files to a new sub-folder, for clarity. (other/attic/scripts/*)

+ Added another JS file to the attic, with two features I wrote for the responsive sidebar and ended up ditching: finger swipe events, and preventing scroll events to bubble up the DOM once the end of the target element is reached, which sadly I couldn't get to work on mobile devices, hmm... (attic/scripts/Unused-swipe.js)

* Commenazi. (Class-CSS.php)
Re: New revs
« Reply #2177, 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/*)
Re: New revs
« Reply #2178, 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.)
Re: New revs
« Reply #2179, 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)
Re: New revs
« Reply #2180, 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)
Re: New revs
« Reply #2181, 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)
Re: New revs
« Reply #2182, on July 15th, 2013, 12:21 AM »
rev 2182 -- skeleton operations.
(5 files, 4kb)

! The skins, they are a'fixing. It's still far from perfect, but then again, what is? (Wine/extra.css, Warm/extra.css, Wuthering/extra.css)

! Skeleton operations should be doable from within the skin.xml, and I swear I thought it was already possible, hmm... Hopefully, I'm not breaking something else in the process. (Subs-Cache.php)

* Noticed that I never committed a primordial change to the Wuthering skin, hmm... Moving linktrees out of the #edge area. Also demonstrates what skin operations are capable of. (Wuthering/skin.xml)
Re: New revs
« Reply #2183, on July 15th, 2013, 12:39 AM »
rev 2183 -- responsive sidebar, reloaded!
(5 files, 5kb)

! Here's hoping I fixed all of the responsive sidebar issues for good... I ended up doing many steps back, and settling on a table layout even in responsive mode. You'll see-- it works fine. (script.js, sections.css)

+ When opening the sidebar in responsive mode, Wedge will attempt to position its content in the most convenient way for you. It's a kind of magic. (script.js)

+ Added left-to-right scrolling for responsive sidebar, when the sidebar is originally shown on the left. Hard-scroll is disabled in these cases, but it shouldn't be much of an issue. (script.js)

@ All of the feature changes above add 500 bytes of JS, but save about 200 bytes of CSS, so it's a fair compromise.

* Increased sidebar width by 20px, because I can. (common.css)

* A few tweaks to Weaving paddings, I'll apply them to other skins later. (index.css)

! Moved Warm's top_bar to its regular place, in an empty version. This should help force the menu button to be visible in Warm, which was not really a given in the first place. (Warm/skeleton.xml)
Re: New revs
« Reply #2184, on July 17th, 2013, 03:46 PM »
rev 2184 -- responsive reload, sidebarred!
(6 files, 7kb)

* More rewrites for the responsive sidebar. (script.js)
  - Sidebar's counterpart should now be found more easily, you don't have to call it with id 'main' or 'offside' anymore.
  - You can now show the sidebar even when zooming in mobile devices, as this limitation was only due to the (removed) swipe gesture.
  - Sidebar showing up should no longer 'bump' the main content by a few pixels; this was due to an outdated use of innerHeight().
  - Hardware acceleration is now also enabled when the sidebar is shown from the left, which wasn't possible before (see the 'transform: none' tweak.)
  - Hardware acceleration detection is now done properly, rather than with browser sniffing. Basically, obscure browsers FTW.
  - Fixed a logic issue with non-hardware mode, but you don't want to know about it, so forget I said anything.
  - More comments around. Comments are good, they allow you to understand what's going on. I hope.

* More tweaks to the sidebar button. (script.js, index.css, sections.css, Wine/extra.css)
  - Added two extra divs to the sidebar button HTML, allowing to customize the bars without playing with border sizes.
  - Moved sidebar button to the beginning of top_bar, rather than the end, allowing for easier placement.
  - Tweaked sidebar button to always keep the same size in mobile devices, whatever the zoom level is.

* Sidebar layout tweaks for Wine and Wuthering. (Wine/extra.css, Wuthering/extra.css)

- Wine doesn't need to move the linktree around, really. (Wine/skin.xml)
Re: New revs
« Reply #2185, on July 18th, 2013, 09:31 AM »
rev 2185 -- outing!
(3 files, 2kb)

! A faulty equation sign change broke the flood management code in late January, and thus people would be forever locked out of Wedge after failing to log in 5 times. How awkward. Thanks to Farjo for being the one to tell me first, and to myself for reproducing, and finally fixing some code I only touched once, long ago. I hate that. (Subs-Login.php)

! Fixed a couple of minor DOM logic issues with the infinite scroll code, although I have yet to determine whether I'm keeping it this way, or rewriting it from scratch, or not caring at all. (topic.js)

* Spacinazi. Long time uh..? (Login2.php)
Re: New revs
« Reply #2186, on July 22nd, 2013, 02:40 PM »
rev 2186 -- the 37.2°C/98°F update[1].
(6 files, 3kb)

! Since it seems that some people at wedge.org still had a buddy_list entry in the form of ",id1,id2" (instead of "id1,id2"), I added a couple of fail-safe functions to force filtering empty users out of the list when being created/modified. Beats me, but at least it should have no influence on performance, on the contrary. array_filter() is probably better than the foreach that was there, hmm... And it's shorter, too. (Profile-Modify.php)

* More fixes to Wuthering. (Wuthering/extra.css)

* Added a margin to the header's upshrink button, so you can see it even in mobile mode. (sections.css)

* Better hack for cross-browser viewport-dependent lengths. (common.css, index.css, sections.css)

! After coming out of responsive mode (e.g. through a window resize), the sidebar contents' position wasn't reset, which it should have been. (script.js)
 1. Actually, I'm a bit of a cheat, most of these were done when it wasn't that hot... :P
Re: New revs
« Reply #2187, on July 22nd, 2013, 06:37 PM »
rev 2187[1]
(2 files, 2kb)

! Forgot to reset $txt on every language test load in getLanguages(), thus making subsequent languages inherit their predecessor's lang_hreflang value if set. Woops... (Load.php)

! Still had some occasional '0' entries in the CSS filenames... This happened when a page was being visited by a bot that didn't declare a compatible browser name in its user agent string. Phew. (Subs-Cache.php)

* Safari 5.1.7 on Windows no longer exhibits the .css.gz/.js.gz issue I'd noticed long ago, but I never found any documentation on when exactly the problem was fixed, so I'll just assume the fix was applied in v5.1, maybe it was 5.0, but who cares. This browser sucks anyway. At least now, recent versions won't bother you as much. (Subs-Cache.php)
 1. Apparently, the heat didn't hit me enough, was able to fix more things...
Re: New revs
« Reply #2188, on July 22nd, 2013, 11:29 PM »
rev 2188 -- 3 times in a day? When you're hot, you're HOT! (© Cat, Red Dwarf)
(5 files, 2kb)

* Admin time remaining's style was hardcoded; rewrote it properly. (Admin.template.php, mana.css)

! admin_time_remaining block is better placed in the top layer (which is its raison-d'être), rather than after the linktree. Seriously. (Admin.php)

! In the Current Theme admin page, some elements were always rendered through Weaving, rather than any skin you might have been using. Did a quick fix for this one, but it tends to demonstrate that if you install another theme, you're bound to have difficulties with their sub-skins. (Load.php)

! More fixes for Wuthering. I'll beat it, one day. I will. (Wuthering/extra.css)
Re: New revs
« Reply #2189, on July 26th, 2013, 04:18 PM »
rev 2189
(6 files, 6kb)

* Rewrote upshrinks code to save space. Long time. This saves about 160 bytes in the final gzipped CSS, and I added a nice little animation for capable browsers. The upshrinks title is also moved to JS, saving this much from all HTML pages, and same for the JS that was originally hardcoded in HTML to call the toggler. Technically, the HTML thing was needed because it has the HTML IDs in it, but I figured that if someone really wants to rename their IDs in new themes, they can simply take the JS code, and add it through add_js() like it originally was, and we're done. Or they could just import the script.js file and rename the IDs in it, but I wouldn't recommend it, really. (index.template.php, script.js, sections.css, upshrinks.png, upshrinks-32bit.png)

! Typo. (Profile.french.php)