2011-10-02 20:42:41 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render a table of Differential revisions.
|
|
|
|
*/
|
|
|
|
final class DifferentialRevisionListView extends AphrontView {
|
|
|
|
|
|
|
|
private $revisions;
|
2012-08-17 21:46:26 +02:00
|
|
|
private $flags = array();
|
2012-08-17 08:35:50 +02:00
|
|
|
private $drafts = array();
|
2011-10-02 20:42:41 +02:00
|
|
|
private $handles;
|
2012-02-20 14:38:21 +01:00
|
|
|
private $fields;
|
2012-08-20 23:05:46 +02:00
|
|
|
private $highlightAge;
|
Use ApplicationSearch in Differential
Summary:
Ref T603. Ref T2625. Fixes T3241. Depends on D5451. Depends on D6346.
@wez, this changes the Differential revision list UI substantially and may generate a lot of bikeshedding / who-moved-my-cheese churn. See T3417 for context, for example. The motivations for this change are:
- The list now works on devices, like phones and tablets. This is a requirement to make the rest of Differential work on devices.
- Although ApplicationSearch intentionally presents a simpler interface initially and some options which were one click away before aren't now, it is much more powerful than the search it replaces and allows users to build, save, share, fork, edit, and customize a much wider range of queries. Users who used the old filters frequently can use Advanced Search -> Save Custom Query to create new versions of them, and of any other query. "Edit Queries.." allows users to remove and reorder queries, including builtin queries. Basically, there are like three things which have gone from "1-click" to "a few clicks", and ten trillion things which have gone from "hard/impossible" to "relatively easy".
The local screenshots look a bit iffy, but I think a lot of this is the fakenesss of my test data. If they still feel iffy in production we can tweak them until they feel good, like we did for Maniphest.
Test Plan:
{F48477}
{F48478}
Reviewers: btrahan, chad, wez
Reviewed By: btrahan
CC: aran, s
Maniphest Tasks: T603, T2625, T3241
Differential Revision: https://secure.phabricator.com/D6347
2013-07-03 15:11:07 +02:00
|
|
|
private $header;
|
|
|
|
private $noDataString;
|
|
|
|
|
|
|
|
public function setNoDataString($no_data_string) {
|
|
|
|
$this->noDataString = $no_data_string;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setHeader($header) {
|
|
|
|
$this->header = $header;
|
|
|
|
return $this;
|
|
|
|
}
|
2012-02-20 14:38:21 +01:00
|
|
|
|
|
|
|
public function setFields(array $fields) {
|
2012-04-04 22:13:08 +02:00
|
|
|
assert_instances_of($fields, 'DifferentialFieldSpecification');
|
2012-02-20 14:38:21 +01:00
|
|
|
$this->fields = $fields;
|
|
|
|
return $this;
|
|
|
|
}
|
2011-10-02 20:42:41 +02:00
|
|
|
|
|
|
|
public function setRevisions(array $revisions) {
|
2012-04-04 22:13:08 +02:00
|
|
|
assert_instances_of($revisions, 'DifferentialRevision');
|
2011-10-02 20:42:41 +02:00
|
|
|
$this->revisions = $revisions;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2012-08-20 23:05:46 +02:00
|
|
|
public function setHighlightAge($bool) {
|
|
|
|
$this->highlightAge = $bool;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2011-10-02 20:42:41 +02:00
|
|
|
public function getRequiredHandlePHIDs() {
|
|
|
|
$phids = array();
|
2012-02-20 14:38:21 +01:00
|
|
|
foreach ($this->fields as $field) {
|
|
|
|
foreach ($this->revisions as $revision) {
|
|
|
|
$phids[] = $field->getRequiredHandlePHIDsForRevisionList($revision);
|
2011-10-02 20:42:41 +02:00
|
|
|
}
|
|
|
|
}
|
2012-02-20 14:38:21 +01:00
|
|
|
return array_mergev($phids);
|
2011-10-02 20:42:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setHandles(array $handles) {
|
2012-04-04 22:13:08 +02:00
|
|
|
assert_instances_of($handles, 'PhabricatorObjectHandle');
|
2011-10-02 20:42:41 +02:00
|
|
|
$this->handles = $handles;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2012-08-17 21:46:26 +02:00
|
|
|
public function loadAssets() {
|
|
|
|
$user = $this->user;
|
|
|
|
if (!$user) {
|
|
|
|
throw new Exception("Call setUser() before loadAssets()!");
|
|
|
|
}
|
|
|
|
if ($this->revisions === null) {
|
|
|
|
throw new Exception("Call setRevisions() before loadAssets()!");
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->flags = id(new PhabricatorFlagQuery())
|
2013-03-01 02:15:09 +01:00
|
|
|
->setViewer($user)
|
2012-08-17 21:46:26 +02:00
|
|
|
->withOwnerPHIDs(array($user->getPHID()))
|
|
|
|
->withObjectPHIDs(mpull($this->revisions, 'getPHID'))
|
|
|
|
->execute();
|
|
|
|
|
2012-08-17 08:35:50 +02:00
|
|
|
$this->drafts = id(new DifferentialRevisionQuery())
|
2013-07-01 21:38:27 +02:00
|
|
|
->setViewer($user)
|
2012-08-17 08:35:50 +02:00
|
|
|
->withIDs(mpull($this->revisions, 'getID'))
|
|
|
|
->withDraftRepliesByAuthors(array($user->getPHID()))
|
|
|
|
->execute();
|
|
|
|
|
2012-08-17 21:46:26 +02:00
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2011-10-02 20:42:41 +02:00
|
|
|
public function render() {
|
|
|
|
|
|
|
|
$user = $this->user;
|
|
|
|
if (!$user) {
|
|
|
|
throw new Exception("Call setUser() before render()!");
|
|
|
|
}
|
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$fresh = PhabricatorEnv::getEnvConfig('differential.days-fresh');
|
|
|
|
if ($fresh) {
|
|
|
|
$fresh = PhabricatorCalendarHoliday::getNthBusinessDay(
|
|
|
|
time(),
|
|
|
|
-$fresh);
|
|
|
|
}
|
2012-08-21 23:20:21 +02:00
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$stale = PhabricatorEnv::getEnvConfig('differential.days-stale');
|
|
|
|
if ($stale) {
|
|
|
|
$stale = PhabricatorCalendarHoliday::getNthBusinessDay(
|
|
|
|
time(),
|
|
|
|
-$stale);
|
2012-08-20 23:05:46 +02:00
|
|
|
}
|
|
|
|
|
2012-08-08 03:37:49 +02:00
|
|
|
Javelin::initBehavior('phabricator-tooltips', array());
|
|
|
|
require_celerity_resource('aphront-tooltip-css');
|
|
|
|
|
2012-08-17 21:46:26 +02:00
|
|
|
$flagged = mpull($this->flags, null, 'getObjectPHID');
|
2012-08-01 23:33:30 +02:00
|
|
|
|
2012-02-20 14:38:21 +01:00
|
|
|
foreach ($this->fields as $field) {
|
|
|
|
$field->setHandles($this->handles);
|
|
|
|
}
|
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$list = new PhabricatorObjectItemListView();
|
|
|
|
$list->setCards(true);
|
|
|
|
|
2013-08-29 01:48:42 +02:00
|
|
|
$do_not_display_age = array(
|
|
|
|
ArcanistDifferentialRevisionStatus::CLOSED => true,
|
|
|
|
ArcanistDifferentialRevisionStatus::ABANDONED => true,
|
|
|
|
);
|
|
|
|
|
2011-10-02 20:42:41 +02:00
|
|
|
foreach ($this->revisions as $revision) {
|
2013-08-29 01:48:42 +02:00
|
|
|
$item = id(new PhabricatorObjectItemView())
|
|
|
|
->setUser($user);
|
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$rev_fields = array();
|
|
|
|
$icons = array();
|
|
|
|
|
2012-08-01 23:33:30 +02:00
|
|
|
$phid = $revision->getPHID();
|
|
|
|
if (isset($flagged[$phid])) {
|
2013-07-03 17:52:53 +02:00
|
|
|
$flag = $flagged[$phid];
|
|
|
|
$flag_class = PhabricatorFlagColor::getCSSClass($flag->getColor());
|
|
|
|
$icons['flag'] = phutil_tag(
|
|
|
|
'div',
|
|
|
|
array(
|
|
|
|
'class' => 'phabricator-flag-icon '.$flag_class,
|
|
|
|
),
|
|
|
|
'');
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
}
|
|
|
|
if (array_key_exists($revision->getID(), $this->drafts)) {
|
2013-07-03 17:53:01 +02:00
|
|
|
$icons['draft'] = true;
|
2012-08-01 23:33:30 +02:00
|
|
|
}
|
2012-08-20 23:05:46 +02:00
|
|
|
|
|
|
|
$modified = $revision->getDateModified();
|
|
|
|
|
2013-08-29 01:48:42 +02:00
|
|
|
$status = $revision->getStatus();
|
|
|
|
$show_age = ($fresh || $stale) &&
|
|
|
|
$this->highlightAge &&
|
|
|
|
empty($do_not_display_age[$status]);
|
|
|
|
|
|
|
|
|
|
|
|
$object_age = PhabricatorObjectItemView::AGE_FRESH;
|
2012-02-20 14:38:21 +01:00
|
|
|
foreach ($this->fields as $field) {
|
2013-08-29 01:48:42 +02:00
|
|
|
if ($show_age) {
|
|
|
|
if ($field instanceof DifferentialDateModifiedFieldSpecification) {
|
|
|
|
if ($stale && $modified < $stale) {
|
|
|
|
$object_age = PhabricatorObjectItemView::AGE_OLD;
|
|
|
|
} else if ($fresh && $modified < $fresh) {
|
|
|
|
$object_age = PhabricatorObjectItemView::AGE_STALE;
|
|
|
|
}
|
2012-08-20 23:05:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$rev_header = $field->renderHeaderForRevisionList();
|
|
|
|
$rev_fields[$rev_header] = $field
|
|
|
|
->renderValueForRevisionList($revision);
|
2011-10-02 20:42:41 +02:00
|
|
|
}
|
2012-08-20 23:05:46 +02:00
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$status_name =
|
|
|
|
ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status);
|
2011-10-02 20:42:41 +02:00
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
if (isset($icons['flag'])) {
|
2013-07-03 17:52:53 +02:00
|
|
|
$item->addHeadIcon($icons['flag']);
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
$item->setObjectName('D'.$revision->getID());
|
|
|
|
$item->setHeader(phutil_tag('a',
|
|
|
|
array('href' => '/D'.$revision->getID()),
|
|
|
|
$revision->getTitle()));
|
2013-07-03 17:53:01 +02:00
|
|
|
|
|
|
|
if (isset($icons['draft'])) {
|
|
|
|
$draft = id(new PHUIIconView())
|
|
|
|
->setSpriteSheet(PHUIIconView::SPRITE_ICONS)
|
|
|
|
->setSpriteIcon('file-grey')
|
|
|
|
->addSigil('has-tooltip')
|
|
|
|
->setMetadata(
|
|
|
|
array(
|
|
|
|
'tip' => pht('Unsubmitted Comments'),
|
|
|
|
));
|
|
|
|
$item->addAttribute($draft);
|
|
|
|
}
|
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$item->addAttribute($status_name);
|
|
|
|
|
|
|
|
// Author
|
|
|
|
$author_handle = $this->handles[$revision->getAuthorPHID()];
|
|
|
|
$item->addByline(pht('Author: %s', $author_handle->renderLink()));
|
|
|
|
|
|
|
|
// Reviewers
|
|
|
|
$item->addAttribute(pht('Reviewers: %s', $rev_fields['Reviewers']));
|
|
|
|
|
2013-08-29 01:48:42 +02:00
|
|
|
$item->setEpoch($revision->getDateModified(), $object_age);
|
2011-10-02 20:42:41 +02:00
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
// First remove the fields we already have
|
|
|
|
$count = 7;
|
|
|
|
$rev_fields = array_slice($rev_fields, $count);
|
2011-10-02 20:42:41 +02:00
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
// Then add each one of them
|
|
|
|
// TODO: Add render-to-foot-icon support
|
|
|
|
foreach ($rev_fields as $header => $field) {
|
|
|
|
$item->addAttribute(pht('%s: %s', $header, $field));
|
|
|
|
}
|
2011-10-02 20:42:41 +02:00
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
$list->addItem($item);
|
|
|
|
}
|
2012-08-20 23:05:46 +02:00
|
|
|
|
Use ApplicationSearch in Differential
Summary:
Ref T603. Ref T2625. Fixes T3241. Depends on D5451. Depends on D6346.
@wez, this changes the Differential revision list UI substantially and may generate a lot of bikeshedding / who-moved-my-cheese churn. See T3417 for context, for example. The motivations for this change are:
- The list now works on devices, like phones and tablets. This is a requirement to make the rest of Differential work on devices.
- Although ApplicationSearch intentionally presents a simpler interface initially and some options which were one click away before aren't now, it is much more powerful than the search it replaces and allows users to build, save, share, fork, edit, and customize a much wider range of queries. Users who used the old filters frequently can use Advanced Search -> Save Custom Query to create new versions of them, and of any other query. "Edit Queries.." allows users to remove and reorder queries, including builtin queries. Basically, there are like three things which have gone from "1-click" to "a few clicks", and ten trillion things which have gone from "hard/impossible" to "relatively easy".
The local screenshots look a bit iffy, but I think a lot of this is the fakenesss of my test data. If they still feel iffy in production we can tweak them until they feel good, like we did for Maniphest.
Test Plan:
{F48477}
{F48478}
Reviewers: btrahan, chad, wez
Reviewed By: btrahan
CC: aran, s
Maniphest Tasks: T603, T2625, T3241
Differential Revision: https://secure.phabricator.com/D6347
2013-07-03 15:11:07 +02:00
|
|
|
$list->setHeader($this->header);
|
|
|
|
$list->setNoDataString($this->noDataString);
|
|
|
|
|
[Rough Sketch] Differential ObjectItemView Smexyness
Summary:
Tried out `PhabricatorObjectItemView` for Differential. It looks smexy and smooth.
Refs T2014
- Title and Date as Maniphest
- Author in the handle icon
- Bar color reflects revision status (Needs Review, Accepted, Abandoned etc.) @chad looking for non-blue is faster than keeping watch for everything that's not "Closed" in old table form
- Some status information are in footer icons; currently only stale/old status display as well as saved drafts, maybe more in future; these come into my mind:
- No reviewer warning
- Push Blocking Priority (T2730)
- Trivial, fast review guaranteed
- Sketch / Just looking for advice/help
- Arcanist Project (T2614)
- Denote "Public Send-in" (T1476)
{F37662}
{F37663}
{F37664}
{F37665}
Some flaws:
- Date and reviewers on every entry the same?
- No respect for Differential fields (for some reason, every entry appeared the same, so broke it to parts)
- Plenty of (potential) increase in height - advise reducing paging length from 100 to 50 - or just ignore me
Suggestions for the future:
- Expand the meta information regarding revisions; e.g. the various status displays above
- Uh... T2543, T1279, T793, T731 and what else I want for Differential, because they are awesome!
- T793 should be in particular easy appearance-wise, just copy-paste from Maniphest
Test Plan: By looking at it, of course. Verified there are no errors or crashed
Reviewers: epriestley, chad, btrahan, liguobig
Reviewed By: chad
CC: aran, Korvin, edward, nh
Maniphest Tasks: T2014
Differential Revision: https://secure.phabricator.com/D5451
Conflicts:
src/__celerity_resource_map__.php
2013-07-02 21:14:33 +02:00
|
|
|
return $list;
|
2011-10-02 20:42:41 +02:00
|
|
|
}
|
|
|
|
|
2013-03-01 02:15:09 +01:00
|
|
|
public static function getDefaultFields(PhabricatorUser $user) {
|
2012-02-20 14:38:21 +01:00
|
|
|
$selector = DifferentialFieldSelector::newSelector();
|
|
|
|
$fields = $selector->getFieldSpecifications();
|
|
|
|
foreach ($fields as $key => $field) {
|
2013-03-01 02:15:09 +01:00
|
|
|
$field->setUser($user);
|
2012-02-20 14:38:21 +01:00
|
|
|
if (!$field->shouldAppearOnRevisionList()) {
|
|
|
|
unset($fields[$key]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!$fields) {
|
|
|
|
throw new Exception(
|
|
|
|
"Phabricator configuration has no fields that appear on the list ".
|
|
|
|
"interface!");
|
|
|
|
}
|
|
|
|
|
|
|
|
return $selector->sortFieldsForRevisionList($fields);
|
|
|
|
}
|
|
|
|
|
2011-10-02 20:42:41 +02:00
|
|
|
}
|