https://bugzilla.wikimedia.org/show_bug.cgi?id=56561
Matthew Flaschen <mflasc...@wikimedia.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mflasc...@wikimedia.org --- Comment #4 from Matthew Flaschen <mflasc...@wikimedia.org> --- (In reply to Quim Gil from comment #1) > Does anybody know the estimate effort of this task? Would it be simple for a > newcomer to dive into it? Is there anybody willing to mentor a potential > junior taker? There's a couple ways to do it. The API way is discussed below (saves items one at a time and uses the actual API without wasting bandwidth). It could also be done by posting the entire preferences form every time you change anything. This is kind of wrong in that it's a waste of bandwidth and doesn't use the API, but it would probably be faster to develop, since the server doesn't know the difference, and the form can be serialized with $.serialize. ---- There is an API for saving preferences already (https://www.mediawiki.org/wiki/API:Options). That means the main issues are: 1. Figuring out what changed. 2. Figuring out to map the form elements to the name and value. For text and regular select inputs this is trivial (drop the wp prefix from the name and call .val()). E.g.: editfont: $( '#mw-input-wpeditfont' ).val() Checkboxes and radio buttons are a little more complicated, but not unduly (checkboxes need to be saved even if unchecked, radio buttons have multiple elements with the same name, so straight ID check doesn't work). There are some edge cases that might be more complicated, like HTMLCheckMatrix. Everything is componentized (see includes/htmlform), and you can see on the client-side which component is being used from the class name (e.g. mw-htmlform-field-HTMLCheckMatrix). It's neither trivial nor impossibly complicated. Maybe 2-3 weeks for a quick newcomer with prompt code review; more if they're working on it less frequently. -- You are receiving this mail because: You are the assignee for the bug. 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