Last modified: 2014-01-03 15:49:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 46864 - on he.wikivoyage TOC are on the left instead of right as you would expect in RTL wiki
on he.wikivoyage TOC are on the left instead of right as you would expect in ...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TocTree (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Sam Reed (reedy)
: i18n, shell
Depends on:
Blocks: rtl
  Show dependency treegraph
 
Reported: 2013-04-03 21:21 UTC by matanya
Modified: 2014-01-03 15:49 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Comment 1 Amir E. Aharoni 2013-04-04 10:14:52 UTC
It's because of the TocTree extension, which adds floating to table of contents. It has special clauses for body.rtl, which can probably removed to let CSSJanus handle them automatically.
Comment 2 MF-Warburg 2013-04-13 03:39:13 UTC
What about simply removing the extension, which has no aesthetic value at all anyway?
Comment 3 Nemo 2013-04-13 04:52:12 UTC
(In reply to comment #2)
> What about simply removing the extension, which has no aesthetic value at all
> anyway?

I think it makes sense.
Comment 4 RolandUnger 2013-04-23 16:33:59 UTC
At the old Wikivoyage we could not test the extension for RTL languages. But the TOC behavior is realized only by CSS statements. I will look for additional styles.
Comment 5 RolandUnger 2013-04-24 12:23:51 UTC
I tested today better style sheet rules at he.wikivoyage:
(see http://he.wikivoyage.org/wiki/%D7%9E%D7%A9%D7%AA%D7%9E%D7%A9:RolandUnger/common.css)

/* Switching body.rtl properties off by setting to defaults */
 
body.rtl #toc .tocUl, body.ltr #toc .tocUl {
	padding-left: 2em;
}
 
body.rtl .toggleNode, body.ltr .toggleNode {
	left: -2em;
}
 
body.rtl #toc.tocFloat, body.ltr #toc.tocFloat {
	float: left;
	margin: 0 2em 1em 0;
}
 
/* New rules */
 
body.rtl.sitedir-rtl #toc.tocFloat {
	float: right;
	margin: 0 0 1em 2em;
}

After this, it was working well (most of the rules starting with body.rtl should be removed). This means only changing /toctree/modules/ext.toctree.css is necessary. Unfortunately I do not know how to make the corrections.
Comment 6 Vogone 2013-04-25 18:44:07 UTC
Changing the last option in [1] to false by default would fix the problem, though.

[1] https://he.wikivoyage.org/wiki/%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%94%D7%A2%D7%93%D7%A4%D7%95%D7%AA#mw-prefsection-misc
Comment 7 Tomasz W. Kozlowski 2013-04-25 19:03:29 UTC
This is defined in CommonSettings.php…

    if ( $wmgUseTocTree ) {
            require_once( "$IP/extensions/TocTree/TocTree.php" );
	    $wgDefaultUserOptions['toc-floated'] = true;
    }

…as well as in InitialiseSettings.php:

    'wmgUseTocTree' => array(
	    'default' => false,
            'wikivoyage' => true,
    ),

However, I am not exactly sure what is the purpose of this extension. Of course, it provides the wiki with the tree option in their TOC, but do we actually need it at all?
Comment 8 RolandUnger 2013-04-26 04:49:07 UTC
The default properties for the Table of Contents properties can be changed to be switched off. Normally we proposed to have them switched off (This is the extension's default).

// default user options [from TocTree.php]
$wgDefaultUserOptions['toc-floated'] = false;
$wgDefaultUserOptions['toc-expand'] = false;

But the strong English community wanted to switch 'toc-floated' on. And all language branches must have the same default values (I think so). If you like to change it please discuss this problem with the English community.
Comment 9 Nemo 2013-04-26 12:00:27 UTC
Does this extension seriously add two preferences? Please just disable it on he.voy....
Comment 10 Tomasz W. Kozlowski 2013-04-26 13:07:47 UTC
So I can see three ways out of this problem:

1) Disable the extension on he.wikivoyage;
2) Set $wgDefaultUserOptions['toc-floated'] = false on he.wikivoyage;
3) Commit a change to TocTree/modules/ext.toctree.css.

Option 3 is preffered here (fix it if it's broken, not just disable it). 

@Roland: To fix that, you'd only need to install git & create an account on our Gerrit instance; there are some good instructions at:
* https://www.mediawiki.org/wiki/Gerrit/Getting_started
* https://www.mediawiki.org/wiki/Gerrit/Tutorial

Or, if this is too much hassle for you, just submit a patch here and I'll commit it.
Comment 11 Gerrit Notification Bot 2013-04-26 19:14:53 UTC
Related URL: https://gerrit.wikimedia.org/r/61051 (Gerrit Change Id4549ccb9c8153d0ac62563facf90149996acfb9)
Comment 12 Amir E. Aharoni 2013-04-26 19:30:34 UTC
I removed the RTL-specific rules in this commit:
https://gerrit.wikimedia.org/r/#/c/61051/

It seems like CSSJanus does the right thing without them.
Comment 13 Gerrit Notification Bot 2013-04-26 19:55:41 UTC
Related URL: https://gerrit.wikimedia.org/r/61058 (Gerrit Change I71d31ddc5be4a4b9dd47c0d0bd1404de7c8d7b77)
Comment 14 Vogone 2013-04-26 20:20:26 UTC
I disabled the user option 'toc-floated' by default on hewikivoyage in this commit:
https://gerrit.wikimedia.org/r/61058/6
Comment 15 Vogone 2013-04-26 20:26:20 UTC
(In reply to comment #14)
> I disabled the user option 'toc-floated' by default on hewikivoyage in this
> commit:
> https://gerrit.wikimedia.org/r/61058/6

Wrong URL. It should have been the following URL:
https://gerrit.wikimedia.org/r/#/c/61058/6
Comment 16 Niklas Laxström 2013-06-25 09:47:03 UTC
Css change has been merged. Perhaps reedy can decide whether or not to deploy the configuration change.
Comment 17 Sam Reed (reedy) 2013-06-27 20:04:34 UTC
(In reply to comment #16)
> Css change has been merged. Perhaps reedy can decide whether or not to deploy
> the configuration change.

Is Amirs fix sufficient? Is it still needed/wanted? I will merge it if it is still needed/wanted.
Comment 18 Amir E. Aharoni 2013-06-27 20:18:31 UTC
According to my testing it is sufficient and needed.
Comment 19 Gerrit Notification Bot 2013-07-17 16:42:42 UTC
Change 61058 merged by jenkins-bot:
Disable 'toc-floated' user option on hevoy

https://gerrit.wikimedia.org/r/61058
Comment 20 Gerrit Notification Bot 2013-10-21 18:26:18 UTC
Change 90935 had a related patch set uploaded by Reedy:
Revert site specific config change to hewikivoyage

https://gerrit.wikimedia.org/r/90935
Comment 21 Gerrit Notification Bot 2013-10-21 18:28:07 UTC
Change 90935 merged by jenkins-bot:
Revert site specific config change to hewikivoyage

https://gerrit.wikimedia.org/r/90935
Comment 22 Tomasz W. Kozlowski 2013-10-21 18:42:30 UTC
(This is RESOLVED FIXED; Amir's patch should do the trick even without the config change.)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links