WIP: Cleanup HTML trace rendered by Ansi2html
What does this MR do?
As part of the cleanup after deploying collapsible job logs we needed to remove some extra <span>
tags that were generated.
This caused the overall size of the HTML to increase and potentially cause https://gitlab.com/gitlab-org/gitlab-ce/issues/63503
Although this may not fix yet the performance issue it contributes to having a cleaner HTML to work with.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Work still pending
- Use
prepend-left-default
to indent sub-sections - Fix color resets: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30018#note_184956787
- reduce number of
<span>
tags by trying to include as much as possible inside a single tag. Right now we generate 1<span>
tag per line. Instead we should close/open tags when: (1) style changes, (2) start/end of a section, (3) to wrap the first line of a section (header), (4) to close the end of a trace.
Edited by Fabio Pitino