-
Bug
-
Resolution: Fixed
-
Minor
-
2.5
-
MOODLE_25_STABLE
-
MOODLE_26_STABLE
-
To facilitate breaking up a few YUI modules into smaller, more manageable components, it would be really helpful to properly support submodules properly within our loader.
This will enable us to break apart things like:
- moodle-core-notification into:
- moodle-core-notification
- moodle-core-notification-alert
- moodle-core-notification-confirm
- moodle-core-notification-chooser
- moodle-core-notification-tooltip
- moodle-core-dock into:
- moodle-core-dock
- moodle-core-dock-loader
- moodle-course-dndupload into:
- moodle-course-dndupload
- moodle-course-dndupload-loader
And other similar changes. This will help us to make some modules accessible more easily in smaller chunks. For example: We rarely make use of moodle-core-notification-alert, but it is a type of notification. The notification module is used in almost every page of Moodle (e.g. for help tooltips). Breaking it apart would allow us to selectively load it reducing our bandwidth potential massively.
It also allows for easier provision of a tiny loader which can check functionality before loading the full module. samhemelryk has proposed such a design in his conversion of the dock to YUI. I have a similar plan in mind for the conversion of course dndupload. Rather than loading the full 13k of minified js, we load 300bytes which load the full content only if required on that page. This will help us to not download large amounts of content for devices which simply cannot support the functionality - e.g. mobile devices where displaying the dock makes little to no sense and don't typically support any drag and drop upload.