Last modified: 2014-09-24 20:26:58 UTC
see link to https://en.wikipedia.org/wiki/Avalanche from https://en.wikipedia.org/wiki/Geology#Applied_geology
Prateek to discuss the behavior of text extract with Max.
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 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).
(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.
Change 125689 had a related patch set uploaded by Prtksxna: Add classes and elements to the exclusion list https://gerrit.wikimedia.org/r/125689
(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.
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.
.noexcerpt
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
Change 125689 abandoned by Prtksxna: Add classes and elements to the exclusion list https://gerrit.wikimedia.org/r/125689
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.
*** Bug 63998 has been marked as a duplicate of this bug. ***