Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35672 META JavaScript performance issues
  3. MDL-36023

Adjust chooserdialogue to only generate and render the dialogue when it's required

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.3.3
    • 2.3.2
    • JavaScript
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • MDL-36023-master
    • Hide

      With the console open:

      • [-] Turn editing on
      • [ ] Confirm that there were no errors in the JS console
      • [ ] Open the activity chooser
      • [ ] Confirm that there were no errors in the JS console
      • [ ] Confirm that the activity chooser appears correctly and functions as expected
      • [-] Open the inspector and find the Activity Chooser in the DOM
      • [ ] Confirm that the chooser HTML appears as expected
      • [ ] Confirm that the chooser HTML appears only once within the DOM
      Show
      With the console open: [-] Turn editing on [ ] Confirm that there were no errors in the JS console [ ] Open the activity chooser [ ] Confirm that there were no errors in the JS console [ ] Confirm that the activity chooser appears correctly and functions as expected [-] Open the inspector and find the Activity Chooser in the DOM [ ] Confirm that the chooser HTML appears as expected [ ] Confirm that the chooser HTML appears only once within the DOM

      At present, the chooser dialogue generates M.core.dialogue (Y.overlay) in the setup_chooser_dialogue function. This is called in the child classes initializer even if the chooser is never displayed.

      I propose we modify this such that we still call setup_chooser_dialogue from the initializer, but when we actually display the dialogue for the first time, we actually instantiate the dialogue. This should reduce load time further.

      It should also make it easier to modify in the future to handle asynchronous loading of the dialogue's contents.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Paul Nicholls Paul Nicholls (Inactive)
            Dan Poltawski Dan Poltawski
            David Monllaó David Monllaó
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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