1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02: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( return array(
'names' => 'names' =>
array( array(
'core.pkg.css' => '73e14ee6', 'core.pkg.css' => '703a28a5',
'core.pkg.js' => '9c9c8442', 'core.pkg.js' => '9c9c8442',
'darkconsole.pkg.js' => 'ca8671ce', 'darkconsole.pkg.js' => 'ca8671ce',
'differential.pkg.css' => '4a93db37', 'differential.pkg.css' => '4a93db37',
@ -135,7 +135,7 @@ return array(
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
'rsrc/css/phui/phui-list.css' => '43ed2d93', 'rsrc/css/phui/phui-list.css' => '43ed2d93',
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec', '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-pinboard-view.css' => '874c22f9',
'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8', 'rsrc/css/phui/phui-property-list-view.css' => '2f7199e8',
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b', 'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
@ -762,7 +762,7 @@ return array(
'phui-info-panel-css' => '27ea50a1', 'phui-info-panel-css' => '27ea50a1',
'phui-list-view-css' => '43ed2d93', 'phui-list-view-css' => '43ed2d93',
'phui-object-box-css' => 'ce92d8ec', '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-pinboard-view-css' => '874c22f9',
'phui-property-list-view-css' => '2f7199e8', 'phui-property-list-view-css' => '2f7199e8',
'phui-remarkup-preview-css' => '19ad512b', 'phui-remarkup-preview-css' => '19ad512b',

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -34,12 +34,14 @@
} }
.phui-object-item { .phui-object-item {
background: #fff;
border-style: solid; border-style: solid;
border-color: {$lightgreyborder}; border-color: {$lightgreyborder};
border-width: 0 0 0 4px;
margin: 5px 0; margin: 5px 0;
overflow: hidden; 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 { .phui-object-item .phui-icon-view {
@ -54,9 +56,6 @@
position: relative; position: relative;
min-height: 29px; min-height: 29px;
overflow: hidden; overflow: hidden;
}
.phui-object-list-cards .phui-object-item-frame {
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
border-top-right-radius: 3px; border-top-right-radius: 3px;
} }
@ -187,10 +186,16 @@
.phui-object-item-list-view.phui-object-list-stackable .phui-object-item-list-view.phui-object-list-stackable
.phui-object-item { .phui-object-item {
margin: -1px 0 0 0; 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 { .phui-object-list-stackable .phui-object-item {
border-left-width: 1px;
} }
.device-desktop .phui-object-list-stackable .device-desktop .phui-object-list-stackable
@ -435,14 +440,18 @@
background: {$lightyellow}; 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: 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)); background-image: -webkit-linear-gradient(top, rgb(253, 255, 221), rgb(243, 245, 206));
} }
.phui-object-item-selected { .phui-object-item-selected {
background: {$lightblue}; background: {$lightblue};
border-left-color: {$blue};
}
.phui-object-item-selected .phui-object-item-frame {
border-color: {$blue};
} }
@ -531,33 +540,6 @@
font-size: 13px; 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 ------------------------------------------------------------ /* - Draggable List ------------------------------------------------------------