https://bugzilla.wikimedia.org/show_bug.cgi?id=26799

--- Comment #5 from Krinkle <krinklem...@gmail.com> 2011-02-19 00:35:49 UTC ---
(In reply to comment #4)
> These are functions that target mediawiki page interfaces. For example, How
> would these function be useful for an embed-player iframe page that just
> outputs a video player? ( In that context there are no portlet links etc. )...
I don't think that matters. That embed player would end up on a MediaWiki page
eventually, right ? So it could need addPortletLink. Or when it builds an
iframe, perhaps it builds a mediawiki-like list of links somewhere (ie.
#p-myvideoplayer), then you can use this function for it  as well.

Generally not needing a function in certain scenario is harmless. There are
many classes, functions and variables in MediaWiki core not needed on most
pages but they're initialised anyway since there's no way of knowing what is
'needed'. I know one case doesn't always justify another, but take
GlobalFunctions for example. Many useful functions there but not needed on
every page in every scenario.


> but the video player might want to escape some attributes or convert a title
> key into a link. 
Escaping attributes is done in mw.html though.


> I think its worthwhile to distinguish utility functions related to the main
> mediawiki page interface vs utility function that could be useful across
> multiple mediawiki js use contexts / interfaces.

I think it makes more sense to be distinguishing between "within MediaWiki" and
"re-using outside MediaWiki" scenarios rather than "on MediaWiki articles" and
"MediaWiki extensions iframe".

The functions are there, if you don't need them there that's fine. They're
cached anyway. If you'd seperate modules like that, that means different
resource requests and less cache use.

Then the client needs to re-download all functions because in that iframe the
resourceloader link would not request "mediawiki.articleutils" module or
whatever.


(bug 27149 refers to this bug)

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to