r52414 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52413‎ | r52414 | r52415 >
Date:21:10, 25 June 2009
Author:catrope
Status:ok
Tags:
Comment:
Revert r52410 (Put the [edit] link after the section header instead of before, and don't right-float it anymore) for now because of unresolved issues
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)
  • /trunk/phase3/skins/chick/IE60Fixes.css (modified) (history)
  • /trunk/phase3/skins/chick/main.css (modified) (history)
  • /trunk/phase3/skins/common/cologneblue.css (modified) (history)
  • /trunk/phase3/skins/common/common_rtl.css (modified) (history)
  • /trunk/phase3/skins/common/oldshared.css (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/common/wikistandard.css (modified) (history)
  • /trunk/phase3/skins/modern/rtl.css (modified) (history)
  • /trunk/phase3/skins/monobook/IE60Fixes.css (modified) (history)
  • /trunk/phase3/skins/monobook/IE70Fixes.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/rtl.css (modified) (history)
  • /trunk/phase3/skins/simple/main.css (modified) (history)
  • /trunk/phase3/skins/simple/rtl.css (modified) (history)
  • /trunk/phase3/skins/vector/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/chick/IE60Fixes.css
@@ -70,6 +70,7 @@
7171 width: 96%;
7272 }
7373
 74+div.editsection,
7475 #catlinks,
7576 div.tright,
7677 div.tleft {
Index: trunk/phase3/skins/chick/main.css
@@ -41,36 +41,34 @@
4242 margin: 0.2em 0 0.2em 0;
4343 }
4444
45 -/* Headers */
46 -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
47 - color: black;
48 - background: none;
49 - margin: 0;
50 - border-bottom: 1px solid #aaa;
 45+h1, h2, h3, h4, h5, h6 {
 46+ color: Black;
 47+ background: none;
 48+ font-weight: normal;
 49+ margin: 0;
 50+ padding-top: 0.5em;
 51+ padding-bottom: 0.17em;
 52+ border-bottom: 1px solid #aaaaaa;
5153 }
52 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
53 - border-bottom: none;
54 -}
55 -h1, h2 {
 54+.editsection {
5655 font-weight: normal;
5756 }
5857 h1 { font-size: 188%; }
 58+h1 .editsection { font-size: 53.2%; }
5959 h2 { font-size: 150%; }
 60+h2 .editsection { font-size: 66.7%; }
 61+h3, h4, h5, h6 {
 62+ border-bottom: none;
 63+ font-weight: bold;
 64+}
6065 h3 { font-size: 132%; }
 66+h3 .editsection { font-size: 75.8%; }
6167 h4 { font-size: 116%; }
 68+h4 .editsection { font-size: 86.2%; }
6269 h5 { font-size: 100%; }
6370 h6 { font-size: 80%; }
 71+h6 .editsection { font-size: 125%; }
6472
65 -/* To replicate the old padding, where h# were block-level elements and edit
66 - * links were floated, we need to multiply .5em top padding and .17em bottom
67 - * padding by the header text sizes. */
68 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
69 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
70 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
71 -.mw-h4 { padding: .58em 0 .20em; }
72 -.mw-h5 { padding: .50em 0 .17em; }
73 -.mw-h6 { padding: .40em 0 .14em; }
74 -
7573 ul {
7674 line-height: 1.5em;
7775 margin: 0.3em 0 0 1.5em;
Index: trunk/phase3/skins/monobook/rtl.css
@@ -40,6 +40,11 @@
4141 float: right;
4242 clear: right;
4343 }
 44+.editsection {
 45+ float: left;
 46+ margin-right: 5px;
 47+ margin-left: 0; /* bug 9122: undo default LTR */
 48+}
4449 /* recover IEMac (might be fine with the float, but usually it's close to IE */
4550 *>body .portlet {
4651 float: none;
Index: trunk/phase3/skins/monobook/IE60Fixes.css
@@ -85,6 +85,7 @@
8686 width: 96%;
8787 }
8888
 89+div.editsection,
8990 #catlinks,
9091 div.tright,
9192 div.tleft {
Index: trunk/phase3/skins/monobook/IE70Fixes.css
@@ -69,6 +69,7 @@
7070 }
7171
7272 /*
 73+div.editsection,
7374 #catlinks,
7475 div.tright,
7576 div.tleft {
Index: trunk/phase3/skins/monobook/main.css
@@ -112,34 +112,32 @@
113113 margin: .2em 0 .2em 0;
114114 }
115115
116 -/* Headers */
117 -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 116+h1, h2, h3, h4, h5, h6 {
118117 color: black;
119118 background: none;
 119+ font-weight: normal;
120120 margin: 0;
 121+ padding-top: .5em;
 122+ padding-bottom: .17em;
121123 border-bottom: 1px solid #aaa;
122124 }
123 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
124 - border-bottom: none;
125 -}
126 -h1, h2 { font-weight: normal; }
127125 h1 { font-size: 188%; }
 126+h1 .editsection { font-size: 53%; }
