Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

Scope the CSS of the interwiki results widget
Closed, ResolvedPublic

Description

Based on this comment, let's create / update to a new way of not displaying what a current wiki might already have for the sister project search results display into something that is better suited to long term usage.

Comment copied here:

Change 336843 had a related patch set uploaded (by EBernhardson):
Temporary hax to hide cawiki's hacked in search sidebar

https://gerrit.wikimedia.org/r/336843

 /* Evil temporary hax for cawiki */
 #sisterproject {
	display: none;
 }

For once, I suppose this was fine. But its quite far out of scope for MediaWiki core master (WikimediaEvents or a wmf-only patch would be better).

Assuming there will likely be more conflicts with future roll outs, better use a class on a common ancestor. Then this could placed in local wiki's Common.css, e.g.:

.mw-searchresults-has-iw #sisterproject {
  display: none;
}

I suppose such class would be useful in general as well to make other minor layout adjustments where needed, to accommodate the sidebar. It seems interwikiwidget.styles.less already makes such adjustment, but without a scope class - under the assumption the styles won't be loaded unless the mode is activated, which is a pattern better avoided.

Event Timeline

Jdrewniak renamed this task from Create a better way to not show the existing project display (as applicable) when also showing the new sister search results display to Scope the CSS of the interwiki results widget.Feb 27 2017, 12:45 PM
Jdrewniak claimed this task.
Jdrewniak updated the task description. (Show Details)

@CKoerner_WMF found https://phabricator.wikimedia.org/P5201 which might be useful in figuring out which wikipedias have their own version of sister project search results. We currently know of Italian, Catalan and French wikis that show their own sister project links in their search results.

Also - French Wikipedia seems to use this system message: https://fr.wikipedia.org/wiki/MediaWiki:Searchmenu-new

frenchwikipedia-sister project system message.png (388×889 px, 98 KB)

perhaps not useful, but it seems there is a very long list of wikis that have overridden the searchmenu-new message. Not sure how to automate checking which of these actually have a custom search menu as opposed to a customized message:

[
  "afwiki",
  "alswiki",
  "arwiki",
  "barwiki",
  "bgwiki",
  "bxrwiki",
  "cawiki",
  "cawiktionary",
  "cdowiki",
  "cewiki",
  "commonswiki",
  "cswiki",
  "cswiktionary",
  "dawiki",
  "dewiki",
  "dewiktionary",
  "elwiki",
  "elwiktionary",
  "enwiki",
  "enwikibooks",
  "enwiktionary",
  "eowiki",
  "eswiki",
  "eswiktionary",
  "etwiktionary",
  "fawikinews",
  "fawikivoyage",
  "fawiktionary",
  "fiwiktionary",
  "fowiktionary",
  "frwiki",
  "frwiktionary",
  "gawiktionary",
  "gnwiki",
  "hewikibooks",
  "hewikinews",
  "hewikiquote",
  "hewikisource",
  "huwiki",
  "hywiktionary",
  "iowiktionary",
  "iswiki",
  "iswiktionary",
  "itwiki",
  "jvwiki",
  "kawiki",
  "kawiktionary",
  "kkwiki",
  "kowiki",
  "kowiktionary",
  "kuwiktionary",
  "lowiki",
  "lvwiki",
  "mgwiktionary",
  "mkwiki",
  "mkwiktionary",
  "mlwiki",
  "mlwiktionary",
  "mrwiki",
  "nds_nlwiki",
  "ndswiki",
  "newiki",
  "newikibooks",
  "newiktionary",
  "nlwiki",
  "nowiki",
  "nrmwiki",
  "nvwiki",
  "pawiki",
  "pawiktionary",
  "plwiki",
  "plwikinews",
  "plwiktionary",
  "pswiki",
  "ptwiki",
  "ptwikibooks",
  "rowiki",
  "rowiktionary",
  "ruwiki"
  "ruwikiquote",
  "ruwikisource",
  "ruwiktionary",
  "simplewiktionary",
  "sqwiki",
  "svwiki",
  "testwikidatawiki",
  "thwiki",
  "tkwiktionary",
  "trwiki",
  "trwiktionary",
  "ugwiktionary",
  "ukwiki",
  "urwiki",
  "viwiki",
  "viwikibooks",
  "viwikisource",
  "viwiktionary",
  "wikidatawiki",
  "zh_min_nanwiki",
  "zhwiki",
  "zh_yuewiki",

Using the very-naive guess that the wikis with sidebars copied each other and all include the word "sisterproject" as an html class in the source text, we get this short list:

[
  "cawiki",
  "elwiktionary",
  "frwiki"
  "frwiktionary",
]

Interesting, @EBernhardson, I wonder why itwiki didn't make that list: https://it.wikipedia.org/w/index.php?search=~bob&title=Speciale:Ricerca&go=Vai&searchToken=882rvr57ldbplioxbhhr4zzv Maybe they use something completely different?

I'm not too worried about elwiktionary or frwiktionary, as we're not displaying the sister projects on those search results pages, we'll only be doing it for Wikipedias.

itwiki didn't make the list because they have the "official" sidebar. Basically they have our existing sidebar with the old interface. When we implemented the improvements for performance of sisterwiki search they auto-magically got it.

The sidebar appears to be rendering in the wrong place on itwiki. It's on the bottom of the page instead of alongside the search results.

Screen Shot 2017-04-06 at 16.24.28.png (1×1 px, 286 KB)

sweet, thanks @EBernhardson .

Whoops - @Krinkle - thanks for the catch. Let's get this fixed, @Jdrewniak !

Change 346969 had a related patch set uploaded (by Jdrewniak):
[mediawiki/core@master] Interwiki sidebar at bottom of page

https://gerrit.wikimedia.org/r/346969

Change 347368 had a related patch set uploaded (by Jdrewniak):
[mediawiki/core@master] [WIP] Revised styling of sister-search sidebar.

https://gerrit.wikimedia.org/r/347368

Change 347368 merged by jenkins-bot:
[mediawiki/core@master] Revised styling of sister-search sidebar.

https://gerrit.wikimedia.org/r/347368

Change 346969 abandoned by Jdrewniak:
Interwiki sidebar at bottom of page

Reason:
Issue resolved in this patch 347368

https://gerrit.wikimedia.org/r/346969