Henning Snater has submitted this change and it was merged.
Change subject: minor documentation update on wikibase.entity, added some TODOs
......................................................................
minor documentation update on wikibase.entity, added some TODOs
Change-Id: I95c057d222f0e001213d0b21bb8828234d95fa8b
---
M lib/resources/wikibase.js
1 file changed, 16 insertions(+), 6 deletions(-)
Approvals:
Henning Snater: Verified; Looks good to me, approved
diff --git a/lib/resources/wikibase.js b/lib/resources/wikibase.js
index 78dbb0b..12f88df 100644
--- a/lib/resources/wikibase.js
+++ b/lib/resources/wikibase.js
@@ -60,12 +60,16 @@
};
/**
- * Caches all entity information when loading the page.
- * @var {Object}
+ * This will be set to an Entity object in case the viewed page uses an
entity view generated by
+ * PHP's EntityView class. IF this is not the case, the value will be
null.
+ *
+ * TODO: Get rid of this global object since there could be several
jQuery.wikibase.entityview
+ * widgets initiated. They all can have different entities loaded
and therefore the entity
+ * should be returned by the responsible widget instance instead
of here.
+ *
+ * @type {wb.Entity|null}
*/
- this.entity = {
- claims: []
- };
+ this.entity = null;
/**
* Holds very basic information about all entities used in the pages
entity view. Entity IDs
@@ -74,7 +78,7 @@
* entity data might be incomplete though, it is guaranteed that ID,
and label are provided,
* for wb.Property instances it is also guaranteed that the datatype is
provided.
*
- * TODO: This should vanish from here (since its global) and will be
replaced with a proper
+ * TODO: This should vanish from here (since its global) and should be
replaced with a proper
* store interface which will be injected into each
jQuery.wikibase.entityview
*
* @since 0.4
@@ -85,12 +89,18 @@
/**
* Will hold a list of all the sites after getSites() was called. This
will cache the result.
+ *
+ * TODO: This should go together with the old UI.
+ *
* @var wikibase.Site[]
*/
this._siteList = null;
/**
* Holds a RevisionStore object to have access to stored revision ids.
+ *
+ * TODO: Should go with the implementation of proper store interface
(see fetchedEntities todo)
+ *
* @var wikibase.RevisionStore
*/
this._revisionStore = null;
--
To view, visit https://gerrit.wikimedia.org/r/58536
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I95c057d222f0e001213d0b21bb8828234d95fa8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits