Last modified: 2014-09-24 20:26:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65164, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63164 - Hovercards: Disambiguation text should not be displayed
Hovercards: Disambiguation text should not be displayed
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Popups (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 63998 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-27 03:38 UTC by Jared Zimmerman (WMF)
Modified: 2014-09-24 20:26 UTC (History)
10 users (show)

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


Attachments

Comment 1 Vibha Bamba 2014-04-11 00:41:44 UTC
Prateek to discuss the behavior of text extract with Max.
Comment 2 Quiddity 2014-04-12 18:56:01 UTC
In navpopups, there are a large number of Regex rules to remove things that interfere with the preview. (Search for "STARTFILE: previewmaker.js" in https://en.wikipedia.org/wiki/MediaWiki:Gadget-popups.js to see the many "Previewmaker.prototype" subsections there.)

I would guess that Hovercards will need the same extensive set of 'exclusions'? (plus more, such as the {{pagebanner}} templates at the top of every WikiVoyage article.)

Digging around, it appears that Extension:TextExtracts removes elements via their CSS classes, here https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FTextExtracts/c56742eb7149ef9aa5b8cf31c62c4c71333a00f5/TextExtracts.php#L51 so possibly you just need to compile a set of additions for that? (eg. class="topbanner" for the WikiVoyage templates, and class="dablink" for the various types of hatnote.)
Comment 3 Lokal_Profil 2014-04-13 10:59:46 UTC
(In reply to Quiddity from comment #2)
> In navpopups, there are a large number of Regex rules to remove things that
> interfere with the preview. (Search for "STARTFILE: previewmaker.js" in
> https://en.wikipedia.org/wiki/MediaWiki:Gadget-popups.js to see the many
> "Previewmaker.prototype" subsections there.)
> 
> I would guess that Hovercards will need the same extensive set of
> 'exclusions'? (plus more, such as the {{pagebanner}} templates at the top of
> every WikiVoyage article.)
> 
> Digging around, it appears that Extension:TextExtracts removes elements via
> their CSS classes, here
> https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FTextExtracts/
> c56742eb7149ef9aa5b8cf31c62c4c71333a00f5/TextExtracts.php#L51 so possibly
> you just need to compile a set of additions for that? (eg. class="topbanner"
> for the WikiVoyage templates, and class="dablink" for the various types of
> hatnote.)

In many places disambiguation links are just entered as 
" :''BLA'' " though rather than through any template meaning it can't be filtered on CSS (AFAIK).
Comment 4 Quiddity 2014-04-13 18:19:02 UTC
(In reply to Lokal_Profil from comment #3)
> In many places disambiguation links are just entered as 
> " :''BLA'' " though rather than through any template meaning it can't be
> filtered on CSS (AFAIK).

True. Although, that itself is usually a flaw. I've only encountered it on wikis that didn't have the appropriate templates at all, or where a wikignome hadn't yet fixed the occurrence. Hatnotes /should/ be wrapped in CSS, for this and other reasons.
Comment 5 Gerrit Notification Bot 2014-04-14 05:17:23 UTC
Change 125689 had a related patch set uploaded by Prtksxna:
Add classes and elements to the exclusion list

https://gerrit.wikimedia.org/r/125689
Comment 6 Lokal_Profil 2014-04-15 07:56:57 UTC
(In reply to Quiddity from comment #4)
> (In reply to Lokal_Profil from comment #3)
> > In many places disambiguation links are just entered as 
> > " :''BLA'' " though rather than through any template meaning it can't be
> > filtered on CSS (AFAIK).
> 
> True. Although, that itself is usually a flaw. I've only encountered it on
> wikis that didn't have the appropriate templates at all, or where a
> wikignome hadn't yet fixed the occurrence. Hatnotes /should/ be wrapped in
> CSS, for this and other reasons.

True. Might it not be worth adding a generic ".hideFromExtracts" css-filter which local wikis can add to templates (or other classes) which they feel should be excluded. Populating TextExtracts.php with every variant we find seems like a cumbersome way to do it.
Comment 7 Quiddity 2014-04-15 20:45:21 UTC
Marking "New" as the patch was rejected/diverted. 
CCing MaxSem, as he has relevant knowledge.

(In reply to Lokal_Profil from comment #6)
> True. Might it not be worth adding a generic ".hideFromExtracts" css-filter
> which local wikis can add to templates (or other classes) which they feel
> should be excluded. Populating TextExtracts.php with every variant we find
> seems like a cumbersome way to do it.

(Tangent: Hmm, we do have (at Enwiki) [[MediaWiki:PDF Template Blacklist]] and [[Category:Exclude in print]], but that says it's currently broken due to bug 48052 )

I'm not sure what the current preferred method is, and whether it would be re-usable for this Hovercard purpose? I think ".noprint" is it? It's specified here: https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/skins%2Fcommon%2FcommonPrint.css#L114
But see also: https://en.wikipedia.org/wiki/MediaWiki:Print.css
Beyond that, I'm out of my depth.
Comment 8 Max Semenik 2014-04-15 20:53:50 UTC
.noexcerpt
Comment 9 Gerrit Notification Bot 2014-04-16 11:16:39 UTC
Change 126226 had a related patch set uploaded by Prtksxna:
TextExtracts: Add classes and elements to the exclusion list

https://gerrit.wikimedia.org/r/126226
Comment 10 Gerrit Notification Bot 2014-04-16 11:18:31 UTC
Change 125689 abandoned by Prtksxna:
Add classes and elements to the exclusion list

https://gerrit.wikimedia.org/r/125689
Comment 11 Sergey Leschina 2014-05-25 07:40:10 UTC
Howerdcards show elements with style="display:none", e. g. https://docs.google.com/file/d/0B8timSDHkFaWVEd4T19tLUxXNXM/edit.
I think they should be hidden even if them have no classes.
Comment 12 geraki (Konstantinos Stampoulis) 2014-06-11 16:05:44 UTC
*** Bug 63998 has been marked as a duplicate of this bug. ***

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


Navigation
Links