128127 h2 { font-size: 150%; }
 128+h2 .editsection { font-size: 67%; }
 129+h3, h4, h5, h6 {
 130+ border-bottom: none;
 131+ font-weight: bold;
 132+}
129133 h3 { font-size: 132%; }
 134+h3 .editsection { font-size: 76%; font-weight: normal; }
130135 h4 { font-size: 116%; }
 136+h4 .editsection { font-size: 86%; font-weight: normal; }
131137 h5 { font-size: 100%; }
 138+h5 .editsection { font-weight: normal; }
132139 h6 { font-size: 80%; }
 140+h6 .editsection { font-size: 125%; font-weight: normal; }
133141
134 -/* To replicate the old padding, where h# were block-level elements and edit
135 - * links were floated, we need to multiply .5em top padding and .17em bottom
136 - * padding by the header text sizes. */
137 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
138 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
139 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
140 -.mw-h4 { padding: .58em 0 .20em; }
141 -.mw-h5 { padding: .50em 0 .17em; }
142 -.mw-h6 { padding: .40em 0 .14em; }
143 -
144142 ul {
145143 line-height: 1.5em;
146144 list-style-type: square;
Index: trunk/phase3/skins/modern/rtl.css
@@ -3,6 +3,12 @@
44 unicode-bidi: embed;
55 }
66
 7+.editsection {
 8+ float: left;
 9+ margin-right: 5px;
 10+ margin-left: 0; /* bug 9122: undo default LTR */
 11+}
 12+
713 /* Fix alignment */
814 .documentByLine,
915 .portletDetails,
Index: trunk/phase3/skins/common/cologneblue.css
@@ -83,6 +83,7 @@
8484 font-family: Verdana, Arial, sans-serif;
8585 font-size: 180%; line-height: 21pt;
8686 }
 87+h1 .editsection { font-size: 55.6%; }
8788 h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
8889 #article p.subtitle {
8990 color: #666666; font-size: 11pt; font-weight: bold;
@@ -95,6 +96,6 @@
9697 a.printable { text-decoration: underline; }
9798 a.stub, #quickbar a.stub { color:#772233; text-decoration:none; }
9899 a.new, #quickbar a.new { color: #CC2200; }
99 -.mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
 100+h2, h3, h4, h5, h6 { margin-bottom: 0; }
100101 small { font-size: 75%; }
101102 input.mw-searchInput { width: 106px; }
Index: trunk/phase3/skins/common/common_rtl.css
@@ -18,6 +18,10 @@
1919 margin-right: 1.4em;
2020 margin-left: 0.4em;
2121 }
 22+.editsection {
 23+ float: left;
 24+ margin-right: 5px;
 25+}
2226 div.tright, div.floatright {
2327 clear: none;
2428 }
Index: trunk/phase3/skins/common/wikistandard.css
@@ -27,12 +27,18 @@
2828
2929 h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
3030 font-size:150%; }
 31+h1.pagetitle .editsection { font-size: 66.7%; }
3132 h2 { font-size: 120%; }
 33+h2 .editsection { font-size: 83.3%; }
