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

Rewrite Calendar popup to not suck

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.9
    • 2.9
    • Calendar
    • MOODLE_29_STABLE
    • MOODLE_29_STABLE
    • MDL-48943-master
    • Hide
      1. As an administrator, ensure that the calendar block is displayed
      2. Add a number of events:
        1. some on the same day
        2. some at different levels (site vs. course vs. user)
      3. View a page with the calendar block
      4. Play with it:
        1. mouse over the individual cells
        2. mouse off them
        3. Use the keyboard to tab into and out of them overlay and between event days.
      5. Using a screenreader, confirm that the overlay is announced in the same way as before
      6. Click on the month to open the calendar view
      7. Repeat with the right-hand side mini calendars
        Compare with the previous behaviour.
      Show
      As an administrator, ensure that the calendar block is displayed Add a number of events: some on the same day some at different levels (site vs. course vs. user) View a page with the calendar block Play with it: mouse over the individual cells mouse off them Use the keyboard to tab into and out of them overlay and between event days. Using a screenreader, confirm that the overlay is announced in the same way as before Click on the month to open the calendar view Repeat with the right-hand side mini calendars Compare with the previous behaviour.

      The current implementation:

      1. sucks
      2. creates new instances for each of the events in the view
      3. which is memory intensive
      4. and leads to lots of DOM manipulation
      5. and lots of Overlay models being created
      6. and a fair few event handles
      7. and prevents the ability to JS load easily
      8. and did I mention it sucks a bit?

      Have written a new implementation to use appropriate data-attributes instead and to have a single pair of delegated listeners. It allows for background changes to the calendar (e.g. through DOM manipulation to load new months).

        1. do_we_want_that_focus.png
          41 kB
          Eloy Lafuente (stronk7)

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Frédéric Massart Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jetha Chan Jetha Chan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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