Opened 10 years ago
Last modified 8 years ago
#11565 closed task
Reduce code duplication in about and error pages — at Initial Version
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.2 |
Component: | general | Version: | 1.0-stable |
Severity: | normal | Keywords: | about error refactoring |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Having to make modifications in both error.html
and about.html
in #11558, I was looking at the duplicated code and possibilities for re-use. That led to the changes in: rjollos.git:t11565. The major change is the extraction of code to a new template environment_info.html
, which is included in both error.html
and about.html
.
The differences I could see between the information displayed on the two pages and the steps I tool to resolve the differences are:
- Headings on tables in
about.html
, but no headings inerror.html
-environment_info.html
has heading on tables. - Plugins table on
about.html
also shows disabled plugins - existing behavior preserved on both pages. - Plugins table on
error.html
links to frames in stacktrace - existing behavior preserved on both pages. - Markup was slightly different, with
div
s enclosing each table onabout.html
, and theid
s on thediv
s rather than on thetable
s, aserror.html
does - tables inenvironment_info.html
now have enclosingdiv
s. - The plugins section on the error page now read Enabled Plugins; on the about page it read Installed Plugins. The
environment_info.html
template reads Installed Plugins, however theerror.html
page continues to show only enabled plugins, whereas theabout.html
page shows both Enabled and Disabled plugins.
The change in markup on error.html
in (4) means that these changes should only be made on the trunk. These changes will also help with #11548, in reducing the number of code changes needed for adding templates to the environment info on about.html
and error.html
(at least on the trunk).
The CSS for #content.error
and #content.about
was very similar. I merged about.css
into trac.css
, and merged several of the rules so that they apply to the new template environment_info.html
.