3234 h2, h3, h4, h5, h6 { margin-bottom: 0;}
3335 h3 { font-size: 106.25%; }
 36+h3 .editsection { font-size: 94.1%; }
3437 h4 { font-size: 103.125%; }
 38+h4 .editsection { font-size: 97.0%; }
3539 h5 { font-size: 100%; }
 40+h5 .editsection { font-size: 100%; }
3641 h6 { font-size: 95%; }
 42+h6 .editsection { font-size: 105.3%; }
3743 hr.sep { color:gray;height:1px;background-color:gray;}
3844 p.subpages { font-size:small;}
3945 p.subtitle { padding-top: 0; margin-top: 0;}
Index: trunk/phase3/skins/common/oldshared.css
@@ -4,6 +4,28 @@
55 * CologneBlue, the old pre-Monobook skins
66 */
77
 8+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
 9+ TR/CSS21/sample.html> to make sure the editsection links scale right */
 10+
 11+h1 { font-size: 2em; }
 12+h2 { font-size: 1.5em; }
 13+h3 { font-size: 1.17em; }
 14+h5 { font-size: .83em; }
 15+h6 { font-size: .75em; }
 16+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
 17+
 18+/* Now the custom parts */
 19+
 20+/* Make edit sections (which are inside h# tags) normal-sized */
 21+.editsection {
 22+ font-weight: normal;
 23+}
 24+h1 .editsection { font-size: 50% }
 25+h2 .editsection { font-size: 66.7% }
 26+h3 .editsection { font-size: 85.5% }
 27+h5 .editsection { font-size: 120% }
 28+h6 .editsection { font-size: 133% }
 29+
830 #footer { clear: both }
931 /* images */
1032 div.floatright { float: right; clear: right; margin: 0 0 1em 1em; }
Index: trunk/phase3/skins/common/shared.css
@@ -23,6 +23,12 @@
2424 background-color: #fcfcfc;
2525 }
2626
 27+/* Edit section links */
 28+.editsection {
 29+ float: right;
 30+ margin-left: 5px;
 31+}
 32+
2733 /**
2834 * File histories
2935 */
Index: trunk/phase3/skins/Vector.php
@@ -496,7 +496,7 @@
497497 <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
498498 <!-- /sitenotice -->
499499 <!-- firstHeading -->
500 - <div class="mw-h1 firstHeading"><h1><?php $this->html('title') ?></h1></div>
 500+ <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
501501 <!-- /firstHeading -->
502502 <!-- bodyContent -->
503503 <div id="bodyContent">
Index: trunk/phase3/skins/simple/rtl.css
@@ -40,6 +40,11 @@
4141 float: right;
4242 clear: right;
4343 }
 44+.editsection {
 45+ float: left;
 46+ margin-right: 5px;
 47+ margin-left: 0; /* bug 9122: undo default LTR */
 48+}
