On 2/10/10 3:50 PM, Platonides wrote:
Aryeh Gregor wrote:
On Tue, Feb 9, 2010 at 8:35 PM, Trevor Parscaltparscal@wikimedia.org wrote:
Merging Monobook and Modern is actually a good point for one of my other ideas, which is to have themes for skins. In other words, same HTML generation, different CSS. Then Monobook and Modern could naturally be merged, Vector could have a different colored version, etc.
I'd still be interested in seeing some differences between Vector and Monobook HTML that are necessary at all. There are a *lot* of small, seemingly gratuitous differences that could be wiped out, like:
- No<div id="globalWrapper"> or<div id="column-content">
- Two empty<div class="noprint"> at the top, also<div id="mw-js-message">
- Lots of extra comments like<!-- sitenotice --> <!-- /sitenotice -->
*<div id="head"> instead of<div id="column-one">, and it has class="noprint"
and so on.
Me too. And that's a good example of the things I'd like to have fixed before 1.16 so we can completely change the way some things were done on vector. Enough code had to be adapted (innecesarily) to vector on wikipedia now. Why force third users to vectorise if we are going to change it back?
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Not all changes made in the HTML output of Vector were made arbitrarily or gratuitously as is being assumed here.
In i18n, you have to be careful about using the same message key in multiple places, because as the context changes in each of those places, the likelyhood of the message being ideal in all situations in all languages decreases. Similarly, relying on identical HTML structure and classification for dissimilar skins is a bad practice to keep scripts and hacks from having to be customized is a fatal mistake. Vector has a distinctly different approach to..
* Navigation structure - the namespaces, variants, views and actions are all separate lists * Right-to-left compatibility - lists are actually generated backwards in RTL modes (look at the personal tools in Monobook in RTL - it's not in the correct order, and in Vector it is, even on IE 5.5) * Search - it's not a portal anymore, it's part of the skin and it's in the top right which has many incompatibilities with layout assumptions made for other skins * Footer structure - Links to places and information like copyright notices are separate lists and rendered differently
These are not "gratuitous" changes in the UI, and the effects they have on the resulting HTML output aren't either.
What happened to column-one and column-content? Well, Vector doesn't layout the same way that Monobook does, and given that styles meant for those IDs were and would continue to be a problem. I took the oportunity to name them more sensibly, and avoided future issues of people putting things in global CSS that obviously belonged in Monobook.css. Look at the revisions to shared.css and you will see allot of things that were moved to skin-specific CSS files that should have never been in the global one.
As to the point of the two empty divs, they are absolutely used, and they are specifically noprint for good reason. The tags area actually:
<div id="page-base" class="noprint"/> <div id="head-base" class="noprint"/>
As for the tag: <div id="mw-js-message" style="display: none;"/> - this is used for the ajax watch and unwatch functionality and is also present on Monobook once you use it. The difference is simply that Vector provides it ahead of time. I didn't do that
Also, Why would you want to print the contents of the head? The printable version of Vector has been carefully crafted. If there's a noprint class somewhere, it's on purpose.
Finally, those comments are useful for debugging purposes. If they are offensive, they can be removed - obviously they have no other functional properties.
Furthermore, if you take a quick look at the revision history of Vector, you can see that we've done all we can to make things compatible with Monobook where it makes sense. http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/skins/Vector.php?view...
So, I hope that answers some of these questions. I'm glad to answer more.
- Trevor