Skip to content

WIP: Banzai debug mode

What does this MR do?

Adds "debug" functionality to banzai rendering so one can trace changes to structure of the HTML as various filters are applied. As of yet: I've simply subclassed the Pipeline object and passed back a history of filters and their outputs. We still need to enable a feature flag for this and add the UI to display these data. @smcgivern with a little more time I am hoping to clean this up some. While I'm happy with the way I've handled the html-pipeline object I'm not really happy with the way I am passing back the actual hash object from html pipeline. Its probably better to create a class of object that can be handled consistently and has to_s and to_html methods. Also, tests are still failing as a result of the way I've changed this and I'll need to go in and fix those. I've sort of held off on this because Im not sure I like the implementation I went with here.

Are there points in the code the reviewer needs to double check?

This is still WIP but would need to make sure this doesn't cause problems with any of the many places Banzai is used.

Why was this MR needed?

Its a feature request in response to: https://gitlab.com/gitlab-org/gitlab-ce/issues/42091

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by John Mandalakas

Merge request reports