https://bugzilla.wikimedia.org/show_bug.cgi?id=54082
Web browser: ---
Bug ID: 54082
Summary: Getting rid of wikibase.fetchedEntities (global
front-end data store) and its usage in
jQuery.wikibase.***view widgets
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: WikidataRepo
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
Ever since we started with the "new UI", so basically the
jQuery.wikibase.***view widgets, we have been using wikibase.fetchedEntities as
a global front-end data store. This store is being accessed in the view
widgets. It is just a plain object where each field key is an entity ID and the
content is a "wikibase.store.FetchedContent" object holding an
"wikibase.Entity" instance as its content.
In case of the php EntityView and on certain special pages (e.g. SimpleQuery
special page) the backend is generating a serialized, "basic" version of all
used entities and puts that serialized form into the mw.config var
"wbUsedEntities". In the front-end code initializing the respective view, the
"wbUsedEntities" is being deserialized and put into wikibase.fetchedEntities.
In some cases, e.g. creating a new claim via the claimview widget, the widget
will receive information about the entities used in the new claim (e.g. main
snak's property) and add it to wikibase.fetchedEntities.
Instead of having this "global store", we should just inject some proper store
instance into the widgets. There should be a proper interface for the store and
different implementations. When requesting data from the store, a promise
should be returned to support asynchronous store implementations.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l