Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: JavaScript
    • Labels:

      Description

      There are three different filter options available when loading files with the YUI loader:

      • unset;
      • RAW; and
      • DEBUG.

      When unset, the filter will load the minified version of the code.
      When RAW, the filter will load the non-minified version, but with all debugging removed (specifically, all uses of Y.log).
      When DEBUG, the filter loads the (almost) untouched version of the code.

      At present, when $CFG->debug is set, we use the RAW files rather than the DEBUG. This is because the DEBUG versions of the core YUI code possibly give too much verbosity.

      However, now that MDL-37127 has landed, we probably want to return the DEBUG versions of Moodle modules, and the RAW versions of YUI modules.

        Gliffy Diagrams

          Activity

          Hide
          dobedobedoh Andrew Nicols added a comment -

          Hope that this makes sense, but basically there are three options:

          • minified code
          • non-minified code
          • non-minified debug code

          The non-debug code has any call to Y.log() stripped out.

          There are a lot of calls to Y.log() in core YUI code and they don't usually help us much so we generalyl want the non-minified but non debug versions.
          However we want to be able to debug Moodle code so we should return the debug versions of our own modules.

          Show
          dobedobedoh Andrew Nicols added a comment - Hope that this makes sense, but basically there are three options: minified code non-minified code non-minified debug code The non-debug code has any call to Y.log() stripped out. There are a lot of calls to Y.log() in core YUI code and they don't usually help us much so we generalyl want the non-minified but non debug versions. However we want to be able to debug Moodle code so we should return the debug versions of our own modules.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Hi Andrew, I'm moving this up for integration review.
          I've had a quick look at the code and it looks right in the all the right ways.
          I'll take a proper look at this within integration.

          Show
          samhemelryk Sam Hemelryk added a comment - Hi Andrew, I'm moving this up for integration review. I've had a quick look at the code and it looks right in the all the right ways. I'll take a proper look at this within integration.
          Hide
          damyon Damyon Wiese added a comment -

          Thanks Andrew,

          This looks right and my testing did not find any problems. It should be documented that Y.log is now available in a moodle yui module that has been converted to shifter.

          This has been integrated to master.

          Show
          damyon Damyon Wiese added a comment - Thanks Andrew, This looks right and my testing did not find any problems. It should be documented that Y.log is now available in a moodle yui module that has been converted to shifter. This has been integrated to master.
          Hide
          damyon Damyon Wiese added a comment - - edited

          As an aside - even with debugging and theme designer off - the number of separate requests made by the login page in moodle makes me sigh.

          I think getting rid of yui 2in3 should be a priority as well as looking at the option of a single combined yui js file (only 1.3 Mb minified).

          Show
          damyon Damyon Wiese added a comment - - edited As an aside - even with debugging and theme designer off - the number of separate requests made by the login page in moodle makes me sigh. I think getting rid of yui 2in3 should be a priority as well as looking at the option of a single combined yui js file (only 1.3 Mb minified).
          Hide
          dobedobedoh Andrew Nicols added a comment -

          Damyon Wiese I'm hoping that MDL-38391 should reduce some of those a bit, and I intend to try and convert many of our YUI3 modules to utilise lazy loading to help here too.

          I'd really like to rid us of YUI 2in3 too - YUI 3.9.0 will be out in the next few weeks (hopefully in time for 2.5 freeze) and it includes an implementation of Y.Tree which has prevented us from migrating some parts of the file picker and file manager away from YUI2.

          Show
          dobedobedoh Andrew Nicols added a comment - Damyon Wiese I'm hoping that MDL-38391 should reduce some of those a bit, and I intend to try and convert many of our YUI3 modules to utilise lazy loading to help here too. I'd really like to rid us of YUI 2in3 too - YUI 3.9.0 will be out in the next few weeks (hopefully in time for 2.5 freeze) and it includes an implementation of Y.Tree which has prevented us from migrating some parts of the file picker and file manager away from YUI2.
          Hide
          ankit_frenz Ankit Agarwal added a comment -

          Works as described!
          Thanks

          Show
          ankit_frenz Ankit Agarwal added a comment - Works as described! Thanks
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

          Thanks!

          PS: Yay, legacy template messages. Yes, you're ok, we don't have CVS anymore!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks! PS: Yay, legacy template messages. Yes, you're ok, we don't have CVS anymore!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/13