r52410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52409‎ | r52410 | r52411 >
Date:20:00, 25 June 2009
Author:catrope
Status:reverted
Tags:
Comment:
(bug 11270) Put the [edit] link after the section header instead of before, and don't right-float it anymore
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,7 +70,6 @@
7171 width: 96%;
7272 }
7373
74 -div.editsection,
7574 #catlinks,
7675 div.tright,
7776 div.tleft {
Index: trunk/phase3/skins/chick/main.css
@@ -41,34 +41,36 @@
4242 margin: 0.2em 0 0.2em 0;
4343 }
4444
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;
 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;
5351 }
54 -.editsection {
 52+.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 53+ border-bottom: none;
 54+}
 55+h1, h2 {
5556 font-weight: normal;
5657 }
5758 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 -}
6560 h3 { font-size: 132%; }
66 -h3 .editsection { font-size: 75.8%; }
6761 h4 { font-size: 116%; }
68 -h4 .editsection { font-size: 86.2%; }
6962 h5 { font-size: 100%; }
7063 h6 { font-size: 80%; }
71 -h6 .editsection { font-size: 125%; }
7264
 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+
7375 ul {
7476 line-height: 1.5em;
7577 margin: 0.3em 0 0 1.5em;
Index: trunk/phase3/skins/monobook/rtl.css
@@ -40,11 +40,6 @@
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 -}
4944 /* recover IEMac (might be fine with the float, but usually it's close to IE */
5045 *>body .portlet {
5146 float: none;
Index: trunk/phase3/skins/monobook/IE60Fixes.css
@@ -85,7 +85,6 @@
8686 width: 96%;
8787 }
8888
89 -div.editsection,
9089 #catlinks,
9190 div.tright,
9291 div.tleft {
Index: trunk/phase3/skins/monobook/IE70Fixes.css
@@ -69,7 +69,6 @@
7070 }
7171
7272 /*
73 -div.editsection,
7473 #catlinks,
7574 div.tright,
7675 div.tleft {
Index: trunk/phase3/skins/monobook/main.css
@@ -112,32 +112,34 @@
113113 margin: .2em 0 .2em 0;
114114 }
115115
116 -h1, h2, h3, h4, h5, h6 {
 116+/* Headers */
 117+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
117118 color: black;
118119 background: none;
119 - font-weight: normal;
120120 margin: 0;
121 - padding-top: .5em;
122 - padding-bottom: .17em;
123121 border-bottom: 1px solid #aaa;
124122 }
 123+.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 124+ border-bottom: none;
 125+}
 126+h1, h2 { font-weight: normal; }
125127 h1 { font-size: 188%; }
126 -h1 .editsection { font-size: 53%; }
127128 h2 { font-size: 150%; }
128 -h2 .editsection { font-size: 67%; }
129 -h3, h4, h5, h6 {
130 - border-bottom: none;
131 - font-weight: bold;
132 -}
133129 h3 { font-size: 132%; }
134 -h3 .editsection { font-size: 76%; font-weight: normal; }
135130 h4 { font-size: 116%; }
136 -h4 .editsection { font-size: 86%; font-weight: normal; }
137131 h5 { font-size: 100%; }
138 -h5 .editsection { font-weight: normal; }
139132 h6 { font-size: 80%; }
140 -h6 .editsection { font-size: 125%; font-weight: normal; }
141133
 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+
142144 ul {
143145 line-height: 1.5em;
144146 list-style-type: square;
Index: trunk/phase3/skins/modern/rtl.css
@@ -3,12 +3,6 @@
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 -
137 /* Fix alignment */
148 .documentByLine,
159 .portletDetails,
Index: trunk/phase3/skins/common/cologneblue.css
@@ -83,7 +83,6 @@
8484 font-family: Verdana, Arial, sans-serif;
8585 font-size: 180%; line-height: 21pt;
8686 }
87 -h1 .editsection { font-size: 55.6%; }
8887 h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
8988 #article p.subtitle {
9089 color: #666666; font-size: 11pt; font-weight: bold;
@@ -96,6 +95,6 @@
9796 a.printable { text-decoration: underline; }
9897 a.stub, #quickbar a.stub { color:#772233; text-decoration:none; }
9998 a.new, #quickbar a.new { color: #CC2200; }
100 -h2, h3, h4, h5, h6 { margin-bottom: 0; }
 99+.mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; }
