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

Messaging should warn if you try to navigate to another page with an un-sent message

XMLWordPrintable

    • MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • MDL-82944-main
    • Hide

      Test scenario

      1. Log in as any user.
      2. Toggle the messaging drawer by clicking on the 'Messages' icon on the top navbar.
      3. Click on your own name in the list to bring up the message text box.
      4. Type something in the text box.
      5. Close the message drawer.
      6. Click on your browser's refresh button.
      7. CONFIRM you receive a toast notification about an unsent message.
      8. CONFIRM you can see your unsent message in the message drawer (draw is opened automatically).
      9. Add some text to the unsent message.
      10. Navigate to a different page.
      11. CONFIRM you receive a toast notification about an unsent message.
      12. Send your message using the send button.
      13. Navigate to a different page.
      14. CONFIRM you DO NOT receive a toast notification.
      15. Go to YOURMOODLESITE/message/index.php.
      16. Click on your own name in the list to bring up the message text box.
      17. Type something in the text box.
      18. Click on your browser's refresh button.
      19. CONFIRM you receive a toast notification about an unsent message.
      20. CONFIRM you can see your unsent message in the main message panel area (and not in the message drawer).
      21. Send your message using the send button.
      22. Click on one of the links that would take you to another page.
      23. CONFIRM you DO NOT receive a toast notification.
      24. Open the message drawer and use the search area to find a user you do not have a prior conversation with.
      25. Click on their name and type some text into the text area.
      26. Navigate to another page without sending the message.
      27. CONFIRM you receive a toast notification about an unsent message.
      28. CONFIRM you can see your unsent message in the message drawer.
      Show
      Test scenario Log in as any user. Toggle the messaging drawer by clicking on the 'Messages' icon on the top navbar. Click on your own name in the list to bring up the message text box. Type something in the text box. Close the message drawer. Click on your browser's refresh button. CONFIRM you receive a toast notification about an unsent message. CONFIRM you can see your unsent message in the message drawer (draw is opened automatically). Add some text to the unsent message. Navigate to a different page. CONFIRM you receive a toast notification about an unsent message. Send your message using the send button. Navigate to a different page. CONFIRM you DO NOT receive a toast notification. Go to YOURMOODLESITE /message/index.php. Click on your own name in the list to bring up the message text box. Type something in the text box. Click on your browser's refresh button. CONFIRM you receive a toast notification about an unsent message. CONFIRM you can see your unsent message in the main message panel area (and not in the message drawer). Send your message using the send button. Click on one of the links that would take you to another page. CONFIRM you DO NOT receive a toast notification. Open the message drawer and use the search area to find a user you do not have a prior conversation with. Click on their name and type some text into the text area. Navigate to another page without sending the message. CONFIRM you receive a toast notification about an unsent message. CONFIRM you can see your unsent message in the message drawer.
    • Hide

      Code verified against automated checks.

      Checked MDL-82944 using repository: https://github.com/davewoloszyn/moodle.git

      More information about this report

      Built on: Thu Dec 19 07:50:13 AM UTC 2024

      Show
      Code verified against automated checks. Checked MDL-82944 using repository: https://github.com/davewoloszyn/moodle.git main (0 errors / 0 warnings) [branch: MDL-82944-main | CI Job ] More information about this report Built on: Thu Dec 19 07:50:13 AM UTC 2024
    • Show
      Launching automatic jobs for branch MDL-82944 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/17766/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/60507/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/60508/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/60509/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/60510/ App tests (stable app version) Built on: Thu Dec 19 08:25:46 UTC 2024
    • 6
    • Team Hedgehog 2024 Sprint 3.3, Team Hedgehog 2024 Review 4, Team Hedgehog 2024 Sprint 4.1, Team Hedgehog 2024 Sprint 4.2, Team Hedgehog 2024 Sprint 4.3, Team Hedgehog 2025 Sprint 1.0

      When you start typing a message and navigate to another page, the text you have typed is lost, which is expected because there is no concept of drafts in messaging, however it also does not warn you that will happen.

      We should trigger a warning when trying to navigate away  when there's un-sent text in the messaging panel (eg marking the form element dirty).

      Note that MDL-82539 changes the drawer into a floating panel, so 4.5 (main at the time of writing) may or may not need a slightly different patch, depending on the implementation (it should not warn you if you simply collapse the panel, since that persists, but if there is un-sent text, it should warn you whether the panel is open or not).

       

        1. MDL-82944.png
          MDL-82944.png
          796 kB
        2. unsent-message-string.png
          unsent-message-string.png
          156 kB
        3. unsent-message-toast.png
          unsent-message-toast.png
          119 kB

            david.woloszyn@moodle.com David Woloszyn
            michaelh Michael Hawkins
            Safat Shahin Safat Shahin
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 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 - 2 days, 6 hours, 46 minutes
                2d 6h 46m

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