Avoid duplicate instantiation and rendering of review UIs in diffs.
Review Request #13534 — Created Feb. 12, 2024 and submitted
When rendering review UIs into diffs, we'd end up creating instances for
both the original and modified files, even if we had a UI capable of
rendering a diff. This change makes it so we look up the matching Review
UI classes first and check if it's diff capable. If so, we only create
it once and use it to render the diff. If we have some other case (such
as only having one side or the other, or having a file type mismatch),
we'll instantiate each review UI and render the column.
Looked at a diff that had attachments for binary filediffs. Saw that
review UIs were instantiated and rendered correctly.
- Commits:
-
Summary ID 869558bfd9dd3b22908f7e6c885eebe31a6df198 7681857eefa65fa5f12849951fca7fbc1ba9eab2 - Diff:
-
Revision 2 (+62 -54)
Checks run (2 succeeded)
flake8
passed.
JSHint
passed.