r93319 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93318‎ | r93319 | r93320 >
Date:21:53, 27 July 2011
Author:diebuche
Status:reverted (Comments)
Tags:
Comment:
Recommit r93264 ( Remove semantically incorrect wrapper table from toc and replace it with an inline-blocked diff. Update some skin css, since we don't have the implicit table padding anymore and need to increase to padding to maintain the current look. ) with parser tests and release notes
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/modern/main.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)
  • /trunk/phase3/skins/vector/screen.css (modified) (history)
  • /trunk/phase3/tests/parser/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/monobook/main.css
@@ -348,8 +348,7 @@
349349 .toc ul {
350350 list-style-type: none;
351351 list-style-image: none;
352 - margin-left: 0;
353 - padding-left: 0;
 352+ padding: 0 .4em;
354353 text-align: left;
355354 }
356355 #toc ul ul,
Index: trunk/phase3/skins/modern/main.css
@@ -556,11 +556,6 @@
557557 border: solid 1px #bbb;
558558 }
559559
560 -#toc tr, #toc td {
561 - margin: 0;
562 - padding: 0;
563 -}
564 -
565560 #toctitle {
566561 border-bottom: solid 1px #3c78b5;
567562 background-color: #ddd;
@@ -587,7 +582,7 @@
588583 list-style-type: none;
589584 list-style-image: none;
590585 margin: 0 1em;
591 - padding-left: 0;
 586+ padding: 0;
592587 text-align: left;
593588 }
594589
Index: trunk/phase3/skins/common/shared.css
@@ -783,4 +783,14 @@
784784 }
785785
786786 /* bug 12205 */
787 -#mw-credits a { unicode-bidi: embed; }
\ No newline at end of file
 787+#mw-credits a {
 788+ unicode-bidi: embed;
 789+}
 790+
 791+/* Standard toc */
 792+#toc {
 793+ display: inline-block;
 794+ /* IE6+7 workaround */
 795+ zoom: 1;
 796+ display: inline !ie;
 797+}
\ No newline at end of file
Index: trunk/phase3/skins/vector/screen.css
@@ -884,8 +884,7 @@
885885 .toc ul {
886886 list-style-type: none;
887887 list-style-image: none;
888 - margin-left: 0;
889 - padding-left: 0;
 888+ padding: 0 .4em;
890889 text-align: left;
891890 }
892891 #toc ul ul,
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -28,6 +28,7 @@
2929 $wgUploadMissingFileUrl is not set. The first was used for this
3030 until the second was introduced in 1.17.
3131 * (bug 25355) Parser generates edit section links for special pages
 32+* (bug 13766) Change table of content syntax to be semantically correct
3233
3334 === API changes in 1.19 ===
3435 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/tests/parser/parserTests.txt
@@ -4560,7 +4560,7 @@
45614561 Some text
45624562 ===Another headline===
45634563 !! result
4564 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4564+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
45654565 <ul>
45664566 <li class="toclevel-1 tocsection-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a>
45674567 <ul>
@@ -4581,7 +4581,7 @@
45824582 </ul>
45834583 </li>
45844584 </ul>
4585 -</td></tr></table>
 4585+</div>
45864586 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline" id="Headline_1"> Headline 1 </span></h2>
45874587 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline" id="Subheadline_1"> Subheadline 1 </span></h3>
45884588 <h5><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline" id="Skipping_a_level"> Skipping a level </span></h5>
@@ -4608,7 +4608,7 @@
46094609 ========= Level 9 Heading=========
46104610 ========== Level 10 Heading==========
46114611 !! result
4612 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4612+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
46134613 <ul>
46144614 <li class="toclevel-1 tocsection-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a>
46154615 <ul>
@@ -4636,7 +4636,7 @@
46374637 </ul>
46384638 </li>
46394639 </ul>
4640 -</td></tr></table>
 4640+</div>
46414641 <h1><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline" id="Level_1_Heading"> Level 1 Heading</span></h1>
46424642 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline" id="Level_2_Heading"> Level 2 Heading</span></h2>
46434643 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline" id="Level_3_Heading"> Level 3 Heading</span></h3>
@@ -4660,7 +4660,7 @@
46614661 == title 2 ==
46624662 === title 2.1 ===
46634663 !! result
4664 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4664+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
46654665 <ul>
46664666 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
46674667 <ul>
@@ -4678,7 +4678,7 @@
46794679 </ul>
46804680 </li>
46814681 </ul>
4682 -</td></tr></table>
 4682+</div>
46834683 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
46844684 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
46854685 <h4><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1"> title 1.1.1 </span></h4>
@@ -4700,7 +4700,7 @@
47014701 == title 2 ==
47024702 === title 2.1 ===
47034703 !! result
4704 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4704+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
47054705 <ul>
47064706 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
47074707 <ul>
@@ -4714,7 +4714,7 @@
47154715 </ul>
47164716 </li>
47174717 </ul>
4718 -</td></tr></table>
 4718+</div>
47194719 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
47204720 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
47214721 <h4><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 1.1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1.1"> title 1.1.1 </span></h4>
@@ -4735,7 +4735,7 @@
47364736 ====Section 1.1.1.1====
47374737 ==Section 2==
47384738 !! result
4739 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4739+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
47404740 <ul>
47414741 <li class="toclevel-1 tocsection-1"><a href="#Section_1"><span class="tocnumber">1</span> <span class="toctext">Section 1</span></a>
47424742 <ul>
@@ -4744,7 +4744,7 @@
47454745 </li>
47464746 <li class="toclevel-1 tocsection-5"><a href="#Section_2"><span class="tocnumber">2</span> <span class="toctext">Section 2</span></a></li>
47474747 </ul>
4748 -</td></tr></table>
 4748+</div>
