[Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration from wikitext messages to CSS styles

2014-12-16 Thread Marc Ordinas i Llopis
All,

TL;DR:
* References made using Cite will be configurable with a different system
* New approach being prototyped in Parsoid's native implementation of the
Cite extension

The Cite extension[0], which provides in-page footnotes is a crucial part
of how many of us use wikis, especially for Wikipedias. However, it was
written a very long time ago, even by MediaWiki standards, and in its
creation, we made some design choices which made sense at the time, but
don't work very well for us anymore.  As CSS has gotten more features, and
those features have become more reliably implemented in modern browsers, we
have more choices now.

One of the great things about the Cite extension is its flexibility, such
as each wiki being able to choose how the footnotes display to readers.
Unfortunately, the means by which this flexibility is provided is currently
done through a series of 14 different MediaWiki namespace wikitext messages
which are interpreted to create the HTML to display to the user.

This has a number of disadvantages. Most wikis use the default values (and
even very experienced users are probably unaware of how it works or even
that it can be changed).  Because they are implemented in wikitext,
per-user changes such as with a gadget or a user script aren't possible to
do neatly (and instead need JavaScript to re-write the content, which is
slower and more complex), and changes take up to 30 days to be visible to
anonymous users whilst they wait for the cache to change. Due to how
MediaWiki's messages system works, changes to the display styles need to be
copied into each of the ~300 display languages for users, else those users
with different languages will see different reference styles on the same
page. Any system that wishes to display MediaWiki references has to
implement most of MediaWiki just to format these references correctly.

To fix this, the Parsoid and editing teams are proposing to replace the
current way to configure the Cite extension with some CSS rules, which will
solve these issues. Experimenting will be much easier to do on a per-user
or gadget-basis in advance of making larger changes. Styles will be shared
by all users of the wiki, regardless of their preferred language, and
complicated user scripts or gadgets that slow down the system will not be
needed to change the style. Changes will be instant for all users, even
those logged out, and non-MediaWIki users can use styles to correctly and
consistently display references. A currently-under-review patch[1] for
Parsoid demonstrates use of CSS to do variations found on enwiki, eswiki,
and fawiki. We think that this approach will allow us to match each of the
current styles used on Wikimedia wikis. If there is any variation
(currently in use) that we should experiment with, please let us know.

We plan to continue to prototype this approach in Parsoid and work through
any rendering issues. Given that most Wikimedia wikis don't customize the
extension, for most Wikimedia wikis, we expect this will work with the
basic configuration (and for a few Wikipedias which need different
configuration, we will add styling). Once we port this solution over to the
master branch of the Cite extension, this will be a breaking configuration
change in the MediaWiki 1.25 release.  If you have a gadget or user script
which changes how references appear or relies on something local to your
wikis, you may need to tweak it.

Given that older browsers (IE6 and IE7 most notably) may not implement the
CSS features that we need for this, we don't plan to rely solely on a
CSS-based approach. Our current approach is to use a default bare HTML
style on browsers that don't support content generation (like ::after and
counters).

We invite your comments, feedback, and help with this.
Thanks,
Marc, Parsoid and Editing teams.

[0] – https://www.mediawiki.org/wiki/Extension:Cite
[1] – https://gerrit.wikimedia.org/r/#/c/170936/
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration from wikitext messages to CSS styles

2014-12-16 Thread Brad Jorsch (Anomie)
On Tue, Dec 16, 2014 at 5:44 AM, Marc Ordinas i Llopis 
marc...@wikimedia.org wrote:

 Due to how MediaWiki's messages system works, changes to the display
 styles need to be copied into each of the ~300 display languages for users,
 else those users with different languages will see different reference
 styles on the same page.


That sounds like bug T33216, which was fixed a while ago. Does this
actually occur now?


-- 
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration from wikitext messages to CSS styles

2014-12-16 Thread Kevin Israel
On 12/16/2014 07:45 AM, Brad Jorsch (Anomie) wrote:
 On Tue, Dec 16, 2014 at 5:44 AM, Marc Ordinas i Llopis 
 marc...@wikimedia.org wrote:
 
 Due to how MediaWiki's messages system works, changes to the display
 styles need to be copied into each of the ~300 display languages for users,
 else those users with different languages will see different reference
 styles on the same page.
 
 
 That sounds like bug T33216, which was fixed a while ago. Does this
 actually occur now?

