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

Break core/templates into smaller, constituent parts

XMLWordPrintable

      I'm raising this partially because it's a blocker to JS Unit testing, but partially because it makes sense.

      We currently have a monolithic core/templates module which is responsible for:

      • fetching templates
      • caching templates
      • rendering templates
      • inserting template content into the DOM

      This is unsustainable for several reasons:

      • it's now a massive file which is hard to maintain, and understand
      • it makes it damned near impossible to provide an alternative way to fetch templates when WS are not available (e.g. in unit tests).

      I'm raising this issue to break apart the core/templates module into:

      • core/templates - the entrypoint and b/c layer providing all of the DOM manipulation
      • core/local/templates/renderer - the Renderer class and management
      • core/local/templates/loader - responsible for fetching and caching of templates

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Paul Holden Paul Holden
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 15 minutes
                1d 15m

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