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

--- Comment #32 from Krinkle <krinklem...@gmail.com> 2012-01-11 16:56:39 UTC ---
(In reply to comment #31)
> (In reply to comment #28)
> > This loading order is simply wrong. We should let the output become a module
> > and actually make it use ResourceLoader. That'll slim the page weight, be
> > better cacheable, and solves the order problem.
> 
> That entails a lot of work. The CSS is injected by geshi.php, and does so
> dynamically depending on what highlighting is required. The entire CSS
> collection for all languages GeSHi supports is over 100KB.

I'm thinking of modules like "ext.geshi.highlight.javascript", 
"ext.geshi.highlight.php" etc.

> 
> > I didn't mean moving Geshi.css to the top. I meant, if there is no 
> > stylesheet
> > to put this style in, we can create a _new_ module with a new stylesheet and
> > put that in there and load it in the top. 
> 
> This would also require that GeSHi write a temporary (cachable?) CSS file 
> which
> is then served by RL.

CSS and JS doesn't have to be read from a static file for ResourceLoader to do
it's caching and loading logic. It can be dynamically generated and
concatenated from anywhere.

By having them as modules they'll load faster (since they'd be minified,
combined and potentially cached from one page to another and reducing raw html
pay load).


> (Re: multiple loading of Geshi.css)
> > > Just look at the source of [[MediaWiki talk:Common.css]] to see what
> > > I mean.
> > 
> > I see nothing obvious on that wiki page, can you be more specific ?
> 
> Sorry, I meant the HTML source. Each lang option creates an entire block of
> CSS, each with a call to mediawiki:geshi.css attached.

OK

> 
> > > Created attachment 9827 [details]
> > > Patch for extensions/SyntaxHighlight_GeSHi/geshi/geshi.php
> > > 
> > > Is that one of the GeSHi files that's linked via an SVN external?  That 
> > > is, is
> > > it part of GeSHi core?  If so we'll need to upstream it. 
> > 
> > Yup.
> 
> I made this patch specifically for MediaWiki, since it's default skin uses a
> smaller-then-default font size. Other software using GeSHi might also benefit,
> but *may* end up with a too large font if they use the default font size. The
> sanest thing to do fo GeSHi is actually to remove the font-family declaration
> all together, since <pre> and <code> would already display in a monospace 
> font.

Sounds good.

So I see two tasks, the latter of which I'll assign to myself to research (not
execute yet):

#1: Get upstream fixed
#2: Create modules for the Geshi highlighting, so they can be treated as normal
citizens in RL :)

-- 
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