New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2235, on September 2nd, 2013, 04:04 PM »
rev 2235
(5 files, 5kb)

+ Implemented support for template function overrides/befores/afters from within skin files. A simple example: <template name="linktree" params="$position = 'top', $force_show = false" where="override">echo $position;</template> will show 'top' instead of the first linktree, and 'bottom' instead of the second one. The default value for 'where' is 'override', you can also use 'before' or 'after' to create functions that will be executed next to the original, while still inherit the original's parameters. This effectively renders extra themes entirely moot, as you can now do pretty much anything you like with skins. And, dare I say..? Maybe even more. (Subs-Cache.php, Subs-Template.php)

* Changed the radial-gradient fixer to only deal with old WebKit versions. Really, Chrome < 26 is nowhere to be seen by now, so Safari < 6 is what I have in mind. This also suddenly makes the W3C's CSS validator say it's a valid website. Everything little bit helps, eh..? (Class-CSS.php)

* Turned a couple of entities back to UTF8 characters. Saves space... (Admin.template.php, Msg.template.php)

@ I'm working on rewriting skin setting parsing to allow more flexibility with param order...
Re: New revs
« Reply #2236, on September 4th, 2013, 08:44 PM »
rev 2236 -- follooooooow me! (Amiga fans, anyone..?)
(5 files, 5kb)

* Improved the userbox follower to account for IE6 (which we don't really care about) and Firefox (which doesn't support position: relative on table cells, but I applied a workaround), run the code immediately after page load (rather than on the first scroll), and improve performance when the userbox is starting to shimmer into the horizon called the page top. Still needs some work, possibly even a minor rewrite... Also, minor fix in userbox CSS, mostly in IE 6-8. (topic.js, sections.css)

! Fixed a problem with language file paths in plugins. Fix was kindly donated by John/live627, as I currently suck as handling plugin code. Thanks! (ManageLanguages.php)

! Fixed a JS error on media pages when running with IE6. (zoomedia.js)

* Tweaked layout in media pages with IE6. That browser doesn't get any better ahah... (extra.ie6.css)
Re: New revs
« Reply #2237, on September 5th, 2013, 10:04 AM »
rev 2237
(3 files, 2kb)

