Last modified: 2014-02-26 12:53:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58281, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56281 - Support declaring multiple 'schemas' inside a single RL module
Support declaring multiple 'schemas' inside a single RL module
Status: NEW
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-28 22:48 UTC by Jon
Modified: 2014-02-26 12:53 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2013-10-28 22:48:16 UTC
Arguably it would be convenient and consistent with other ResourceLoader modules if one could create a single module defining various schemas. Capturing as a bug report so this request and discussion is not lost:

POC:
* https://gerrit.wikimedia.org/r/#/c/91512/
* https://gerrit.wikimedia.org/r/#/c/91515/
Comment 1 Jon 2013-10-28 22:49:14 UTC
Quoting discussions from those patches:

FOR (Jon)
It's mostly a matter of code hygiene from my perspective and consistency with the rest of ResourceLoader.
ResourceLoader modules consistent of name value pairs.
The names tend to always be plural and the values tend to accept array or strings with the exceptions of position and class.
Thus it is strange to me that schemas do not follow this pattern when there is no reason they cannot.
I think the fact we can currently only have one schema per module is dangerous. In mobile we currently have various active schemas but no central module they are contained. I believe that by grouping all schemas in one module it becomes clearer what schemas are currently active and encourages revisiting whether they should still be active. When writing this patch for example I realised we still have a schema active that measures watch star usage and as far as I know nothing is currently happening with that data and makes me wonder if it should be removed.
Although minimal and less of a concern every module added increases the size of the MediaWiki startup module. As more teams create schemas this will balloon and this is in my eyes unnecessary.

AGAINST (Ori):
I don't think the comparison to the ability to specify multiple CSS or JS files in a single module declaration is apt. A module represents a discrete, logical unit, not a bundle.  A collection of schemas is not a logical unit. "The set of schemas we happen to be currently using" describes a group, not a unified whole.
I agree that the current syntax for declaring schema modules is inelegant and repetitive, but I don't think this is the right way to resolve it.
EventLogging falls outside the scope of my current role. The current method for registering schemas as modules is stable and familiar. I am inclined to avoid tampering with it until someone comes along and makes this work their primary focus.
Comment 2 Andre Klapper 2014-02-26 12:53:26 UTC
[moving from MediaWiki extensions to Analytics product - see bug 61946]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links