This is an archive of the discontinued LLVM Phabricator instance.

[opt-viewer] Add javascript to expand/hide full message for multiline remarks.
ClosedPublic

Authored by fhahn on Jan 24 2019, 9:59 AM.

Details

Summary

This patch adds support for displaying remarks with multiple
lines. For such remarks, it creates a hidden div
containing the message's lines except the first one in a <pre>
tag. It also prepends a link (with '+' as text) to the regular remark
line. This link can be used to show/hide the div containing the
full remark.

In combination with D57159, this allows for better displaying of
multiline remarks in the html pages generated by opt-viewer.

The Javascript is very simple and should be supported by any recent
major browser.

Event Timeline

fhahn created this revision.Jan 24 2019, 9:59 AM

Can you please describe the user experience?

fhahn updated this revision to Diff 183541.Jan 25 2019, 7:23 AM

Udpate JS, style and tests. Also add a multiline remark to tests.

fhahn edited the summary of this revision. (Show Details)Jan 25 2019, 7:29 AM

The two screenshots below show the multiline remark from the test rendered both hidden and shown.

anemet accepted this revision.Jan 25 2019, 8:09 AM

Awesome and thanks for the test. LGTM!

This revision is now accepted and ready to land.Jan 25 2019, 8:09 AM
This revision was automatically updated to reflect the committed changes.