Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14057441
D14974.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D14974.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -13,7 +13,7 @@
'differential.pkg.css' => '2de124c9',
'differential.pkg.js' => '64e69521',
'diffusion.pkg.css' => 'f45955ed',
- 'diffusion.pkg.js' => 'ca1c8b5a',
+ 'diffusion.pkg.js' => '3a9a8bfa',
'maniphest.pkg.css' => '4845691a',
'maniphest.pkg.js' => '949a7498',
'rsrc/css/aphront/aphront-bars.css' => '231ac33c',
@@ -391,7 +391,7 @@
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'b42eddc7',
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'd835b03a',
'rsrc/js/application/diffusion/behavior-commit-branches.js' => 'bdaf4d04',
- 'rsrc/js/application/diffusion/behavior-commit-graph.js' => '9007c197',
+ 'rsrc/js/application/diffusion/behavior-commit-graph.js' => '5a0b1a64',
'rsrc/js/application/diffusion/behavior-jump-to.js' => '73d09eef',
'rsrc/js/application/diffusion/behavior-load-blame.js' => '42126667',
'rsrc/js/application/diffusion/behavior-locate-file.js' => '6d3e1947',
@@ -598,7 +598,7 @@
'javelin-behavior-differential-toggle-files' => 'ca3f91eb',
'javelin-behavior-differential-user-select' => 'a8d8459d',
'javelin-behavior-diffusion-commit-branches' => 'bdaf4d04',
- 'javelin-behavior-diffusion-commit-graph' => '9007c197',
+ 'javelin-behavior-diffusion-commit-graph' => '5a0b1a64',
'javelin-behavior-diffusion-jump-to' => '73d09eef',
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc',
@@ -1218,6 +1218,11 @@
'javelin-vector',
'javelin-dom',
),
+ '5a0b1a64' => array(
+ 'javelin-behavior',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ ),
'5b2e3e2b' => array(
'javelin-stratcom',
'javelin-request',
@@ -1523,11 +1528,6 @@
'javelin-dom',
'javelin-workflow',
),
- '9007c197' => array(
- 'javelin-behavior',
- 'javelin-dom',
- 'javelin-stratcom',
- ),
'901935ef' => array(
'javelin-behavior',
'javelin-dom',
diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php
--- a/src/applications/diffusion/controller/DiffusionHistoryController.php
+++ b/src/applications/diffusion/controller/DiffusionHistoryController.php
@@ -52,6 +52,7 @@
if ($show_graph) {
$history_table->setParents($history_results['parents']);
$history_table->setIsHead(!$pager->getOffset());
+ $history_table->setIsTail(!$pager->getHasMorePages());
}
$history_panel = new PHUIObjectBoxView();
diff --git a/src/applications/diffusion/view/DiffusionHistoryTableView.php b/src/applications/diffusion/view/DiffusionHistoryTableView.php
--- a/src/applications/diffusion/view/DiffusionHistoryTableView.php
+++ b/src/applications/diffusion/view/DiffusionHistoryTableView.php
@@ -6,6 +6,7 @@
private $revisions = array();
private $handles = array();
private $isHead;
+ private $isTail;
private $parents;
public function setHistory(array $history) {
@@ -60,6 +61,11 @@
return $this;
}
+ public function setIsTail($is_tail) {
+ $this->isTail = $is_tail;
+ return $this;
+ }
+
public function render() {
$drequest = $this->getDiffusionRequest();
@@ -344,6 +350,16 @@
);
}
+ // If this is the last page in history, replace the "o" with an "x" so we
+ // do not draw a connecting line downward, and replace "^" with an "X" for
+ // repositories with exactly one commit.
+ if ($this->isTail && $graph) {
+ $last = array_pop($graph);
+ $last['line'] = str_replace('o', 'x', $last['line']);
+ $last['line'] = str_replace('^', 'X', $last['line']);
+ $graph[] = $last;
+ }
+
// Render into tags for the behavior.
foreach ($graph as $k => $meta) {
diff --git a/src/view/phui/PHUIPagerView.php b/src/view/phui/PHUIPagerView.php
--- a/src/view/phui/PHUIPagerView.php
+++ b/src/view/phui/PHUIPagerView.php
@@ -58,6 +58,10 @@
return $this->hasMorePages;
}
+ public function getHasMorePages() {
+ return $this->hasMorePages;
+ }
+
public function setSurroundingPages($pages) {
$this->surroundingPages = max(0, $pages);
return $this;
diff --git a/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js b/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js
--- a/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js
+++ b/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js
@@ -37,6 +37,7 @@
// Stroke with fill (for commit circles).
function fstroke(c) {
+ cxt.lineWidth = 1;
cxt.fillStyle = color(c);
cxt.strokeStyle = '#ffffff';
cxt.fill();
@@ -52,7 +53,7 @@
return (col * cell) + (cell / 2);
};
- var h = 30;
+ var h = 32;
var w = cell * config.count;
var canvas = JX.$N('canvas', {width: w, height: h});
@@ -117,16 +118,17 @@
case 'o':
case '^':
case '|':
- if (c == 'o' || c == '^') {
- origin = xpos(jj);
- }
+ case 'x':
+ case 'X':
- cxt.beginPath();
- cxt.moveTo(xpos(jj), (c == '^' ? h/2 : 0));
- cxt.lineTo(xpos(jj), h);
- lstroke(jj);
+ if (c !== 'X') {
+ cxt.beginPath();
+ cxt.moveTo(xpos(jj), (c == '^' ? h/2 : 0));
+ cxt.lineTo(xpos(jj), (c == 'x' ? h/2 : h));
+ lstroke(jj);
+ }
- if (c == 'o' || c == '^') {
+ if (c == 'o' || c == '^' || c == 'x' || c == 'X') {
cxt.beginPath();
cxt.arc(xpos(jj), h/2, 3, 0, 2 * Math.PI, true);
fstroke(jj);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 3:14 AM (15 h, 17 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6728093
Default Alt Text
D14974.diff (5 KB)
Attached To
Mode
D14974: Improve rendering of commit branching graph
Attached
Detach File
Event Timeline
Log In to Comment