1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Remove 'setShadow' from PHUIBoxView

Summary: Removes setShadow, uses setBorder instead

Test Plan: Tested multicolumn, feed, search box, many other areas. Things look less 3d.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D8192
This commit is contained in:
Chad Little 2014-02-10 16:04:42 -08:00
parent 1830868007
commit 1ac28a7127
14 changed files with 40 additions and 60 deletions

View file

@ -26,7 +26,7 @@ return array(
'rsrc/css/aphront/error-view.css' => '16cd9949',
'rsrc/css/aphront/lightbox-attachment.css' => '686f8885',
'rsrc/css/aphront/list-filter-view.css' => 'ef989c67',
'rsrc/css/aphront/multi-column.css' => '05bbd016',
'rsrc/css/aphront/multi-column.css' => '6f7573f0',
'rsrc/css/aphront/notification.css' => '6901121e',
'rsrc/css/aphront/pager-view.css' => '2e3539af',
'rsrc/css/aphront/panel-view.css' => '5846dfa2',
@ -126,7 +126,7 @@ return array(
'rsrc/css/layout/phabricator-side-menu-view.css' => '503699d0',
'rsrc/css/layout/phabricator-source-code-view.css' => '62a99814',
'rsrc/css/layout/phabricator-timeline-view.css' => 'f4f846c4',
'rsrc/css/phui/phui-box.css' => '21da4d8c',
'rsrc/css/phui/phui-box.css' => '6c21bd6a',
'rsrc/css/phui/phui-button.css' => '8784a966',
'rsrc/css/phui/phui-document.css' => '143b2ac8',
'rsrc/css/phui/phui-feed-story.css' => '3a59c2cf',
@ -483,7 +483,7 @@ return array(
'aphront-dialog-view-css' => 'dd9db96c',
'aphront-error-view-css' => '16cd9949',
'aphront-list-filter-view-css' => 'ef989c67',
'aphront-multi-column-view-css' => '05bbd016',
'aphront-multi-column-view-css' => '6f7573f0',
'aphront-notes' => '6acadd3f',
'aphront-pager-view-css' => '2e3539af',
'aphront-panel-view-css' => '5846dfa2',
@ -737,7 +737,7 @@ return array(
'phortune-credit-card-form-css' => 'b25b4beb',
'phrequent-css' => 'ffc185ad',
'phriction-document-css' => 'b0309d8e',
'phui-box-css' => '21da4d8c',
'phui-box-css' => '6c21bd6a',
'phui-button-css' => '8784a966',
'phui-document-view-css' => '143b2ac8',
'phui-feed-story-css' => '3a59c2cf',

View file

@ -262,7 +262,7 @@ final class PhabricatorApplicationSearchController
$pager_box = id(new PHUIBoxView())
->addPadding(PHUI::PADDING_MEDIUM)
->addMargin(PHUI::MARGIN_LARGE)
->setShadow(true)
->setBorder(true)
->appendChild($pager);
$nav->appendChild($pager_box);
}

View file

@ -133,7 +133,7 @@ final class PhabricatorSearchController
return id(new PHUIBoxView())
->addMargin(PHUI::MARGIN_LARGE)
->addPadding(PHUI::PADDING_LARGE)
->setShadow(true)
->setBorder(true)
->appendChild($results)
->addClass('phabricator-search-result-box');
}

View file

@ -44,17 +44,17 @@ final class PHUIBoxExample extends PhabricatorUIExample {
array(
id(new PHUIBoxView())
->appendChild($content1)
->setShadow(true)
->setBorder(true)
->addPadding(PHUI::PADDING_SMALL)
->addMargin(PHUI::MARGIN_LARGE_BOTTOM),
id(new PHUIBoxView())
->appendChild($content2)
->setShadow(true)
->setBorder(true)
->addPadding(PHUI::PADDING_MEDIUM)
->addMargin(PHUI::MARGIN_LARGE_BOTTOM),
id(new PHUIBoxView())
->appendChild($content3)
->setShadow(true)
->setBorder(true)
->addPadding(PHUI::PADDING_LARGE)
->addMargin(PHUI::MARGIN_LARGE_BOTTOM));
@ -85,7 +85,7 @@ final class PHUIBoxExample extends PhabricatorUIExample {
->setHeader(pht('Plain Box with space'));
$head3 = id(new PHUIHeaderView())
->setHeader(pht('Shadow Box with space'));
->setHeader(pht('Border Box with space'));
$head4 = id(new PHUIHeaderView())
->setHeader(pht('PHUIObjectBoxView'));

View file

@ -120,7 +120,7 @@ final class PHUIIconExample extends PhabricatorUIExample {
->appendChild($actionview)
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_SMALL)
->setShadow(true));
->setBorder(true));
$layout2 =
array(
@ -128,7 +128,7 @@ final class PHUIIconExample extends PhabricatorUIExample {
->appendChild(array($person1, $person2, $person3))
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_SMALL)
->setShadow(true));
->setBorder(true));
$layout2a =
array(
@ -136,7 +136,7 @@ final class PHUIIconExample extends PhabricatorUIExample {
->appendChild(array($person4, $person5, $person6))
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_SMALL)
->setShadow(true));
->setBorder(true));
$layout3 =
array(
@ -144,7 +144,7 @@ final class PHUIIconExample extends PhabricatorUIExample {
->appendChild($tokenview)
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_SMALL)
->setShadow(true));
->setBorder(true));
$layout4 =
array(
@ -152,7 +152,7 @@ final class PHUIIconExample extends PhabricatorUIExample {
->appendChild(array($card1, $card2, $card3, $card4, $card5))
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_MEDIUM)
->setShadow(true));
->setBorder(true));
$layout5 =
array(
@ -160,7 +160,7 @@ final class PHUIIconExample extends PhabricatorUIExample {
->appendChild($loginview)
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_MEDIUM)
->setShadow(true));
->setBorder(true));
$head1 = id(new PHUIHeaderView())
->setHeader(pht('Action Icons!'));

