Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36558

Add element library to moodle


    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 2.5
    • Administration, Themes

      As discussed at the Perth Hackfest, I'm opening this bug to discuss the idea of adding the Totara element library to Moodle. The main benefits are:

      1. Encourages consistency around the use of UI elements in Moodle
      2. Provide theme designers with a single place to check their themes
      3. Provide developers with examples of how to implement common UI elements correctly
      4. By allowing us to focus on a key set of elements we can ensure they are all implemented really well (including accessibility, usability, right-to-left support, working with responsive design etc.)

      I've pushed an initial version here:


      This is based on the Totara element library but implemented as an admin tool (adding a menu item under Appearance in the administration menu). Some immediate areas for improvement are:

      1. Currently these are just static pages. At the hackfest we discussed providing a more pluggable architecture to allow modules to define their own elements and to dynamically generate pages with code examples, output source code and an example from a single example. For example see the Twitter bootstrap documentation (http://twitter.github.com/bootstrap/base-css.html#forms).
      2. The current pages only show a limited number of basic elements, there are sure to be lots of extra UI elements that should be added.
      3. We should look at which methods are considered best practice and depreciate then remove UI elements that should no longer be used.

            14 Vote for this issue
            23 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.