1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 00:10:57 +01:00

Make ObjectItem default as "Card"

Summary: This went smoother than expeced. Makes the rounded Card the default, also tweaked selected state a little.

Test Plan:
Test UIExamples, Maniphest, Home, Differential, Harbormaster, Audit. Everything seems normal

{F163971}

{F163973}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9408
This commit is contained in:
Chad Little 2014-06-07 12:12:11 -07:00
parent 3219039575
commit 41ef6824be
20 changed files with 22 additions and 72 deletions

View file

@ -7,7 +7,7 @@
return array(
'names' =>
array(
'core.pkg.css' => '73e14ee6',
'core.pkg.css' => '703a28a5',
'core.pkg.js' => '9c9c8442',
'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '4a93db37',
@ -135,7 +135,7 @@ return array(
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
'rsrc/css/phui/phui-list.css' => '43ed2d93',
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec',
'rsrc/css/phui/phui-object-item-list-view.css' => '31d6da4e',
'rsrc/css/phui/phui-object-item-list-view.css' => '52a438e2',
'rsrc/css/phui/phui-pinboard-view.css' => '874c22f9',
'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8',
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
@ -762,7 +762,7 @@ return array(
'phui-info-panel-css' => '27ea50a1',
'phui-list-view-css' => '43ed2d93',
'phui-object-box-css' => 'ce92d8ec',
'phui-object-item-list-view-css' => '31d6da4e',
'phui-object-item-list-view-css' => '52a438e2',
'phui-pinboard-view-css' => '874c22f9',
'phui-property-list-view-css' => '2f7199e8',
'phui-remarkup-preview-css' => '19ad512b',

View file

@ -103,7 +103,6 @@ final class PhabricatorAuditListView extends AphrontView {
$rowc = array();
$list = new PHUIObjectItemListView();
$list->setCards(true);
foreach ($this->commits as $commit) {
$commit_phid = $commit->getPHID();
$commit_handle = $this->getHandle($commit_phid);

View file

@ -45,7 +45,6 @@ final class PhabricatorConfigIssueListController
private function buildIssueList(array $issues) {
assert_instances_of($issues, 'PhabricatorSetupIssue');
$list = new PHUIObjectItemListView();
$list->setCards(true);
$ignored_items = array();
foreach ($issues as $issue) {

View file

@ -18,7 +18,6 @@ final class PhabricatorDaemonLogListView extends AphrontView {
}
$list = id(new PHUIObjectItemListView())
->setCards(true)
->setFlush(true);
foreach ($this->daemonLogs as $log) {
$id = $log->getID();

View file

@ -75,7 +75,6 @@ final class DifferentialRevisionListView extends AphrontView {
$this->requireResource('aphront-tooltip-css');
$list = new PHUIObjectItemListView();
$list->setCards(true);
foreach ($this->revisions as $revision) {
$item = id(new PHUIObjectItemView())

View file

@ -185,7 +185,6 @@ final class HarbormasterBuildableSearchEngine
$viewer = $this->requireViewer();
$list = new PHUIObjectItemListView();
$list->setCards(true);
foreach ($buildables as $buildable) {
$id = $buildable->getID();

View file

@ -173,8 +173,7 @@ final class HeraldRuleSearchEngine
$content_type_map = HeraldAdapter::getEnabledAdapterMap($viewer);
$list = id(new PHUIObjectItemListView())
->setUser($viewer)
->setCards(true);
->setUser($viewer);
foreach ($rules as $rule) {
$id = $rule->getID();

View file

@ -108,7 +108,6 @@ final class HeraldTranscriptSearchEngine
$viewer = $this->requireViewer();
$list = new PHUIObjectItemListView();
$list->setCards(true);
foreach ($transcripts as $xscript) {
$view_href = phutil_tag(
'a',

View file

@ -23,7 +23,6 @@ final class HeraldRuleEditHistoryView extends AphrontView {
public function render() {
$list = new PHUIObjectItemListView();
$list->setFlush(true);
$list->setCards(true);
foreach ($this->edits as $edit) {
$name = nonempty($edit->getRuleName(), 'Unknown Rule');

View file

@ -9,7 +9,6 @@ final class PhabricatorHomeQuickCreateController
$items = $this->getCurrentApplication()->loadAllQuickCreateItems($viewer);
$list = id(new PHUIObjectItemListView())
->setCards(true)
->setUser($viewer);
foreach ($items as $item) {

View file

@ -36,7 +36,6 @@ final class ManiphestTaskListView extends ManiphestView {
$handles = $this->handles;
$list = new PHUIObjectItemListView();
$list->setCards(true);
$list->setFlush(true);
$status_map = ManiphestTaskStatus::getTaskStatusMap();

View file

@ -260,7 +260,6 @@ final class PhrictionDiffController
$handles = $this->loadViewerHandles($phids);
$list = new PHUIObjectItemListView();
$list->setCards(true);
$list->setFlush(true);
$first = true;

View file

@ -40,7 +40,6 @@ final class PhrictionHistoryController
$handles = $this->loadViewerHandles($author_phids);
$list = new PHUIObjectItemListView();
$list->setCards(true);
$list->setFlush(true);
foreach ($history as $content) {

View file

@ -173,7 +173,6 @@ final class PhabricatorProjectBoardViewController
$cards = id(new PHUIObjectItemListView())
->setUser($viewer)
->setCards(true)
->setFlush(true)
->setAllowEmptyList(true)
->addSigil('project-column')

View file

@ -234,7 +234,6 @@ final class PhabricatorRepositorySearchEngine
$viewer = $this->requireViewer();;
$list = new PHUIObjectItemListView();
$list->setCards(true);
foreach ($repositories as $repository) {
$id = $repository->getID();

View file

@ -35,7 +35,6 @@ final class PhabricatorSettingsPanelExternalAccounts
$linked = id(new PHUIObjectItemListView())
->setUser($viewer)
->setCards(true)
->setFlush(true)
->setNoDataString(pht('You have no linked accounts.'));
@ -99,7 +98,6 @@ final class PhabricatorSettingsPanelExternalAccounts
$linkable = id(new PHUIObjectItemListView())
->setUser($viewer)
->setCards(true)
->setFlush(true)
->setNoDataString(
pht('Your account is linked with all available providers.'));

View file

@ -113,7 +113,6 @@ final class PHUIObjectItemListExample extends PhabricatorUIExample {
$head = id(new PHUIHeaderView())
->setHeader(pht('Card List'));
$list = new PHUIObjectItemListView();
$list->setCards(true);
$list->addItem(
id(new PHUIObjectItemView())
@ -161,7 +160,6 @@ final class PHUIObjectItemListExample extends PhabricatorUIExample {
$head = id(new PHUIHeaderView())
->setHeader(pht('Grippable List'));
$list = new PHUIObjectItemListView();
$list->setCards(true);
$list->addItem(
id(new PHUIObjectItemView())

View file

@ -15,7 +15,6 @@ final class PHUIWorkboardExample extends PhabricatorUIExample {
/* List 1 */
$list = new PHUIObjectItemListView();
$list->setCards(true);
$list->setFlush(true);
$list->addItem(
@ -43,7 +42,6 @@ final class PHUIWorkboardExample extends PhabricatorUIExample {
/* List 2 */
$list2 = new PHUIObjectItemListView();
$list2->setCards(true);
$list2->setFlush(true);
$list2->addItem(
@ -58,7 +56,6 @@ final class PHUIWorkboardExample extends PhabricatorUIExample {
/* List 3 */
$list3 = new PHUIObjectItemListView();
$list3->setCards(true);
$list3->setFlush(true);
$list3->addItem(
@ -100,7 +97,6 @@ final class PHUIWorkboardExample extends PhabricatorUIExample {
->setBarColor('orange'));
$panel = id(new PHUIWorkpanelView())
->setCards($list)
->setHeader('Business Stuff')
->setFooterAction(
id(new PHUIListItemView())
@ -109,11 +105,9 @@ final class PHUIWorkboardExample extends PhabricatorUIExample {
->setHref('/maniphest/task/create/'));
$panel2 = id(new PHUIWorkpanelView())
->setCards($list2)
->setHeader('Under Duress');
$panel3 = id(new PHUIWorkpanelView())
->setCards($list3)
->setHeader('Spicy Thai Chicken');
$board = id(new PHUIWorkboardView())

View file

@ -6,7 +6,6 @@ final class PHUIObjectItemListView extends AphrontTagView {
private $items;
private $pager;
private $stackable;
private $cards;
private $noDataString;
private $flush;
private $plain;
@ -58,11 +57,6 @@ final class PHUIObjectItemListView extends AphrontTagView {
return $this;
}
public function setCards($cards) {
$this->cards = $cards;
return $this;
}
public function setStates($states) {
$this->states = $states;
return $this;
@ -79,11 +73,9 @@ final class PHUIObjectItemListView extends AphrontTagView {
if ($this->stackable) {
$classes[] = 'phui-object-list-stackable';
}
if ($this->cards) {
$classes[] = 'phui-object-list-cards';
}
if ($this->states) {
$classes[] = 'phui-object-list-states';
$classes[] = 'phui-object-list-stackable';
}
if ($this->flush) {
$classes[] = 'phui-object-list-flush';

View file

@ -34,12 +34,14 @@
}
.phui-object-item {
background: #fff;
border-style: solid;
border-color: {$lightgreyborder};
border-width: 0 0 0 4px;
margin: 5px 0;
overflow: hidden;
border-radius: 3px;
border-left-width: 6px;
background: #f0f0f0 url('/rsrc/image/texture/card-gradient.png') repeat-x;
margin-bottom: 4px;
}
.phui-object-item .phui-icon-view {
@ -54,9 +56,6 @@
position: relative;
min-height: 29px;
overflow: hidden;
}
.phui-object-list-cards .phui-object-item-frame {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}
@ -187,10 +186,16 @@
.phui-object-item-list-view.phui-object-list-stackable
.phui-object-item {
margin: -1px 0 0 0;
border-radius: 0;
border-left-width: 1px;
background: #fff;
}
.phui-object-list-stackable .phui-object-item-frame {
border-radius: 0;
}
.phui-object-list-stackable .phui-object-item {
border-left-width: 1px;
}
.device-desktop .phui-object-list-stackable
@ -435,14 +440,18 @@
background: {$lightyellow};
}
.phui-object-list-cards
.phui-object-item.phui-object-item-highlighted {
.phui-object-item.phui-object-item-highlighted {
background-image: linear-gradient(to bottom, rgb(253, 255, 221), rgb(243, 245, 206));
background-image: -webkit-linear-gradient(top, rgb(253, 255, 221), rgb(243, 245, 206));
}
.phui-object-item-selected {
background: {$lightblue};
border-left-color: {$blue};
}
.phui-object-item-selected .phui-object-item-frame {
border-color: {$blue};
}
@ -531,33 +540,6 @@
font-size: 13px;
}
/* - Card List -----------------------------------------------------------------
Rounded card list.
*/
/* Hard to sprite since we can't have other sprites appearing in tall cells */
.phui-object-list-cards .phui-object-item {
border-radius: 3px;
border-left-width: 6px;
background: #f0f0f0 url('/rsrc/image/texture/card-gradient.png') repeat-x;
margin-bottom: 4px;
}
.phui-object-list-cards .phui-object-item-frame {
min-height: 50px;
}
.phui-object-list-cards .phui-object-item-selected {
background: #bfdcff;
}
.phui-object-list-cards .phui-object-item-selected
.phui-object-item-frame {
border-color: #99ccff;
}
/* - Draggable List ------------------------------------------------------------