* Saved nearly 400 ungzipped bytes in JS and about 90 gzipped bytes in follow_me, by doing a near-complete rewrite. It was planned before my earlier commit, but I wanted to keep a SVN copy of the 'safe route', hence the commit. The Firefox hack is gone, as I'm no longer relying on position: relative (making for shorter CSS too), added an IE7 exception because it uses a floated div and I won't bother to calculate the post height rather than user box height just for it. Also, the inner div is no longer named (shorter HTML! I thought about adding it through JS too, but it may be good for skinners to keep it around)... This should be the 'perfect' version of the follow_me feature... (Until I get around to implementing it on horizontal layouts, and maybe add IE7 support, but don't hang onto that.) (Msg.template.php, topic.js, sections.css)
Re: New revs
« Reply #2238, on September 5th, 2013, 11:23 AM »
rev 2238
(1 file, 9kb) (yes, lots of changes in the skin parser.)

+ Implemented a new helper function, wedge_parse_skin_tags, which gives greater flexibility to skin files: (1) the generic 'for' parameter (which skips a tag if it's intended for another platform) is now implemented everywhere. (2) You no longer need to re-use the same complex regex, just pass three parameters: the source string, the tag name, and an array of expected parameters (or a string if there's only one param, or nothing). (3) Return values are now in an associative array. Dealing with $match['value'] or $match['name'] is simpler than the fluctuating $match[1] or $match[3] values. (4) Parameters can now be specified in any order in the tag, and (5) whitespace handling is more forgiving. All of this for the cost of at most an extra millisecond of parsing per page load. Sounds like a good deal...! (Subs-Cache.php)
Re: New revs
« Reply #2239, on September 6th, 2013, 04:59 PM »
rev 2239 -- skin tags.
(5 files, 8kb)

* Rewrote the <css> parser, which was updated by mistake in the last commit (it was a WIP, really). It was tweaked to be closer in spirit to the <code> parser, and allow the inclusion of local CSS files. For instance, <css include="mana"> will load the skins/mana.css file on all your pages, and all its possible satellites. It now also allows multiple files, and does them correctly. Finally, the tag now allows empty content, in case you really only want to add an include. (Subs-Cache.php)

! Renamed <code> to <script>, as it probably makes more sense (I resisted the urge to rename to <js>, dunno why...), and ensured it would also correctly handle multiple includes. (Subs-Cache.php, skin.xml, Wine/skin.xml, Warm/skin.xml, Wuthering/skin.xml)

+ Documented the <template> skin tag in the Warm skin, and updated the rest of the documentation. (Warm/skin.xml)
Re: New revs
« Reply #2240, on September 7th, 2013, 08:43 AM »
rev 2240 -- yay!!
(3 files, 2kb)

+ Finally added hardware acceleration to reqWin popups. This adds 264 (ungzipped) bytes to CSS but removes 269 from JS, so it's a fair trade, and most importantly, it really rocks to have full-page popups show up in a fluid way on my mobile device. It's a treat to see. Just try the media tag help popup on any media item page to see what I mean. Another drawback is that IE 6-9 will no longer show any animation on reqWin, but I just don't care about animations on IE these days; if I ever allow for js files to be compiled with an 'ie' suffix, I'll probably restore the animation code. Fair enough. (script.js, index.css)

! Fixed IE7 showing user boxes on the right by default... I'm not exactly sure why I did that to begin with, but it's true I don't test much with that browser... (extra.ie7.css)
Re: New revs
« Reply #2241, on September 7th, 2013, 05:13 PM »
rev 2241
(4 files, 3kb)

! Blog bug: post date in message index was taken from the latest comment, rather than the blog post itself. (MessageIndex.php, MessageIndex.template.php)

* A few CSS tweaks... radial gradients don't need to specify 'farthest-corner' as it's the default; most browsers fully support HTML5 these days so I'm not wasting bytes re-defining the new block elements; IE6 has always been bad at handling word-wrap, so I'm attempting to disable it for it. (index.css)

* Parenazi. (sections.css)
Re: New revs
« Reply #2242, on September 9th, 2013, 07:28 PM »
rev 2242 -- yeah, I'm nearly finished with HW acceleration...
(6 files, 8kb)

* Updated Zoomedia to use hardware acceleration. This adds 100 gzipped bytes to the CSS file, and 25 to the JS file. (zoomedia.js, zoom.css)

! Start animation for zooms is now pixel-perfect; previously, it wouldn't take the parent <img> tag's padding into account. Yes, that contributed to the JS size increase, too. (zoomedia.js)

- Removed (mostly due to aforementioned rewrite) the ability to set the animation speed in Zoomedia; just trust the author on this. I may restore it in the future, in case I start relying on AnimationEvent, but it's not supported before IE 10, and I can't be bothered to write more fallback code for now. (Aeva-Gallery2.php, Aeva-Subs-Vital.php, Media.language.php)

* I was hoping to save bytes, but I had to rewrite many things due to how CSS animations are handled (most notably the description area, which still has a glitch when there's no description at all in some cases). jQuery certainly made my life simpler back in the day, but it's unable to do hardware stuff, so... Here we are. We also lose animations in oldIE, but the rest still works, and the 'preview to full' animation is still done with jQuery for now, so that animation remains. I'm doing all of this in a separate commit, in case I decide to revert later. The main issue is that performance is only increased moderately (10 to 50%, usually about 20%); transitions reached their limit here, so I'm halfway through rewriting to use compounded transforms, instead of a compounded transition. It's still buggy, so it'll come next.
Re: New revs
« Reply #2243, on September 12th, 2013, 11:28 AM »
rev 2243 -- woohoo, 2242 got my first Like on the New Revs topic in weeks... :P
(4 files, 5kb)

! Fixed a Firefox bug where the $().offset() setter will take CSS scale() into account, instead of applying the transform on top of the object's default coordinates. It all seems very complicated, but the reality of it is that the Ajax loader was off by a dozen pixels instead of being centered on the requested element. (script.js, index.css)

! Fixed a bug of mine, still in the Ajax loader, where it was, again, off by a few pixels, this time because of internal padding. I never left the loader on long enough to notice, but it was there all the time. (script.js)

! The index CSS wasn't updated to use the can_animate pseudo-constant for keyframe definitions. Also simplified the constant. Well, just a bit. An unneeded part... (Class-CSS.php, index.css)

* Tweaked Ajax loader to get it closer to the Zoomedia spinner, so that I can remove the latter later (latter later?!). Also improved Ajax loader internal alignment on Chrome and Firefox; it's still far from perfect in IE, but I've spent enough time on IE this week... ¬_¬ (common.css, index.css)

* Restoring some documentation and code I committed in rev 2214 by mistake. Well, once again, looks like nobody ever checks my code... Although I have no idea how I came to cherry-pick these. I tend to be very careful these days, and keep my WIP to a minimum. (index.css)
Re: New revs
« Reply #2244, on September 12th, 2013, 11:54 AM »
rev 2244 -- Zoomedia! The final rewrite! I'm not touching this again for a while, I'm telling you!
(4 files, 14kb)

* And here it is... The new Zoomedia! Fully hardware-accelerated, way faster than in the previous rev (60 FPS on mobile, when it used to be ~10 FPS before); it's damn close to pixel perfection, I killed all of the bugs I could find (and believe me, there were tons of them), and guess what-- it also restores the software animation on old browsers, and makes it much faster than before, too. I also documented some of my code, because I got lost in my own, and I only wrote it a few years back, so I added warnings here and there about why I did things that way and not another... Cross-browser compatibility *really* is a bitch, I'm telling you. I worked exclusively on that for two straight days. (zoomedia.js, zoom.css)

* Zoomedia items will now adapt to the current viewport, rather than screen size. Good if you're in zoom mode. (zoomedia.js)

* You can now freely set a custom Zoomedia animation speed in zoom.css (or, better, a custom file of yours); the JS will detect it. If HW isn't available, Zoomedia falls back to a 500ms regular animation. (zoomedia.js, zoom.css)

* Zoomedia now uses the default Ajax loader, and as such no longer needs some of the related stuff. (zoomedia.js, zoom.css, Media.language.php)

! Fixed thumbnail description showing up on top of the popup during its animation process. (zoomedia.js, zoom.css)

! Fixed popup centering when it's adapted to fit the screen size. (zoomedia.js)

- Removed the noScale option. Zoomedia isn't, and never planned to be, a perfect reproduction of Highslide. (Which, BTW, is now officially much slower than Zoomedia... :P) (zoomedia.js)

- Forgot to remove the previously deprecated 'duration' setting from the JS file itself. (zoomedia.js)

@ There was a strange bug in IE 6-9 that I never got to fix, where doing $zoom.height('auto') at one point would be randomly ignored (!), thus NOT removing the CSS height value. I really couldn't fix it, so instead I added a workaround by forcing the same operation again after the end of the subsequent animation; this effectively made things whole again.

@ My code to detect support for transitions and transforms is basically three lines. I'm totally proud of it. I could have shortened it even more by removing the parens, but it turned out that it doesn't even save a gzipped byte, so I figured it'd be best to keep it readable.

@ I added, commented out, my 'funny animation' code. I still haven't figured out whether it should be selectable. It's cool, but I'm not sure.
Re: New revs
« Reply #2245, on September 12th, 2013, 04:34 PM »
rev 2245 -- the joys of CSS...
(5 files, 4kb)

! Fixed blog homepage (MessageIndex) when viewed in responsive mode. Fought on this for many days, until I realized a simple instruction would fix it, one I hadn't used in a couple of years I think... Anyway, it's always amusing that specifying for something to be 'fixed' will actually make it 'flexible', but you know how it is... ;) (sections.css)

! IE also needs two extra tweaks for Aeva embed responsiveness. Not Chrome, go figure. Didn't test elsewhere. (media.css)

! Zoomedia popups were incorrectly centered in desktop browsers. That's because window.innerWidth includes the scrollbar, which we don't want. Hopefully, just going for the minimum value between window.innerWidth and win_width should fix it all. (zoomedia.js)

! Fixed sidebar margins in Wuthering. (Wuthering/extra.css)

! Fixed last-minute inheritance bug in Zoomedia. (zoom.css)

* Spacinazi. Well, maybe one day I'll do it the other around and remove all of those extra linebreaks, whatever... Just lemme be misunderstood. (sections.css)
Re: New revs
« Reply #2246, on September 12th, 2013, 04:43 PM »
rev 2246
(2 files, 1kb)

! Fixed invalid HTML on Aeva embeds (repeated style attribute). Sometimes, I'm at a loss in front of my old code... (Subs-Media.php)

! Fixed 'code' and 'html' tags being completely broken when within a post that also contains an embed; this was due to a wrong preg_replace_callback conversion last month. It didn't break one of the posts in the blog, I guess I'd forgotten to upload the modified file at the time, or something... (Subs-Media.php)

- Removed the Packages folder. I don't think anything else was using it, at that point... (Subs-Package.php, Packages/*)
Re: New revs
« Reply #2247, on September 12th, 2013, 04:43 PM »
rev 2247
(1 folder, 1kb)

! For some reason, the Packages folder didn't get deleted at all. (Packages/*)
Re: New revs
« Reply #2248, on September 13th, 2013, 01:24 PM »
rev 2248 -- plenty of nice little things. C'mon, like this one! :P
(10 files, 6kb)

+ The 'zoom' link on Zoomedia popups now behaves like a double-click on the image itself, i.e. it opens it on the same page. (zoomedia.js)

+ IE6 will now properly support all min-height rules in CSS files. It's actually very helpful, from what I can see. (Class-CSS.php)

* I've finally found the 'correct' way to properly align background-integrated icons with the text they're shown next to (as long as said text is not too small.) I don't see myself doing it on every single icon though, but I'll at least give it a try for feed icons. (Boards.template.php, Media.template.php, Memberlist.template.php, attic/Custom.template.php, sections.css, Wine/extra.css)

* Added flexbox layout to media item pages. Although it looks better than before ('on supporting browsers'), I'm starting to think that this layout is getting old, and should be replaced with something simpler, with just some floated elements. (Media.template.php, media.css)
Re: New revs
« Reply #2249, on September 13th, 2013, 10:05 PM »
rev 2249
(2 files, 1kb)

! Fixed invalid HTML in blog homepages. (MessageIndex.template.php)

! Fixed message anchor targets being off by a few pixels. (Msg.template.php)