Though I'm not completely sure this is the one in question, for quite
some time there has been a known issue[1] with the way MediaWiki's
message fallback chain is implemented. A patch[2] to fix this was posted
for review, and I left some comments on it almost a year ago. There have
been no updates since.

[1]: Multiple reports:
 https://phabricator.wikimedia.org/T3495
 https://phabricator.wikimedia.org/T48579
 https://phabricator.wikimedia.org/T50956
 https://phabricator.wikimedia.org/T57473

[2]: https://gerrit.wikimedia.org/r/#/c/72867/

-- 
Kevin Israel - MediaWiki developer, Wikipedia editor
http://en.wikipedia.org/wiki/User:PleaseStand

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] Live preview

2014-12-16 Thread Ricordisamoa

https://gerrit.wikimedia.org/r/#/c/131346/ was finally merged.
Kudos!

Il 09/11/2014 22:02, Derk-Jan Hartman ha scritto:

Hi all,

I've had a significant update to Live Preview in the pipeline for a while now. 
It brings a few major improvements, the most important of it being able to load 
resourceloader modules that the preview requires, fixing a whole slew of 
problems that the old implementation had. The only place where it is a bit 
limited is with regard for previewing the list of languages in in skins other 
than vector.

The code is here: https://gerrit.wikimedia.org/r/#/c/131346/ 
https://gerrit.wikimedia.org/r/#/c/131346/
And it could use some user testing and review.

Some people have been asking me about this lately, so I figured time to strip 
the WIP tag of it and see if we can get this merged already.
Long term, I would like to improve it to make use of mw.template for some of 
the elements, but that is not a necessity right now I think.

DJ
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] MediaWiki flame graphs

2014-12-16 Thread Antoine Musso
Le 16/12/2014 00:42, Ori Livneh a écrit :
 I'm writing to draw your attention to a newly-available resource for
 performance analysis: flame graphs of MediaWiki code.
 
 http://performance.wikimedia.org/xenon/svgs/
 
 Flame graphs are a visualization of application stack traces.
 
 Each application server on the Wikimedia cluster has a software timer that
 interrupts MediaWiki once every ten minutes to capture a stack trace. The
 stack trace shows what the code the application server was in the process
 of executing when the timer expired. A central log aggregator collects
 these traces and uses them to generate flame graphs.
 
 Each box in a flame graph represents a function in the stack. The y-axis
 shows stack depth. The topmost box shows the function that was on-CPU at
 the moment the trace was captured. The function below a function is its
 parent.
 
 The x-axis spans the sample population. The width of the box shows the
 total time it was on-CPU or part of an ancestry that was on-CPU, based on
 sample count.
 
 Here is an example:
 http://performance.wikimedia.org/xenon/svgs/hourly/2014-12-15_22.svgz
 
 To learn more about flame graphs and how to interpret them, see 
 http://www.brendangregg.com/flamegraphs.html.

Well done Ori, they are lovely and make me think of the 90's ascii arts.


-- 
Antoine hashar Musso


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Tech Talk: API Client Libraries: January 6th

2014-12-16 Thread Rachel Farrand
Please join us for the following tech talk:

*Tech Talk**:* A developer's-eye view of API client libraries: how to
choose them, how to make them, how to make them better
*Presenter:* Frances Hocutt
*Date:* January 6
*Time:* 1830 UTC
http://www.timeanddate.com/worldclock/fixedtime.html?msg=tech+talk%3A+API+client+librariesiso=20150106T1830p1=%3Aam=30
Link to live YouTube stream http://www.youtube.com/watch?v=hz__duVeaWY
*IRC channel for questions/discussion:* #wikimedia-office
Google+ page
https://plus.google.com/u/0/b/103470172168784626509/events/c8fnclmkeam2gbrng1cn0g99mi0,
another
place for questions

