You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
On browser platforms (sl web), the per-file "Open Diff View" buttons were hidden because BrowserPlatform doesn't implement the optional openDiff method. This meant users had no per-file shortcut to view diffs — only the "View Changes" button that shows all files.
This adds a single-file mode to the ComparisonView. When openDiff is unavailable, clicking a per-file diff button calls showComparisonForFile(), which opens the ComparisonView filtered to just that file. Multi-file UI (expand/collapse all buttons) is hidden in this mode.
Changes:
- atoms.ts: Added focusedFile to ComparisonMode, added showComparisonForFile()
- ComparisonView.tsx: Filters file list when focusedFile is set, hides expand/collapse buttons
- ComparisonViewModal.tsx: Passes focusedFile through to ComparisonView
- ChangedFile.tsx: Per-file buttons fall back to showComparisonForFile() when openDiff is unavailable
- BrowserPlatform.ts: Reverted to original (no platform-level changes needed)
Reviewed By: evangrayk
Differential Revision: D97681255
fbshipit-source-id: 1490258805caba066fb28f5dfd2b1ce39c25b1ca
0 commit comments