Wow, this sparked quite a discussion -- I'm pleased to hear that so many people are interested in reworking MW's skin system to make it better! :-)
As per Tim's request, I've created a branch for this in r62304 and applied the initial patch in r62306. Feel free to check out the branch[1] and submit patches against it -- I've only tested my initial patch against the obvious errors (parse errors, fatals).
[1] http://svn.wikimedia.org/svnroot/mediawiki/branches/SkinSystemRewrite/
Thanks and regards, -- Jack Phoenix MediaWiki developer
On 02/11/2010 02:31 PM, Jack Phoenix wrote:
Wow, this sparked quite a discussion -- I'm pleased to hear that so many people are interested in reworking MW's skin system to make it better! :-)
As per Tim's request, I've created a branch for this in r62304 and applied the initial patch in r62306. Feel free to check out the branch[1] and submit patches against it -- I've only tested my initial patch against the obvious errors (parse errors, fatals).
This is great, just one question though - will "old-style" skins still be supported (for a few versions at least)? I have a dozen or so skins that currently work, it would be an absolute nightmare if I have to upgrade them all when MediaWiki swaps over to this. Perhaps a compatibility layer could be put over the top of the new system to resemble the old.
Conrad
If this is merged after the 1.16 branching, and support for old skins would be dropped from 1.17 on, you'll be able to use the old skinning system up to EOL of 1.16 as a supported version, expected somewhere around March 2011 or a few months later. Should give you ample time to prepare for MediaWiki 1.18 or whatever is the current version then...
Siebrand
-----Original Message----- From: wikitech-l-bounces@lists.wikimedia.org [mailto:wikitech-l-bounces@lists.wikimedia.org] On Behalf Of Conrad Irwin Sent: Thursday, February 11, 2010 3:52 PM To: wikitech-l@lists.wikimedia.org Subject: Re: [Wikitech-l] Skin system rewrite
This is great, just one question though - will "old-style" skins still be supported (for a few versions at least)? I have a dozen or so skins that currently work, it would be an absolute nightmare if I have to upgrade them all when MediaWiki swaps over to this. Perhaps a compatibility layer could be put over the top of the new system to resemble the old.
* Siebrand Mazeland s.mazeland@xs4all.nl [Thu, 11 Feb 2010 16:04:56 +0100]:
If this is merged after the 1.16 branching, and support for old skins would be dropped from 1.17 on, you'll be able to use the old skinning system up to EOL of 1.16 as a supported version, expected somewhere around March 2011 or a few months later. Should give you ample time to prepare for MediaWiki 1.18 or whatever is the current version then...
If I understand correctly, current js2-work branch will be a base for 1.17? Is there any way to make old MonoBook derived skins to be compatible with js2 code? I have lots of them. Actually, since long time skin implementation code was fast but has very non-modular structure with no clear data and visualization separation, no structurized methods for sidebar, tooltips and so on. Templating was done in the far past (CBT) but that probably was considered not efficient enough for heavy load sites. For the efficiency, it should be possible to write a skin generator, where the nice templatable format of skin will be converted to efficient but spaghetti-like PHP code. Also, incremental CSS changes can be made automatically then. I wonder how should I prepare my monobook-derived skins to make them easier to upgrade someday. Dmitriy
Dmitriy Sintsov wrote:
If I understand correctly, current js2-work branch will be a base for 1.17?
No, not really.
Is there any way to make old MonoBook derived skins to be compatible with js2 code?
The js2-work branch doesn't delete anything, it's just a ton of new code.
I have lots of them. Actually, since long time skin implementation code was fast but has very non-modular structure with no clear data and visualization separation, no structurized methods for sidebar, tooltips and so on. Templating was done in the far past (CBT) but that probably was considered not efficient enough for heavy load sites. For the efficiency, it should be possible to write a skin generator, where the nice templatable format of skin will be converted to efficient but spaghetti-like PHP code.
The CBT project included a compiler to PHP. The entire skin was converted to a single expression which, when evaluated, gave you the HTML output. Lots of concatenation and ternary operators were involved. It had a dependency tracker, which allowed you to replace constant parts of the template with literal strings. For instance, you could have it generate and cache a separate PHP file for each user.
The issue with it was that despite all that work and added complexity, the speed improvement was not very impressive.
Also, there was no clear win in any other way either. The skin was just as hard to read, and no easier to customise. Major releases would still have broken most out-of-tree skins. I came out of the project thinking that I had found some nice solutions, but to the wrong problems.
I wonder how should I prepare my monobook-derived skins to make them easier to upgrade someday.
I think that as long as you're thinking in terms of a skin as being an HTML document with some variable interpolation, then you're going to lose this battle. The most robust, version-independent skin changes have proven to be code-based, such as the hook functions or subclassing. The hooks that work best are the ones that are as abstract as possible, distantly related to the HTML.
-- Tim Starling
On Thu, Feb 11, 2010 at 9:51 AM, Conrad Irwin conrad.irwin@googlemail.com wrote:
This is great, just one question though - will "old-style" skins still be supported (for a few versions at least)? I have a dozen or so skins that currently work, it would be an absolute nightmare if I have to upgrade them all when MediaWiki swaps over to this.
Don't old skins subtly break on every release anyway? Especially a release as huge as 1.16. (Not that I think we should break them more than we do, unless necessary.)
Skin system rewrite currently supports old, SkinTemplate/QuickTemplate-based skins. For example, Vector uses SkinTemplate and QuickTemplate and it works well -- but as noted earlier, it won't support some of the new features (SkinAfterSidebar hook and whatever else we may add in the future) until it's rewritten. So no worries, you should have plenty of time to rewrite your skins. :-)
Thanks and regards, -- Jack Phoenix MediaWiki developer
On 02/11/2010 03:28 PM, Jack Phoenix wrote:
Skin system rewrite currently supports old, SkinTemplate/QuickTemplate-based skins. For example, Vector uses SkinTemplate and QuickTemplate and it works well -- but as noted earlier, it won't support some of the new features (SkinAfterSidebar hook and whatever else we may add in the future) until it's rewritten. So no worries, you should have plenty of time to rewrite your skins. :-)
This is exactly what I wanted to hear, thank you for the re-assurance.
Conrad
wikitech-l@lists.wikimedia.org