View file

@ -211,35 +211,35 @@ final class PHUIListExample extends PhabricatorUIExample {
->appendChild($unstyled)
->addMargin(PHUI::MARGIN_MEDIUM)
->addPadding(PHUI::PADDING_SMALL)
->setShadow(true));
->setBorder(true));
$layout2 =
array(
id(new PHUIBoxView())
->appendChild($sidenav)
->addMargin(PHUI::MARGIN_MEDIUM)
->setShadow(true));
->setBorder(true));
$layout3 =
array(
id(new PHUIBoxView())
->appendChild($topnav)
->addMargin(PHUI::MARGIN_MEDIUM)
->setShadow(true));
->setBorder(true));
$layout4 =
array(
id(new PHUIBoxView())
->appendChild($actionmenu)
->addMargin(PHUI::MARGIN_MEDIUM)
->setShadow(true));
->setBorder(true));
$layout5 =
array(
id(new PHUIBoxView())
->appendChild($statustabs)
->addMargin(PHUI::MARGIN_MEDIUM)
->setShadow(true));
->setBorder(true));
$head1 = id(new PHUIHeaderView())
->setHeader(pht('Unstyled'));

View file

@ -70,7 +70,7 @@ final class PHUITextExample extends PhabricatorUIExample {
$layout1 = id(new PHUIBoxView())
->appendChild($content)
->setShadow(true)
->setBorder(true)
->addPadding(PHUI::PADDING_MEDIUM);
$head1 = id(new PHUIHeaderView())
@ -82,7 +82,7 @@ final class PHUITextExample extends PhabricatorUIExample {
$layout2 = id(new PHUIBoxView())
->appendChild($content2)
->setShadow(true)
->setBorder(true)
->addPadding(PHUI::PADDING_MEDIUM);
$head2 = id(new PHUIHeaderView())

View file

@ -97,7 +97,7 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
->addColumn($friday)
->addColumn($saturday)
->setFluidLayout(true)
->setShadow(true);
->setBorder(true);
$shipping = id(new PHUIFormLayoutView())
->setUser($user)
@ -160,7 +160,7 @@ final class PhabricatorMultiColumnExample extends PhabricatorUIExample {
->addColumn(hsprintf('<h1>%s</h1>%s', $billing_title, $shipping))
->addColumn(hsprintf('<h1>%s</h1>%s', $cc_title, $cc))
->setFluidLayout(true)
->setShadow(true);
->setBorder(true);
$wrap1 = phutil_tag(
'div',

View file

@ -48,7 +48,7 @@ final class PhabricatorUIStatusExample extends PhabricatorUIExample {
$out[] = id(new PHUIBoxView())
->addMargin(PHUI::MARGIN_LARGE)
->addPadding(PHUI::PADDING_LARGE)
->setShadow(true)
->setBorder(true)
->appendChild($view);
@ -71,7 +71,7 @@ final class PhabricatorUIStatusExample extends PhabricatorUIExample {
$out[] = id(new PHUIBoxView())
->addMargin(PHUI::MARGIN_LARGE)
->addPadding(PHUI::PADDING_LARGE)
->setShadow(true)
->setBorder(true)
->appendChild($view);
return $out;

View file

@ -10,7 +10,7 @@ final class AphrontMultiColumnView extends AphrontView {
private $fluidLayout = false;
private $fluidishLayout = false;
private $gutter;
private $shadow;
private $border;
public function addColumn($column) {
$this->columns[] = $column;
@ -33,8 +33,8 @@ final class AphrontMultiColumnView extends AphrontView {
return $this;
}
public function setShadow($shadow) {
$this->shadow = $shadow;
public function setBorder($border) {
$this->border = $border;
return $this;
}
@ -106,9 +106,9 @@ final class AphrontMultiColumnView extends AphrontView {
),
$view);
if ($this->shadow) {
if ($this->border) {
$board = id(new PHUIBoxView())
->setShadow(true)
->setBorder(true)
->appendChild($board)
->addPadding(PHUI::PADDING_MEDIUM_TOP)
->addPadding(PHUI::PADDING_MEDIUM_BOTTOM);

View file

@ -4,7 +4,6 @@ final class PHUIBoxView extends AphrontTagView {
private $margin = array();
private $padding = array();
private $shadow = false;
private $border = false;
public function addMargin($margin) {
@ -17,11 +16,6 @@ final class PHUIBoxView extends AphrontTagView {
return $this;
}
public function setShadow($shadow) {
$this->shadow = $shadow;
return $this;
}
public function setBorder($border) {
$this->border = $border;
return $this;
@ -30,9 +24,6 @@ final class PHUIBoxView extends AphrontTagView {
protected function getTagAttributes() {
$outer_classes = array();
$outer_classes[] = 'phui-box';
if ($this->shadow) {
$outer_classes[] = 'phui-box-shadow';
}
if ($this->border) {
$outer_classes[] = 'phui-box-border';
}

View file

@ -265,7 +265,7 @@ final class PHUIFeedStoryView extends AphrontView {
return id(new PHUIBoxView())
->addClass(implode(' ', $classes))
->setShadow(true)
->setBorder(true)
->addMargin(PHUI::MARGIN_MEDIUM_BOTTOM)
->appendChild(array($head, $body, $foot));
}

View file

@ -119,10 +119,10 @@
vertical-align: top;
}
.phui-box-shadow .aphront-multi-column-column-outer {
border-right: 1px solid #e7e7e7;
padding-left: 10px;
padding-right: 10px;
.phui-box-border .aphront-multi-column-column-outer {
border-right: 1px solid {$lightblueborder};
padding-left: 8px;
padding-right: 8px;
}
.phui-box-shadow .aphront-multi-colum-column-outer-last {
@ -134,12 +134,12 @@
border: none;
}
.device .phui-box-shadow .aphront-multi-column-column-outer {
padding-bottom: 20px;
.device .phui-box-border .aphront-multi-column-column-outer {
padding-bottom: 16px;
border-bottom: 1px solid #e7e7e7;
}
.device .phui-box-shadow .aphront-multi-colum-column-outer-last {
.device .phui-box-border .aphront-multi-colum-column-outer-last {
border: none;
padding-bottom: 0;
}

View file

@ -2,17 +2,6 @@
* @provides phui-box-css
*/
.phui-box-shadow {
border-left: 1px solid #e7e7e7;
border-right: 1px solid #e7e7e7;
border-bottom: 1px solid #c0c5d1;
}
.phui-box-shadow .phui-box-inner {
background-color: #fff;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.phui-box-border {
border: 1px solid {$lightblueborder};
border-bottom: 1px solid {$blueborder};