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

Rewrite help popup to use moodle-core-notification and restyle

    Details

    • Testing Instructions:
      Hide

      I'd advise having your browsers inspector up for these tests in case of JS issues.

      Note: I've added caching of help strings, however this caching is disabled when you're in developer mode. This is intended to make it easier for people trying to write modules to work on help strings without having to constantly refresh their browser to see how they work/look in situ.
      Some of these tests ask you to confirm that the text was not re-fetched. Obviously if you have developer mode enabled then you will get these help texts returned and the test will look like it's failing (it's not really).

      • Open a course
      • Turn editing on
      • Turn off the activity chooser
      • Click the help icon next to the 'Add a resource...' dropdown
      • Confirm:
        • that text was shown with a spinner to say that the dialogue was loading (you may need to add a sleep(3) into help.php for this)
        • that the Network activity tab in your browser inspector showed a page fetch to help.php
        • that the correct help text is displayed
        • that the correct help title is displayed
        • that you can drag the dialogue around the screen by the title bar
        • *that the [x] in the top right corner was focused by defualt
      • Click the [x] in the top corner with the keyboard to close the help
        • Confirm that the popup closed
      • Re-open the same help
      • Click the [x] in the top corner with the mouse to close the help
        • Confirm that the popup closed
      • Re-open the same help
      • Confirm:
        • that the dialogue did not inform you that it was loading
        • that the Network activity tab in your browser inspector didn't show a new page fetch
        • that the help loaded relatively quickly
      • Click elsewhere on the page not a link
        • Confirm that the popup closed
      • Re-open the same help
      • Press the escape key
        • Confirm that the popup closed
      • Re-open the same help
      • Click on the help for the 'Add an activity...' dropdown
      • Confirm:
        • that the Network activity tab in your browser inspector showed a new page fetch to help.php
        • that the correct help text is displayed
        • that the correct help title is displayed
      • Navigate to Site administration -> Users -> Permissions -> Define roles
      • Click on the help on the 'Role' column
      • Confirm:
        • that the Network activity tab in your browser inspector showed a page fetch to help.php
        • that the correct help text is displayed
        • that the correct help title is displayed
        • that the 'More help' link is shown correctly in the bottom right-hand corner of the popup
        • that you can tab from the [x] to the 'More help' link
      • Click on the 'More help' link
        • If you have doctonewwindow set (and MDL-35836 has hit master now) then this will open in a popup
        • If yo don't have doctonewwindow set, the page will load in the same window
      • Disable JavaScript in your browser
      • Refresh the page
      • Click on the help icon again
        • Confirm that the help opens correctly (not a JS popup)*
      Show
      I'd advise having your browsers inspector up for these tests in case of JS issues. Note: I've added caching of help strings, however this caching is disabled when you're in developer mode. This is intended to make it easier for people trying to write modules to work on help strings without having to constantly refresh their browser to see how they work/look in situ. Some of these tests ask you to confirm that the text was not re-fetched. Obviously if you have developer mode enabled then you will get these help texts returned and the test will look like it's failing (it's not really). Open a course Turn editing on Turn off the activity chooser Click the help icon next to the 'Add a resource...' dropdown Confirm: that text was shown with a spinner to say that the dialogue was loading (you may need to add a sleep(3) into help.php for this) that the Network activity tab in your browser inspector showed a page fetch to help.php that the correct help text is displayed that the correct help title is displayed that you can drag the dialogue around the screen by the title bar *that the [x] in the top right corner was focused by defualt Click the [x] in the top corner with the keyboard to close the help Confirm that the popup closed Re-open the same help Click the [x] in the top corner with the mouse to close the help Confirm that the popup closed Re-open the same help Confirm: that the dialogue did not inform you that it was loading that the Network activity tab in your browser inspector didn't show a new page fetch that the help loaded relatively quickly Click elsewhere on the page not a link Confirm that the popup closed Re-open the same help Press the escape key Confirm that the popup closed Re-open the same help Click on the help for the 'Add an activity...' dropdown Confirm: that the Network activity tab in your browser inspector showed a new page fetch to help.php that the correct help text is displayed that the correct help title is displayed Navigate to Site administration -> Users -> Permissions -> Define roles Click on the help on the 'Role' column Confirm: that the Network activity tab in your browser inspector showed a page fetch to help.php that the correct help text is displayed that the correct help title is displayed that the 'More help' link is shown correctly in the bottom right-hand corner of the popup that you can tab from the [x] to the 'More help' link Click on the 'More help' link If you have doctonewwindow set (and MDL-35836 has hit master now) then this will open in a popup If yo don't have doctonewwindow set, the page will load in the same window Disable JavaScript in your browser Refresh the page Click on the help icon again Confirm that the help opens correctly (not a JS popup)*
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:

      Description

      I've done some initial work to update the help tooltip to style it similarly to other popups and alerts in Moodle.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  12 Vote for this issue
                  Watchers:
                  16 Start watching this issue

                  Dates

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