101100 small { font-size: 75%; }
102101 input.mw-searchInput { width: 106px; }
Index: trunk/phase3/skins/common/common_rtl.css
@@ -18,10 +18,6 @@
1919 margin-right: 1.4em;
2020 margin-left: 0.4em;
2121 }
22 -.editsection {
23 - float: left;
24 - margin-right: 5px;
25 -}
2622 div.tright, div.floatright {
2723 clear: none;
2824 }
Index: trunk/phase3/skins/common/wikistandard.css
@@ -27,18 +27,12 @@
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%; }
3231 h2 { font-size: 120%; }
33 -h2 .editsection { font-size: 83.3%; }
3432 h2, h3, h4, h5, h6 { margin-bottom: 0;}
3533 h3 { font-size: 106.25%; }
36 -h3 .editsection { font-size: 94.1%; }
3734 h4 { font-size: 103.125%; }
38 -h4 .editsection { font-size: 97.0%; }
3935 h5 { font-size: 100%; }
40 -h5 .editsection { font-size: 100%; }
4136 h6 { font-size: 95%; }
42 -h6 .editsection { font-size: 105.3%; }
4337 hr.sep { color:gray;height:1px;background-color:gray;}
4438 p.subpages { font-size:small;}
4539 p.subtitle { padding-top: 0; margin-top: 0;}
Index: trunk/phase3/skins/common/oldshared.css
@@ -4,28 +4,6 @@
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 -
308 #footer { clear: both }
319 /* images */
3210 div.floatright { float: right; clear: right; margin: 0 0 1em 1em; }
Index: trunk/phase3/skins/common/shared.css
@@ -23,11 +23,17 @@
2424 background-color: #fcfcfc;
2525 }
2626
27 -/* Edit section links */
28 -.editsection {
29 - float: right;
30 - margin-left: 5px;
31 -}
 27+/* Display headings on the same line as edit link */
 28+h1, h2, h3, h4, h5, h6 { display: inline; margin: 0; }
 29+/* But then we have to reintroduce the margin. We use the W3 recommended mar-
 30+ * gins <http://www.w3.org/TR/CSS21/sample.html>, multiplying by the recom-
 31+ * mended font-size. */
 32+.mw-h1 { margin: 1.34em 0; }
 33+.mw-h2 { margin: 1.13em 0; }
 34+.mw-h3 { margin: 0.97em 0; }
 35+.mw-h4 { margin: 1.12em 0; }
 36+.mw-h5 { margin: 1.25em 0; }
 37+.mw-h6 { margin: 1.25em 0; }
