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

Implement an overflow solution to the needed areas of Moodle

    Details

    • Type: Task
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Themes
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      We need a more general solution to the overflow problems that are plaguing several areas of Moodle 2.0 presently.

      • Tables for layout need to be converted to div structure.
      • Areas containing user content may need wrapping.

      For full details see Development:Themes 2.0 overflow problems

      I will link all issues this will resolve here making this a central solution point.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            samhemelryk Sam Hemelryk added a comment -

            Hi guys,

            I've just attached a patch that achieves the tasks set out in http://docs.moodle.org/en/Development:Themes_2.0_overflow_problems as well as several others.
            All tasks are as follows:

            1. format_text now has an additional option overflowdiv which is off by default. If set to on it wraps the formatted text in a div with the class no-overflow before it is returned.
            2. Reviewed all format_text calls except lesson (MDL-25006) and question (MDL-25032)
            3. Altered the forum structure changing it from tables to divs for layout. The new layout is as similar as I could make and is mostly backwards compatible with themes (should only be minor issues).
            4. Revised all theme's fixing forum display including base, canvas, and standard.
            5. Created a new report layout that gets used for all pages that contain large reports/tables.
            6. Implemented a default report layout for the base theme that is a 2,1 layout.
            7. Implemented report layouts for all themes in core. Some more work needed, Patrick read below.
            8. Added a fifth argument $options to admin_externalpage_setup. There is presently one option pagelayout that can be used to specify a preferred pagelayout. (required to set the report page layout on admin reports).
            9. Shortened CSS selectors for pagelayout within the base then and reviewed all other core themes fixing issues. There were several bugs I found when working with all the themes because of competing selectors, shortening should make these more obvious in the future.

            I've added several watchers to this issue:

            • Everyone: any feedback or thoughts on this issue/patch is most appreciated.
            • Martin, Petr, Eloy: I need someone to review the changes to format_text and admin_externalpage_setup for me + anything more you have time to review (will not commit till the noted two functions have been reviewed).
            • Patrick: brick, fusion, nonzero, and overlay need further thought. I would GREATLY appreciate it if you were to let me know what you think we should do these themes. The problem with the four themes is that the blocks are on the right of the content, which really doesn't work with content that is designed to overflow the page width such as reports. I can easily convert them to display the blocks on the left for this one pagelayout, or we can remove the blocks from those pages although I don't think that is a good idea because of admin reports and loss of navigation. Unfortunately I have had no luck coming up with a cross browser 1,2 page layout that allows for limitless horizontal expansion.

            What I still need to do (most of which could be done either before or after committing):

            1. Implement the solution decided upon for brick, fusion, nonzero, and overlay. Will wait for Patrick + others thoughts.
            2. Fix up magazine's report layout. Presently it just overflows within itself (not at all ideal because most people don't see it) and looks like it will require a much more careful solution.
            3. Come up with a z-index value plan, add it to the docs and review our use of z-index.
            4. Alter existing docs pages with the updated theme information, the report layout, and the changes to shorten selectors.
            5. Create a best practice theme guidelines doc.
            6. Post in the theme's forum and apologise for breaking peoples themes and explain the changes.
            7. Add the reports layout to moodle.org's theme, shouldn't be hard but I havn't done it yet.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Hi guys, I've just attached a patch that achieves the tasks set out in http://docs.moodle.org/en/Development:Themes_2.0_overflow_problems as well as several others. All tasks are as follows: format_text now has an additional option overflowdiv which is off by default. If set to on it wraps the formatted text in a div with the class no-overflow before it is returned. Reviewed all format_text calls except lesson ( MDL-25006 ) and question ( MDL-25032 ) Altered the forum structure changing it from tables to divs for layout. The new layout is as similar as I could make and is mostly backwards compatible with themes (should only be minor issues). Revised all theme's fixing forum display including base, canvas, and standard. Created a new report layout that gets used for all pages that contain large reports/tables. Implemented a default report layout for the base theme that is a 2,1 layout. Implemented report layouts for all themes in core. Some more work needed, Patrick read below. Added a fifth argument $options to admin_externalpage_setup. There is presently one option pagelayout that can be used to specify a preferred pagelayout. (required to set the report page layout on admin reports). Shortened CSS selectors for pagelayout within the base then and reviewed all other core themes fixing issues. There were several bugs I found when working with all the themes because of competing selectors, shortening should make these more obvious in the future. I've added several watchers to this issue: Everyone : any feedback or thoughts on this issue/patch is most appreciated. Martin, Petr, Eloy : I need someone to review the changes to format_text and admin_externalpage_setup for me + anything more you have time to review (will not commit till the noted two functions have been reviewed). Patrick : brick, fusion, nonzero, and overlay need further thought. I would GREATLY appreciate it if you were to let me know what you think we should do these themes. The problem with the four themes is that the blocks are on the right of the content, which really doesn't work with content that is designed to overflow the page width such as reports. I can easily convert them to display the blocks on the left for this one pagelayout, or we can remove the blocks from those pages although I don't think that is a good idea because of admin reports and loss of navigation. Unfortunately I have had no luck coming up with a cross browser 1,2 page layout that allows for limitless horizontal expansion. What I still need to do (most of which could be done either before or after committing): Implement the solution decided upon for brick, fusion, nonzero, and overlay. Will wait for Patrick + others thoughts. Fix up magazine's report layout. Presently it just overflows within itself (not at all ideal because most people don't see it) and looks like it will require a much more careful solution. Come up with a z-index value plan, add it to the docs and review our use of z-index. Alter existing docs pages with the updated theme information, the report layout, and the changes to shorten selectors. Create a best practice theme guidelines doc. Post in the theme's forum and apologise for breaking peoples themes and explain the changes. Add the reports layout to moodle.org's theme, shouldn't be hard but I havn't done it yet. Cheers Sam
            Hide
            korpelainen Mauno Korpelainen added a comment -

            Sam,

            you could add one extra check which may / may not be a problem (depending on situation):

            RTL / LTR support (easy to test with some LTR language)

            Show
            korpelainen Mauno Korpelainen added a comment - Sam, you could add one extra check which may / may not be a problem (depending on situation): RTL / LTR support (easy to test with some LTR language)
            Hide
            korpelainen Mauno Korpelainen added a comment -

            See attached example from a forum post when language is arabian.

            Show
            korpelainen Mauno Korpelainen added a comment - See attached example from a forum post when language is arabian.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Hi Mauno,

            Thanks for the reminder, I've added a couple of CSS lines of CSS to correct the layout on rtl languages.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Hi Mauno, Thanks for the reminder, I've added a couple of CSS lines of CSS to correct the layout on rtl languages. Cheers Sam
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Attached revised patch now, tweaks forum display in a couple of themes that I obviously missed.

            Show
            samhemelryk Sam Hemelryk added a comment - Attached revised patch now, tweaks forum display in a couple of themes that I obviously missed.
            Hide
            skodak Petr Skoda added a comment -

            +1 for the format_text() changes, please commit, thanks!

            Show
            skodak Petr Skoda added a comment - +1 for the format_text() changes, please commit, thanks!
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Hi guys,

            I have no commit the patch and things should be overflowing much better.
            I suspect there will still be areas that need fixing, and possibly even regression.
            Please if you find something create a new bug report for it and provide details about reproducing/finding the issue and then link it to this issue.

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Hi guys, I have no commit the patch and things should be overflowing much better. I suspect there will still be areas that need fixing, and possibly even regression. Please if you find something create a new bug report for it and provide details about reproducing/finding the issue and then link it to this issue. Cheers Sam

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10