Fix switching of view modes in text-type file attachment diffs.
Review Request #12430 — Created July 1, 2022 and submitted
The view mode selector ("rendered" vs "source") wasn't working when
viewing a diff of a text-based file attachment. We initially noticed
this with the Markdown review UI, but it affects all text-based
reviewables that support render modes. The issue here is that we were
passing in aroot
toBackbone.history
that wasn't properly including
the diff file attachment ID. Because the root didn't match, the route
would never get triggered when the URL changed after the anchor was
clicked.
Viewed a markdown file attachment in both single-revision and diff
views. Verified that switching between "rendered" and "source" worked
properly for both.
Summary | ID |
---|---|
73bc03caaf01feca405ea31a14c07c813ef2d1b3 |
Description | From | Last Updated |
---|---|---|
If we're going to use parens here, we can move the ? and : inside of it, aligned with the … |
chipx86 |