3238
3339 /**
3440 * File histories
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 - <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
 500+ <div class="mw-h1 firstHeading"><h1><?php $this->html('title') ?></h1></div>
501501 <!-- /firstHeading -->
502502 <!-- bodyContent -->
503503 <div id="bodyContent">
Index: trunk/phase3/skins/simple/rtl.css
@@ -40,11 +40,6 @@
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 -}
4944 /* recover IEMac (might be fine with the float, but usually it's close to IE */
5045 *>body .portlet {
5146 float: none;
Index: trunk/phase3/skins/simple/main.css
@@ -1,26 +1,3 @@
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 -
252 #toolbar {
263 display: none;
274 }
@@ -86,11 +63,22 @@
8764 }
8865 p img { margin: 0; }
8966
90 -h1, h2, h3, h4, h5, h6 {
91 - margin: 0;
92 - padding-top: 0.5em;
93 - padding-bottom: 0.17em;
 67+.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 {
 68+ margin: 0;
9469 }
 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+
9583 fieldset {
9684 margin: 1em 0em 1em 0em;
9785 padding: 0em 1em 1em 1em;
@@ -195,7 +183,7 @@
196184 border: solid 1px black;
197185 }
198186
199 -h1.firstHeading, h2 {
 187+.firstHeading, .mw-h2 {
200188 border-bottom: solid 1px black;
201189 }
202190 #bodyContent a[href ^="http://"],
@@ -383,10 +371,5 @@
384372 display: none;
385373 }
386374
387 -.editsection {
388 - float: right;
389 - margin-left: 5px;
390 -}
391 -
392375 .templatesUsed { margin-top: 1.5em; }
393376
Index: trunk/phase3/skins/vector/main.css
@@ -570,45 +570,38 @@
571571 }
572572
573573 /* Structural Elements */
574 -h1,
575 -h2,
576 -h3,
577 -h4,
578 -h5,
579 -h6 {
 574+.mw-h1,
 575+.mw-h2,
 576+.mw-h3,
 577+.mw-h4,
 578+.mw-h5,
 579+.mw-h6 {
580580 color: black;
581581 background: none;
582 - font-weight: normal;
583582 margin: 0;
584 - padding-top: .5em;
585 - padding-bottom: .17em;
586583 border-bottom: 1px solid #aaa;
587584 width: auto;
588585 }
589 -h1 { font-size: 188%; }
590 -h1 .editsection { font-size: 53%; }
591 -h2 { font-size: 150%; }
592 -h2 .editsection { font-size: 67%; }
593 -h3,
594 -h4,
595 -h5,
596 -h6 {
 586+.mw-h3, .mw-h4, .mw-h5, .mw-h6 {
597587 border-bottom: none;
598 - font-weight: bold;
599588 }
 589+h1, h2 { font-weight: normal; }
 590+h1 { font-size: 188%; }
 591+h2 { font-size: 150%; }
600592 h3 { font-size: 132%; }
601 -h3 .editsection { font-size: 76%; font-weight: normal; }
602593 h4 { font-size: 116%; }
603 -h4 .editsection { font-size: 86%; font-weight: normal; }
604594 h5 { font-size: 100%; }
605 -h5 .editsection { font-weight: normal; }
606595 h6 { font-size: 80%; }
607 -h6 .editsection { font-size: 125%; font-weight: normal; }
608 -body.rtl .editsection {
609 - float: left;
610 - margin-right: 5px;
611 - margin-left: 0; /* bug 9122: undo default LTR */
612 -}
 596+/* To replicate the old padding, where h# were block-level elements and edit
 597+ * links were floated, we need to multiply .5em top padding and .17em bottom
 598+ * padding by the header text sizes. */
 599+.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */
 600+.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */
 601+.mw-h3 { padding: .66em 0 .22em; } /* etc. */
 602+.mw-h4 { padding: .58em 0 .20em; }
 603+.mw-h5 { padding: .50em 0 .17em; }
 604+.mw-h6 { padding: .40em 0 .14em; }
 605+
613606 p {
614607 margin: .4em 0 .5em 0;
615608 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 - <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
 118+ <div class="mw-h1 firstHeading"><h1><?php $this->html('title') ?></h1></div>
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,11 +1268,10 @@
12691269 * @return string HTML headline
12701270 */
12711271 public function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) {
1272 - $ret = "<a name=\"$anchor\" id=\"$anchor\"></a>"
1273 - . "<h$level$attribs"
1274 - . $link
1275 - . " <span class=\"mw-headline\">$text</span>"
1276 - . "</h$level>";
 1272+ $ret = "<div class=\"mw-h$level\">"
 1273+ . "<a name=\"$anchor\" id=\"$anchor\"></a>"
 1274+ . "<h$level$attribs$text</h$level>"
 1275+ . "$link </div>";
12771276 if ( $legacyAnchor !== false ) {
12781277 $ret = "<a name=\"$legacyAnchor\" id=\"$legacyAnchor\"></a>$ret";
12791278 }
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 = '228';
 1500+$wgStyleVersion = '229';
15011501
15021502
15031503 # Server-side caching:
Index: trunk/phase3/RELEASE-NOTES
@@ -81,14 +81,15 @@
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 items)
 85+* DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote
 86+ items)
8687 * Special:Search now could search terms in all variant-forms. ONLY apply on
8788 wikis with LanguageConverter
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.
 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.
9394 * Added a PHP port of CDB (constant database), for improved local caching when
9495 the DBA extension is not available.
9596
@@ -189,7 +190,8 @@
190191 * (bug 18925) history.js removes class names of list elements on initialization
191192 * Multiple whitespace in TOC anchors is now stripped, for consistency with the
192193 link from the edit comment
193 -* (bug 19112) Preferences now respects $wgUseExternalEditor, $wgExternalDiffEngine
 194+* (bug 19112) Preferences now respects $wgUseExternalEditor,
 195+ $wgExternalDiffEngine
194196 * (bug 18173) MediaWiki now fails when unable to determine a client IP
195197 * (bug 19170) Special:Version should follow the content language direction
196198 * (bug 19160) maintenance/purgeOldText.inc is now compatible with PostgreSQL
@@ -199,8 +201,12 @@
200202 can add/remove *all* groups (have 'userrights' permission).
201203 * (bug 19294) Always show Sp-contributions-footer(-anon)
202204 * Attempts to restrict reading of pages while anonymous viewing is allowed
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
 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
205211
206212 == API changes in 1.16 ==
207213

Follow-up revisions

RevisionCommit summaryAuthorDate
r52414Revert r52410 (Put the [edit] link after the section header instead of before...catrope21:10, 25 June 2009
r93284Fix Bug 11270 & Bug 11555 : Make editsection link more understandable by posi...diebuche16:43, 27 July 2011

Status & tagging log