4449 /* recover IEMac (might be fine with the float, but usually it's close to IE */
4550 *>body .portlet {
4651 float: none;
Index: trunk/phase3/skins/simple/main.css
@@ -1,3 +1,26 @@
 2+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
 3+ TR/CSS21/sample.html> to make sure the editsection links scale right */
 4+
 5+h1 { font-size: 2em; }
 6+h2 { font-size: 1.5em; }
 7+h3 { font-size: 1.17em; }
 8+h5 { font-size: .83em; }
 9+h6 { font-size: .75em; }
 10+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
 11+
 12+/* Now the custom parts */
 13+
 14+/* Make edit sections (which are inside h# tags) normal-sized */
 15+.editsection {
 16+ font-weight: normal;
 17+}
 18+h1 .editsection { font-size: 50% }
 19+h2 .editsection { font-size: 66.7% }
 20+h3 .editsection { font-size: 85.5% }
 21+h5 .editsection { font-size: 120% }
 22+h6 .editsection { font-size: 133% }
 23+
 24+
225 #toolbar {
326 display: none;
427 }
@@ -63,22 +86,11 @@
6487 }
6588 p img { margin: 0; }
6689
67 -.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
68 - margin: 0;
 90+h1, h2, h3, h4, h5, h6 {
 91+ margin: 0;
 92+ padding-top: 0.5em;
 93+ padding-bottom: 0.17em;
6994 }
70 -/* To replicate the old padding, where h# were block-level elements and edit
71 - * links were floated, we need to multiply .5em top padding and .17em bottom
72 - * padding by the header text sizes. We assume the W3 recommendations are
73 - * used: 200%, 150%, 117%, 100%, 83%, 75% size in that order
74 - * <http://www.w3.org/TR/CSS21/sample.html>. If not the padding may be margin-
75 - * ally off. */
76 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
77 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
78 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
79 -.mw-h4 { padding: .58em 0 .20em; }
80 -.mw-h5 { padding: .50em 0 .17em; }
81 -.mw-h6 { padding: .40em 0 .14em; }
82 -
8395 fieldset {
8496 margin: 1em 0em 1em 0em;
8597 padding: 0em 1em 1em 1em;
@@ -183,7 +195,7 @@
184196 border: solid 1px black;
185197 }
186198
187 -.firstHeading, .mw-h2 {
 199+h1.firstHeading, h2 {
188200 border-bottom: solid 1px black;
189201 }
190202 #bodyContent a[href ^="http://"],
@@ -371,5 +383,10 @@
372384 display: none;
373385 }
374386
 387+.editsection {
 388+ float: right;
 389+ margin-left: 5px;
 390+}
 391+