47494749 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: Section 1">edit</a>]</span> <span class="mw-headline" id="Section_1">Section 1</span></h2>
47504750 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: Section 1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1">Section 1.1</span></h3>
47514751 <h4><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: Section 1.1.1">edit</a>]</span> <span class="mw-headline" id="Section_1.1.1">Section 1.1.1</span></h4>
@@ -4827,7 +4827,7 @@
48284828 === title 1.1 ===
48294829 == title 2 ==
48304830 !! result
4831 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4831+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
48324832 <ul>
48334833 <li class="toclevel-1 tocsection-1"><a href="#title_1"><span class="tocnumber">1</span> <span class="toctext">title 1</span></a>
48344834 <ul>
@@ -4836,7 +4836,7 @@
48374837 </li>
48384838 <li class="toclevel-1 tocsection-3"><a href="#title_2"><span class="tocnumber">2</span> <span class="toctext">title 2</span></a></li>
48394839 </ul>
4840 -</td></tr></table>
 4840+</div>
48414841 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: title 1">edit</a>]</span> <span class="mw-headline" id="title_1"> title 1 </span></h2>
48424842 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: title 1.1">edit</a>]</span> <span class="mw-headline" id="title_1.1"> title 1.1 </span></h3>
48434843 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: title 2">edit</a>]</span> <span class="mw-headline" id="title_2"> title 2 </span></h2>
@@ -4891,7 +4891,7 @@
48924892 !! result
48934893 <p>The tooltips shall not show entities to the user (ie. be double escaped)
48944894 </p>
4895 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 4895+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
48964896 <ul>
48974897 <li class="toclevel-1 tocsection-1"><a href="#text_.3E_text"><span class="tocnumber">1</span> <span class="toctext">text &gt; text</span></a></li>
48984898 <li class="toclevel-1 tocsection-2"><a href="#text_.3C_text"><span class="tocnumber">2</span> <span class="toctext">text &lt; text</span></a></li>
@@ -4899,7 +4899,7 @@
49004900 <li class="toclevel-1 tocsection-4"><a href="#text_.27_text"><span class="tocnumber">4</span> <span class="toctext">text ' text</span></a></li>
49014901 <li class="toclevel-1 tocsection-5"><a href="#text_.22_text"><span class="tocnumber">5</span> <span class="toctext">text " text</span></a></li>
49024902 </ul>
4903 -</td></tr></table>
 4903+</div>
49044904 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: text > text">edit</a>]</span> <span class="mw-headline" id="text_.3E_text"> text &gt; text </span></h2>
49054905 <p>section 1
49064906 </p>
@@ -6119,11 +6119,11 @@
61206120 http://__TOC__
61216121 !! result
61226122 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline" id="onmouseover.3D"> onmouseover= </span></h2>
6123 -http://<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 6123+http://<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
61246124 <ul>
61256125 <li class="toclevel-1 tocsection-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li>
61266126 </ul>
6127 -</td></tr></table>
 6127+</div>
61286128
61296129 !! end
61306130
@@ -7953,7 +7953,7 @@
79547954 =====5=====
79557955 ==2==
79567956 !! result
7957 -<table id="toc" class="toc"><tr><td><div id="toctitle"><h2>Contents</h2></div>
 7957+<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
79587958 <ul>
79597959 <li class="toclevel-1 tocsection-1"><a href="#2"><span class="tocnumber">1</span> <span class="toctext">2</span></a>
79607960 <ul>
@@ -7968,7 +7968,7 @@
79697969 </ul>
79707970 </li>
79717971 </ul>
7972 -</td></tr></table>
 7972+</div>
79737973 <h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=1" title="Edit section: 2">edit</a>]</span> <span class="mw-headline" id="2">2</span></h2>
79747974 <h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=2" title="Edit section: 6">edit</a>]</span> <span class="mw-headline" id="6">6</span></h6>
79757975 <h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&amp;action=edit&amp;section=3" title="Edit section: 3">edit</a>]</span> <span class="mw-headline" id="3">3</span></h3>
Index: trunk/phase3/includes/Linker.php
@@ -1456,10 +1456,10 @@
14571457 static function tocList( $toc, $lang = false ) {
14581458 $title = wfMsgExt( 'toc', array( 'language' => $lang, 'escape' ) );
14591459 return
1460 - '<table id="toc" class="toc"><tr><td>'
 1460+ '<div id="toc" class="toc">'
14611461 . '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
14621462 . $toc
1463 - . "</ul>\n</td></tr></table>\n";
 1463+ . "</ul>\n</div>\n";
14641464 }
14651465
14661466 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r93436Provisional revert of r93319 -- change to TOC styles without coordinated cach...brion22:00, 28 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93264Remove semantically incorrect wrapper table from toc and replace it with an i...diebuche13:24, 27 July 2011

Comments

#Comment by Hashar (talk | contribs)   22:08, 27 July 2011

Great! CruiseControl thanks you for updating the parserTests :-)

#Comment by Brion VIBBER (talk | contribs)   21:51, 28 July 2011

Will this potentially change or remove padding on existing cached renderings?

This neither updates the parser cache version (which would force pages to be reparsed with the new toc structure) nor keeps the old padding for the table bits that may already be cached.

#Comment by Brion VIBBER (talk | contribs)   21:56, 28 July 2011

I do see some visible padding differences between the old markup with new styles and the new markup with new styles, though it doesn't look too awful on Firefox 5. I'd strongly recommend testing on IE 6 which has much more aggressive funky style changes.

#Comment by Brion VIBBER (talk | contribs)   22:00, 28 July 2011

Provisional revert in r93436.

#Comment by DieBuche (talk | contribs)   09:03, 29 July 2011

It's got an CSS hack specifically for IE6+7, so, of course I tested it there.

Status & tagging log