*Talk description: *This talk will cover why developers do (and don't) use
any of the
wide variety of client libraries available to get and post data
through the MediaWiki API. We'll talk about writing tools with an eye
to developer experience, go through the gold standard for MediaWiki
API client libraries
(https://www.mediawiki.org/wiki/API:Client_code/Gold_standard) and the
thinking behind it, and share some of the resources available for both
library writers and library users.

If you write or maintain an API client library, you'll learn about
what you can do to help your library get out of the way and let
developers who work with it spend their mental energy on putting
together exciting projects, not on fighting with tools. If you work
with the MediaWiki API (write bots, do research, maintain wikis),
you'll learn what to consider when you're choosing a framework for
your project. Either way, you'll start to appreciate all the factors
beyond a library's code that make the difference between fun and easy
development and a frustrating slog.
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration from wikitext messages to CSS styles

2014-12-16 Thread James Forrester
On 16 December 2014 at 04:45, Brad Jorsch (Anomie) bjor...@wikimedia.org
wrote:

 On Tue, Dec 16, 2014 at 5:44 AM, Marc Ordinas i Llopis 
 marc...@wikimedia.org wrote:

  Due to how MediaWiki's messages system works, changes to the display
  styles need to be copied into each of the ~300 display languages for
 users,
  else those users with different languages will see different reference
  styles on the same page.


 That sounds like bug T33216, which was fixed a while ago. Does this
 actually occur now?


​No, this is talking about the problem of changing the rendering styles
needing to be done in each of the customised languages manually​ through
the translation system (and being totally unlike what the translation
system on TranslateWiki.net generally uses and is suited for). It was not
meant to be referring to https://phabricator.wikimedia.org/T33216, which I
believe is still fixed, yes.

J.
-- 
James D. Forrester
Product Manager, Editing
Wikimedia Foundation, Inc.

jforres...@wikimedia.org | @jdforrester
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration from wikitext messages to CSS styles

2014-12-16 Thread Arcane 21
At the risk of sounding stupid, does this mean other wikis will need a Parsoid 
instance to use this extension, or is this simply being tested in a Parsoid 
environment and it's just using CSS instead of wikitext for rendering? If the 
former, not a fan of the idea at all. If the latter, awesome, sounds like a 
great idea.

I'm still confused on the exact details of how this will work, so I'd 
appreciate clarification.

 From: jforres...@wikimedia.org
 Date: Tue, 16 Dec 2014 18:10:46 -0800
 To: wikitech-l@lists.wikimedia.org
 Subject: Re: [Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration 
 from wikitext messages to CSS styles
 
 On 16 December 2014 at 04:45, Brad Jorsch (Anomie) bjor...@wikimedia.org
 wrote:
 
  On Tue, Dec 16, 2014 at 5:44 AM, Marc Ordinas i Llopis 
  marc...@wikimedia.org wrote:
 
   Due to how MediaWiki's messages system works, changes to the display
   styles need to be copied into each of the ~300 display languages for
  users,
   else those users with different languages will see different reference
   styles on the same page.
 
 
  That sounds like bug T33216, which was fixed a while ago. Does this
  actually occur now?
 
 
 ​No, this is talking about the problem of changing the rendering styles
 needing to be done in each of the customised languages manually​ through
 the translation system (and being totally unlike what the translation
 system on TranslateWiki.net generally uses and is suited for). It was not
 meant to be referring to https://phabricator.wikimedia.org/T33216, which I
 believe is still fixed, yes.
 
 J.
 -- 
 James D. Forrester
 Product Manager, Editing
 Wikimedia Foundation, Inc.
 
 jforres...@wikimedia.org | @jdforrester
 ___
 Wikitech-l mailing list
 Wikitech-l@lists.wikimedia.org
 https://lists.wikimedia.org/mailman/listinfo/wikitech-l
  
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] [BREAKING CHANGE] Plans to move Cite configuration from wikitext messages to CSS styles

2014-12-16 Thread James Forrester
On 16 December 2014 at 21:07, Arcane 21 arc...@live.com wrote:

 At the risk of sounding stupid, does this mean other wikis will need a
 Parsoid instance to use this extension, or is this simply being tested in a
 Parsoid environment and it's just using CSS instead of wikitext for
 rendering? If the former, not a fan of the idea at all. If the latter,
 awesome, sounds like a great idea.


​The latter; this has become a pressing need for faithful replication of
expected styles​ for pages rendered using Parsoid, but we'll do this in
both the regular Cite extension and the current re-implementation of it
inside Parsoid. They will share the styling so that it will just work.



 I'm still confused on the exact details of how this will work, so I'd
 appreciate clarification.


​Right now we've not yet confirmed that we can entirely replicate all the
features and configurations that people are using in Cite via the existing
messages in the new​ CSS system. This is mostly a please help and/or tell
us if we're crazy e-mail. :-)

​J.
-- 
James D. Forrester
Product Manager, Editing
Wikimedia Foundation, Inc.

jforres...@wikimedia.org | @jdforrester
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l