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.