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

Glossary: Use large modal for auto-linking

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.5.2, 5.0
    • Glossary
    • MOODLE_405_STABLE, MOODLE_500_STABLE
    • MDL-84693-main
    • Hide
      1. Enable the glossary auto-linking filter under Site administration -> Plugins -> Filters -> Manage filters.
      2. Create a "Glossary" in a course.
        • Make sure Automatically link glossary entries is enabled.
      3. Click "Add entry".
        • Concept: "wide table"
        • Definition:

          <table style="border-collapse: collapse; width: 100%;" border="1">
            <tbody>
              <tr>
                <td>This</td>
                <td>table</td>
                <td>is</td>
                <td>wide</td>
                <td>enough</td>
                <td>not</td>
                <td>to</td>
                <td>fit</td>
                <td>into</td>
                <td>the</td>
                <td>modal</td>
                <td>that</td>
                <td>opens</td>
                <td>when</td>
                <td>you</td>
                <td>click</td>
                <td>the</td>
                <td>auto-linked</td>
                <td>phrase</td>
                <td>without</td>
                <td>scrolling</td>
              </tr>
            </tbody>
          </table>
          

        • Enable This entry should be automatically linked under Auto-linking.
      4. Create a "Text and media area" in the same course.
        • Text: "wide table"
      5. Go to the course page.
      6. Click the auto-linked phrase "wide table"

      Expected behaviour: There is no horizontal scrollbar inside the modal.

      Show
      Enable the glossary auto-linking filter under Site administration -> Plugins -> Filters -> Manage filters. Create a "Glossary" in a course. Make sure Automatically link glossary entries is enabled. Click "Add entry". Concept: "wide table" Definition: <table style="border-collapse: collapse; width: 100%;" border="1"> <tbody> <tr> <td>This</td> <td>table</td> <td>is</td> <td>wide</td> <td>enough</td> <td>not</td> <td>to</td> <td>fit</td> <td>into</td> <td>the</td> <td>modal</td> <td>that</td> <td>opens</td> <td>when</td> <td>you</td> <td>click</td> <td>the</td> <td>auto-linked</td> <td>phrase</td> <td>without</td> <td>scrolling</td> </tr> </tbody> </table> Enable This entry should be automatically linked under Auto-linking. Create a "Text and media area" in the same course. Text: "wide table" Go to the course page. Click the auto-linked phrase "wide table" Expected behaviour: There is no horizontal scrollbar inside the modal.
    • Hide

      Code verified against automated checks.

      Checked MDL-84693 using repository: https://github.com/t-schroeder/moodle.git

      More information about this report

      Built on: Tue Mar 11 09:49:38 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84693 using repository: https://github.com/t-schroeder/moodle.git main (0 errors / 0 warnings) [branch: MDL-84693-main | CI Job ] More information about this report Built on: Tue Mar 11 09:49:38 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84693 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18520/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63416/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63417/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63418/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/63419/ App tests (stable app version) Built on: Tue Mar 11 10:25:32 UTC 2025

      With the glossary auto-linking filter you can click an auto-linked word and a modal opens. That modal, however, has a max width of 500px. For some content, e.g. certain tables that is too narrow and you get scroll bars inside the modal. My suggestion would be to just make the modal wider by passing `large: true` so it ends up with a max width of 800px.

        1. 84693 peer review - test.png
          111 kB
          Andrew Gosali
        2. current-500px.png
          127 kB
          Tim Schroeder
        3. suggestion-800px.png
          145 kB
          Tim Schroeder

            tschroeder Tim Schroeder
            tschroeder Tim Schroeder
            Andrew Gosali Andrew Gosali
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

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