User "Catrope" changed the status of MediaWiki.r97104.

Old Status: new
New Status: ok

User "Catrope" also posted a comment on MediaWiki.r97104.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97104#c23669
Commit summary:

[ResourceLoader2] Next phase of the gadget manager
* Changed internal object named 'gadget' to be the object returned by the API. 
The API provides all the needed data. Previously it was a manually constructed 
object of which the 'metadata' property came from the api:
{
  id: $el.data('gadgetname'),
  title: $el.text(),
  metadata: query.gadgets[0].metadata
}.
* Now passing around the gadget object by reference and keeping it up to date, 
from original retrieval from the api, all the way to JSON.stringify sent to 
ApiEdit.
* Implementing the doModifyGadget() stub:
-- ApiEdit
-- Using gadget.definitiontimestamp from the API as basetimestamp for ApiEdit 
(instead of another request like prop=revisions&rvprop=timestamp).
-- For the 'starttimestamp': a ISO 8601 formatted version of the Date() object 
that is created when the user first opens the editor.
(Date.prototype.toISOString is not available cross-browser yet and includes 
milliseconds as well, in contrary to what MediaWiki uses).
* Changing API methods to not pass status as second argument. Instead using 
separate success/error callbacks.
* Clean up gm.ui methods a bit
* Change ui methods to use a passed categories array instead of defining it, 
calling a function which assumes the variable is set and then unsetting it (why 
did I do that?). So removing gadgetCategoriesCache in the UI code (It still 
makes sense in the API file).
* Add some /qqq entries for i18n
* Making gadgetmanager-table sortable. +increasing padding-right on the cells 
to account for the sortHead-icon. +wrapping <th> row in <thead>


NOTE:
* The editor is fairly complete, but there is still work to be done.
* Right now it's working fairly well in modern browsers.
* Going to come back to this part later on. Right now the branch needs a 
working preferences panel for shared gadgets first.

Comment:

<pre>
+                                               if ( data && data.edit && 
data.edit ) {
</pre>
That's a bit pleonastic <sup>(WHY oh WHY does Firefox's dictionary not know 
about ''pleonastic''? It's an awesome word!)</sup>, maybe you meant <code>data 
&& data.edit && data.edit.result</code>?

<pre>
+       function ISODateString( d ) {
</pre>
This is duplicated from somewhere in mw.loader, which also formats ISO 8601 
timestamp. It should be factored out into a standalone module.

OK otherwise. Marking as such and adding todo for the ISO 8601 thing.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to