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

Limit number of events shown per day in calendar month view

XMLWordPrintable

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-72237-master
    • Hide

      add 5 events to the same day, for instance 3rd august

      all events should be visible on /calendar/view.php and calendar block

      add 6 events to the same day, for instance 3rd august

      first 4 events and "2 more" link should be shown in calendar day block:

      Clicking "2 more" link takes you to calendar day view.

      Try to add one more event, the link should become "3 more"

      Add/delete events should update "X more" link

      • Add 5 user events to a day in calendar
      • Add one more user event, the day events should be refreshed, first 4 events and "2 more" link are show
      • delete one of the event, "X more" link should disappear and all 5 events are shown

       

      add 6 user type events and 5 site type events to same day

      • should be able to see the first 4 events and "7 more" link
      • use the event filters (in Events Key block)
      • click Hide user events, should be able to see all site events visible
      • click "Show user events", and the calendar shows the first 4 events and "7 more"
      • click "Hide site events", the calendar shows the first 4 user events and "2 more" link
      • click "Show site events", and the calendar shows the first 4 events and "7 more"

       

       

      Show
      add 5 events to the same day, for instance 3rd august all events should be visible on /calendar/view.php and calendar block add 6 events to the same day, for instance 3rd august first 4 events and "2 more" link should be shown in calendar day block: Clicking "2 more" link takes you to calendar day view. Try to add one more event, the link should become "3 more" Add/delete events should update "X more" link Add 5 user events to a day in calendar Add one more user event, the day events should be refreshed, first 4 events and "2 more" link are show delete one of the event, "X more" link should disappear and all 5 events are shown   add 6 user type events and 5 site type events to same day should be able to see the first 4 events and "7 more" link use the event filters (in Events Key block) click Hide user events, should be able to see all site events visible click "Show user events", and the calendar shows the first 4 events and "7 more" click "Hide site events", the calendar shows the first 4 user events and "2 more" link click "Show site events", and the calendar shows the first 4 events and "7 more"    
    • 1
    • HQ Team International Sprint 5, HQ Team International Sprint 6, HQ Team International Sprint 7, HQ Team International Sprint 8, HQ Team International Sprint 9, HQ Team International Sprin 10, HQ Team International CI H2-21, HQ Team International CIH2-212

      So that we don't have an infinite list of calendar events making long lists and taking up a lot of space, we need to compress events in the month view so they take up less vertical space, and also limit how many we are showing to users.

      Requirements

      On the calendar page and "bigger" calendar block view, this involves:

      1. Reducing the vertical spacing between events (this appears to be achievable by setting the relevant CSS to line height 1, instead of its currently inherited 1.5).
      2. Limiting the list of events in any date to 5 items.
      3. If more than 5 items exist in a day, display the first 4 and add text below indicating how many more exist. For example, if there are 6 events, show 4 and have text reading "2 more".
      4. The "x more" text should be bold and displayed as a link, linking to the day view for the relevant date.

      A mockup of how the above could look:

       

       

      Discussed with michaelh , this ticket is going to only apply the limit to the main calendar in main region, no changes to calendars in the blocks.

       

      In the "smaller" calendar block view, this involves:

      1. Limiting the popover list of a day's events to 5 items.
      2. If more than 5 items exist in a day, display the first 4 in the popover, and add bold text below those with "x more" as above. If possible, those should link to the day calendar, though I believe there is an open bug relating to links not working here, if that's the case just include the text in bold (black). If possible in future, we can look at adding a link if necessary.

      In all calendar blocks/main calendar:

      • Ensure all days are dis-played with the same height (rather than different rows being different if they have more events), and set an appropriate maximum height (taking into account other points above).

        1. calendar.webm
          794 kB
          Ilya Tregubov
        2. calendar-list-compressed.jpg
          4 kB
          Michael Hawkins
        3. image-2021-08-02-15-14-41-573.png
          17 kB
          Dongsheng Cai
        4. image-2021-11-10-12-50-19-683.png
          653 kB
          Dongsheng Cai
        5. image-2021-11-23-23-53-52-052.png
          63 kB
          Dongsheng Cai
        6. MDL-72237_test.webm
          929 kB
          Angelia Dela Cruz
        7. screenshot-1.png
          284 kB
          Dongsheng Cai
        8. screenshot-2.png
          39 kB
          Dongsheng Cai

            dongsheng Dongsheng Cai
            michaelh Michael Hawkins
            Huong Nguyen Huong Nguyen
            Ilya Tregubov Ilya Tregubov
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 2 hours, 30 minutes
                1w 3d 2h 30m

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