Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13202412
D19601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19601.diff
View Options
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -463,7 +463,7 @@
}
}
- $tab_group = id(new PHUITabGroupView());
+ $tab_group = new PHUITabGroupView();
if ($toc_view) {
$tab_group->addTab(
@@ -473,17 +473,30 @@
->appendChild($toc_view));
}
- $tab_group
- ->addTab(
- id(new PHUITabView())
- ->setName(pht('History'))
- ->setKey('history')
- ->appendChild($history))
- ->addTab(
- id(new PHUITabView())
- ->setName(pht('Commits'))
- ->setKey('commits')
- ->appendChild($local_table));
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('History'))
+ ->setKey('history')
+ ->appendChild($history));
+
+ $filetree_on = $viewer->compareUserSetting(
+ PhabricatorShowFiletreeSetting::SETTINGKEY,
+ PhabricatorShowFiletreeSetting::VALUE_ENABLE_FILETREE);
+
+ $collapsed_key = PhabricatorFiletreeVisibleSetting::SETTINGKEY;
+ $filetree_collapsed = (bool)$viewer->getUserSetting($collapsed_key);
+
+ // See PHI811. If the viewer has the file tree on, the files tab with the
+ // table of contents is redundant, so default to the "History" tab instead.
+ if ($filetree_on && !$filetree_collapsed) {
+ $tab_group->selectTab('history');
+ }
+
+ $tab_group->addTab(
+ id(new PHUITabView())
+ ->setName(pht('Commits'))
+ ->setKey('commits')
+ ->appendChild($local_table));
$stack_graph = id(new DifferentialRevisionGraph())
->setViewer($viewer)
@@ -601,22 +614,15 @@
$crumbs->addTextCrumb($monogram);
$crumbs->setBorder(true);
- $filetree_on = $viewer->compareUserSetting(
- PhabricatorShowFiletreeSetting::SETTINGKEY,
- PhabricatorShowFiletreeSetting::VALUE_ENABLE_FILETREE);
-
$nav = null;
if ($filetree_on && !$this->isVeryLargeDiff()) {
- $collapsed_key = PhabricatorFiletreeVisibleSetting::SETTINGKEY;
- $collapsed_value = $viewer->getUserSetting($collapsed_key);
-
$width_key = PhabricatorFiletreeWidthSetting::SETTINGKEY;
$width_value = $viewer->getUserSetting($width_key);
$nav = id(new DifferentialChangesetFileTreeSideNavBuilder())
->setTitle($monogram)
->setBaseURI(new PhutilURI($revision->getURI()))
- ->setCollapsed((bool)$collapsed_value)
+ ->setCollapsed($filetree_collapsed)
->setWidth((int)$width_value)
->build($changesets);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 15, 10:37 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6296979
Default Alt Text
D19601.diff (2 KB)
Attached To
Mode
D19601: In Differential: when the file tree is enabled, default to the "History" tab instead of "Files"
Attached
Detach File
Event Timeline
Log In to Comment