375392 .templatesUsed { margin-top: 1.5em; }
376393
Index: trunk/phase3/skins/vector/main.css
@@ -593,38 +593,45 @@
594594 }
595595
596596 /* Structural Elements */
597 -.mw-h1,
598 -.mw-h2,
599 -.mw-h3,
600 -.mw-h4,
601 -.mw-h5,
602 -.mw-h6 {
 597+h1,
 598+h2,
 599+h3,
 600+h4,
 601+h5,
 602+h6 {
603603 color: black;
604604 background: none;
 605+ font-weight: normal;
605606 margin: 0;
 607+ padding-top: .5em;
 608+ padding-bottom: .17em;
606609 border-bottom: 1px solid #aaa;
607610 width: auto;
608611 }
609 -.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 612+h1 { font-size: 188%; }
 613+h1 .editsection { font-size: 53%; }
 614+h2 { font-size: 150%; }
 615+h2 .editsection { font-size: 67%; }
 616+h3,
 617+h4,
 618+h5,
 619+h6 {
610620 border-bottom: none;
 621+ font-weight: bold;
611622 }
612 -h1, h2 { font-weight: normal; }
613 -h1 { font-size: 188%; }
614 -h2 { font-size: 150%; }
615623 h3 { font-size: 132%; }
 624+h3 .editsection { font-size: 76%; font-weight: normal; }
616625 h4 { font-size: 116%; }
 626+h4 .editsection { font-size: 86%; font-weight: normal; }
617627 h5 { font-size: 100%; }
 628+h5 .editsection { font-weight: normal; }
618629 h6 { font-size: 80%; }
619 -/* To replicate the old padding, where h# were block-level elements and edit
620 - * links were floated, we need to multiply .5em top padding and .17em bottom
621 - * padding by the header text sizes. */
622 -.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
623 -.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
624 -.mw-h3 { padding: .66em 0 .22em; } /* etc. */
625 -.mw-h4 { padding: .58em 0 .20em; }
626 -.mw-h5 { padding: .50em 0 .17em; }
627 -.mw-h6 { padding: .40em 0 .14em; }
628 -
 630+h6 .editsection { font-size: 125%; font-weight: normal; }
 631+body.rtl .editsection {
 632+ float: left;
 633+ margin-right: 5px;
 634+ margin-left: 0; /* bug 9122: undo default LTR */
 635+}
629636 p {
630637 margin: .4em 0 .5em 0;
631638 line-height: 1.5em;
Index: trunk/phase3/skins/MonoBook.php
@@ -114,7 +114,7 @@
115115 <div id="content">
116116 <a name="top" id="top"></a>
117117 <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
118 - <div class="mw-h1 firstHeading"><h1><?php $this->html('title') ?></h1></div>
 118+ <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
119119 <div id="bodyContent">
120120 <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
121121 <div id="contentSub"><?php $this->html('subtitle') ?></div>
Index: trunk/phase3/includes/Linker.php
@@ -1268,10 +1268,11 @@
12691269 * @return string HTML headline
12701270 */
12711271 public function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) {
1272 - $ret = "<div class=\"mw-h$level\">"
1273 - . "<a name=\"$anchor\" id=\"$anchor\"></a>"
1274 - . "<h$level$attribs$text</h$level>"
1275 - . "$link </div>";
 1272+ $ret = "<a name=\"$anchor\" id=\"$anchor\"></a>"
 1273+ . "<h$level$attribs"
 1274+ . $link
 1275+ . " <span class=\"mw-headline\">$text</span>"
 1276+ . "</h$level>";
12761277 if ( $legacyAnchor !== false ) {
12771278 $ret = "<a name=\"$legacyAnchor\" id=\"$legacyAnchor\"></a>$ret";
12781279 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1496,7 +1496,7 @@
14971497 * to ensure that client-side caches do not keep obsolete copies of global
14981498 * styles.
14991499 */
1500 -$wgStyleVersion = '229';
 1500+$wgStyleVersion = '228';
15011501
15021502
15031503 # Server-side caching:
Index: trunk/phase3/RELEASE-NOTES
@@ -81,15 +81,14 @@
8282 * (bug 14866) Messages 'recentchangeslinked-toolbox' and
8383 'recentchangeslinked-toolbox' were added to allow more fine grained
8484 customisation of the user interface
85 -* DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote
86 - items)
 85+* DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote items)
8786 * Special:Search now could search terms in all variant-forms. ONLY apply on
8887 wikis with LanguageConverter
89 -* Add autopromote condition APCOND_BLOCKED to autopromote blocked users to
90 - various user groups.
91 -* Add $wgRevokePermissions as a means of restricting a group's rights. The
92 - syntax is identical to $wgGroupPermissions, but users in these groups will
93 - have these rights stripped from them.
 88+* Add autopromote condition APCOND_BLOCKED to autopromote blocked users to various
 89+ user groups.
 90+* Add $wgRevokePermissions as a means of restricting a group's rights. The syntax is
 91+ identical to $wgGroupPermissions, but users in these groups will have these rights
 92+ stripped from them.
9493 * Added a PHP port of CDB (constant database), for improved local caching when
9594 the DBA extension is not available.
9695
@@ -190,8 +189,7 @@
191190 * (bug 18925) history.js removes class names of list elements on initialization
192191 * Multiple whitespace in TOC anchors is now stripped, for consistency with the
193192 link from the edit comment
194 -* (bug 19112) Preferences now respects $wgUseExternalEditor,
195 - $wgExternalDiffEngine
 193+* (bug 19112) Preferences now respects $wgUseExternalEditor, $wgExternalDiffEngine
196194 * (bug 18173) MediaWiki now fails when unable to determine a client IP
197195 * (bug 19170) Special:Version should follow the content language direction
198196 * (bug 19160) maintenance/purgeOldText.inc is now compatible with PostgreSQL
@@ -201,12 +199,8 @@
202200 can add/remove *all* groups (have 'userrights' permission).
203201 * (bug 19294) Always show Sp-contributions-footer(-anon)
204202 * Attempts to restrict reading of pages while anonymous viewing is allowed
205 - via extensions not using the userCan hook and via $wgRevokePermissions now
206 - work.
207 -* (bug 8445) Multiple-character search terms are now handled properly for
208 - Chinese
209 -* (bug 11270) Put the section [edit] linker after the section header in the HTML
210 - instead of before
 203+ via extensions not using the userCan hook and via $wgRevokePermissions now work.
 204+* (bug 8445) Multiple-character search terms are now handled properly for Chinese
211205
212206 == API changes in 1.16 ==
213207

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r52410(bug 11270) Put the [edit] link after the section header instead of before, a...catrope20:00, 25 June 2009

Status & tagging log