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

Fix border on Actions List.

Summary: This adds setActionList to PropertyListView and properly places it in an archaic HTML 1.0 table.

Test Plan: test layouts with actions really tall or properties really tall. Always see a full height border.

Reviewers: epriestley, btrahan

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7239
This commit is contained in:
Chad Little 2013-10-06 11:12:00 -07:00
parent b7297a3278
commit f3a4d27cfe
7 changed files with 138 additions and 136 deletions

View file

@ -1059,7 +1059,7 @@ celerity_register_resource_map(array(
),
'differential-results-table-css' =>
array(
'uri' => '/res/7d9150bb/rsrc/css/application/differential/results-table.css',
'uri' => '/res/14d79541/rsrc/css/application/differential/results-table.css',
'type' => 'css',
'requires' =>
array(
@ -3018,7 +3018,7 @@ celerity_register_resource_map(array(
),
'phabricator-action-list-view-css' =>
array(
'uri' => '/res/89534fee/rsrc/css/layout/phabricator-action-list-view.css',
'uri' => '/res/2dce4556/rsrc/css/layout/phabricator-action-list-view.css',
'type' => 'css',
'requires' =>
array(
@ -3371,7 +3371,7 @@ celerity_register_resource_map(array(
),
'phabricator-property-list-view-css' =>
array(
'uri' => '/res/7835f74e/rsrc/css/layout/phabricator-property-list-view.css',
'uri' => '/res/31912bb1/rsrc/css/layout/phabricator-property-list-view.css',
'type' => 'css',
'requires' =>
array(
@ -3805,7 +3805,7 @@ celerity_register_resource_map(array(
),
'phui-object-box-css' =>
array(
'uri' => '/res/9e56634a/rsrc/css/phui/phui-object-box.css',
'uri' => '/res/8504279f/rsrc/css/phui/phui-object-box.css',
'type' => 'css',
'requires' =>
array(
@ -4184,7 +4184,7 @@ celerity_register_resource_map(array(
), array(
'packages' =>
array(
'1fa81138' =>
'eab97939' =>
array(
'name' => 'core.pkg.css',
'symbols' =>
@ -4233,7 +4233,7 @@ celerity_register_resource_map(array(
41 => 'phabricator-tag-view-css',
42 => 'phui-list-view-css',
),
'uri' => '/res/pkg/1fa81138/core.pkg.css',
'uri' => '/res/pkg/eab97939/core.pkg.css',
'type' => 'css',
),
'64eeda79' =>
@ -4295,7 +4295,7 @@ celerity_register_resource_map(array(
'uri' => '/res/pkg/4ccfeb47/darkconsole.pkg.js',
'type' => 'js',
),
'b55e602f' =>
'f09bc1cf' =>
array(
'name' => 'differential.pkg.css',
'symbols' =>
@ -4314,7 +4314,7 @@ celerity_register_resource_map(array(
11 => 'differential-local-commits-view-css',
12 => 'inline-comment-summary-css',
),
'uri' => '/res/pkg/b55e602f/differential.pkg.css',
'uri' => '/res/pkg/f09bc1cf/differential.pkg.css',
'type' => 'css',
),
'5e9e5c4e' =>
@ -4425,30 +4425,30 @@ celerity_register_resource_map(array(
),
'reverse' =>
array(
'aphront-dialog-view-css' => '1fa81138',
'aphront-error-view-css' => '1fa81138',
'aphront-list-filter-view-css' => '1fa81138',
'aphront-pager-view-css' => '1fa81138',
'aphront-panel-view-css' => '1fa81138',
'aphront-table-view-css' => '1fa81138',
'aphront-tokenizer-control-css' => '1fa81138',
'aphront-tooltip-css' => '1fa81138',
'aphront-typeahead-control-css' => '1fa81138',
'differential-changeset-view-css' => 'b55e602f',
'differential-core-view-css' => 'b55e602f',
'aphront-dialog-view-css' => 'eab97939',
'aphront-error-view-css' => 'eab97939',
'aphront-list-filter-view-css' => 'eab97939',
'aphront-pager-view-css' => 'eab97939',
'aphront-panel-view-css' => 'eab97939',
'aphront-table-view-css' => 'eab97939',
'aphront-tokenizer-control-css' => 'eab97939',
'aphront-tooltip-css' => 'eab97939',
'aphront-typeahead-control-css' => 'eab97939',
'differential-changeset-view-css' => 'f09bc1cf',
'differential-core-view-css' => 'f09bc1cf',
'differential-inline-comment-editor' => '5e9e5c4e',
'differential-local-commits-view-css' => 'b55e602f',
'differential-results-table-css' => 'b55e602f',
'differential-revision-add-comment-css' => 'b55e602f',
'differential-revision-comment-css' => 'b55e602f',
'differential-revision-comment-list-css' => 'b55e602f',
'differential-revision-history-css' => 'b55e602f',
'differential-revision-list-css' => 'b55e602f',
'differential-table-of-contents-css' => 'b55e602f',
'differential-local-commits-view-css' => 'f09bc1cf',
'differential-results-table-css' => 'f09bc1cf',
'differential-revision-add-comment-css' => 'f09bc1cf',
'differential-revision-comment-css' => 'f09bc1cf',
'differential-revision-comment-list-css' => 'f09bc1cf',
'differential-revision-history-css' => 'f09bc1cf',
'differential-revision-list-css' => 'f09bc1cf',
'differential-table-of-contents-css' => 'f09bc1cf',
'diffusion-commit-view-css' => 'c8ce2d88',
'diffusion-icons-css' => 'c8ce2d88',
'global-drag-and-drop-css' => '1fa81138',
'inline-comment-summary-css' => 'b55e602f',
'global-drag-and-drop-css' => 'eab97939',
'inline-comment-summary-css' => 'f09bc1cf',
'javelin-aphlict' => '64eeda79',
'javelin-behavior' => '9564fa17',
'javelin-behavior-aphlict-dropdown' => '64eeda79',
@ -4522,56 +4522,56 @@ celerity_register_resource_map(array(
'javelin-util' => '9564fa17',
'javelin-vector' => '9564fa17',
'javelin-workflow' => '9564fa17',
'lightbox-attachment-css' => '1fa81138',
'lightbox-attachment-css' => 'eab97939',
'maniphest-task-summary-css' => '49898640',
'phabricator-action-list-view-css' => '1fa81138',
'phabricator-application-launch-view-css' => '1fa81138',
'phabricator-action-list-view-css' => 'eab97939',
'phabricator-application-launch-view-css' => 'eab97939',
'phabricator-busy' => '64eeda79',
'phabricator-content-source-view-css' => 'b55e602f',
'phabricator-core-css' => '1fa81138',
'phabricator-crumbs-view-css' => '1fa81138',
'phabricator-content-source-view-css' => 'f09bc1cf',
'phabricator-core-css' => 'eab97939',
'phabricator-crumbs-view-css' => 'eab97939',
'phabricator-drag-and-drop-file-upload' => '5e9e5c4e',
'phabricator-dropdown-menu' => '64eeda79',
'phabricator-file-upload' => '64eeda79',
'phabricator-filetree-view-css' => '1fa81138',
'phabricator-flag-css' => '1fa81138',
'phabricator-filetree-view-css' => 'eab97939',
'phabricator-flag-css' => 'eab97939',
'phabricator-hovercard' => '64eeda79',
'phabricator-jump-nav' => '1fa81138',
'phabricator-jump-nav' => 'eab97939',
'phabricator-keyboard-shortcut' => '64eeda79',
'phabricator-keyboard-shortcut-manager' => '64eeda79',
'phabricator-main-menu-view' => '1fa81138',
'phabricator-main-menu-view' => 'eab97939',
'phabricator-menu-item' => '64eeda79',
'phabricator-nav-view-css' => '1fa81138',
'phabricator-nav-view-css' => 'eab97939',
'phabricator-notification' => '64eeda79',
'phabricator-notification-css' => '1fa81138',
'phabricator-notification-menu-css' => '1fa81138',
'phabricator-object-selector-css' => 'b55e602f',
'phabricator-notification-css' => 'eab97939',
'phabricator-notification-menu-css' => 'eab97939',
'phabricator-object-selector-css' => 'f09bc1cf',
'phabricator-phtize' => '64eeda79',
'phabricator-prefab' => '64eeda79',
'phabricator-project-tag-css' => '49898640',
'phabricator-property-list-view-css' => '1fa81138',
'phabricator-remarkup-css' => '1fa81138',
'phabricator-property-list-view-css' => 'eab97939',
'phabricator-remarkup-css' => 'eab97939',
'phabricator-shaped-request' => '5e9e5c4e',
'phabricator-side-menu-view-css' => '1fa81138',
'phabricator-standard-page-view' => '1fa81138',
'phabricator-tag-view-css' => '1fa81138',
'phabricator-side-menu-view-css' => 'eab97939',
'phabricator-standard-page-view' => 'eab97939',
'phabricator-tag-view-css' => 'eab97939',
'phabricator-textareautils' => '64eeda79',
'phabricator-tooltip' => '64eeda79',
'phabricator-transaction-view-css' => '1fa81138',
'phabricator-zindex-css' => '1fa81138',
'phui-button-css' => '1fa81138',
'phui-form-css' => '1fa81138',
'phui-form-view-css' => '1fa81138',
'phui-header-view-css' => '1fa81138',
'phui-icon-view-css' => '1fa81138',
'phui-list-view-css' => '1fa81138',
'phui-object-item-list-view-css' => '1fa81138',
'phui-spacing-css' => '1fa81138',
'sprite-apps-large-css' => '1fa81138',
'sprite-gradient-css' => '1fa81138',
'sprite-icons-css' => '1fa81138',
'sprite-menu-css' => '1fa81138',
'sprite-status-css' => '1fa81138',
'syntax-highlighting-css' => '1fa81138',
'phabricator-transaction-view-css' => 'eab97939',
'phabricator-zindex-css' => 'eab97939',
'phui-button-css' => 'eab97939',
'phui-form-css' => 'eab97939',
'phui-form-view-css' => 'eab97939',
'phui-header-view-css' => 'eab97939',
'phui-icon-view-css' => 'eab97939',
'phui-list-view-css' => 'eab97939',
'phui-object-item-list-view-css' => 'eab97939',
'phui-spacing-css' => 'eab97939',
'sprite-apps-large-css' => 'eab97939',
'sprite-gradient-css' => 'eab97939',
'sprite-icons-css' => 'eab97939',
'sprite-menu-css' => 'eab97939',
'sprite-status-css' => 'eab97939',
'syntax-highlighting-css' => 'eab97939',
),
));

View file

@ -6,6 +6,7 @@ final class PhabricatorPropertyListView extends AphrontView {
private $hasKeyboardShortcuts;
private $object;
private $invokedWillRenderEvent;
private $actionList;
protected function canAppendChild() {
return false;
@ -16,6 +17,11 @@ final class PhabricatorPropertyListView extends AphrontView {
return $this;
}
public function setActionList(PhabricatorActionListView $list) {
$this->actionList = $list;
return $this;
}
public function setHasKeyboardShortcuts($has_keyboard_shortcuts) {
$this->hasKeyboardShortcuts = $has_keyboard_shortcuts;
return $this;
@ -150,20 +156,30 @@ final class PhabricatorPropertyListView extends AphrontView {
$shortcuts = new AphrontKeyboardShortcutsAvailableView();
}
return array(
$shortcuts,
phutil_tag(
$list = phutil_tag(
'div',
array(
'class' => 'phabricator-property-list-properties-wrap',
),
array($shortcuts, $list));
$action_list = null;
if ($this->actionList) {
$action_list = phutil_tag(
'div',
array(
'class' => 'phabricator-property-list-container',
'class' => 'phabricator-property-list-actions',
),
$this->actionList);
$this->actionList = null;
}
return phutil_tag(
'div',
array(
$list,
phutil_tag(
'div',
array('class' => 'phabriator-property-list-view-end'),
''),
)));
'class' => 'phabricator-property-list-container grouped',
),
array($action_list, $list));
}
private function renderSectionPart(array $part) {

View file

@ -78,6 +78,11 @@ final class PHUIObjectBoxView extends AphrontView {
}
}
$property_list = $this->propertyList;
if ($this->actionList && $this->propertyList) {
$property_list->setActionList($this->actionList);
}
$content = id(new PHUIBoxView())
->appendChild(
array(
@ -85,7 +90,6 @@ final class PHUIObjectBoxView extends AphrontView {
$this->formError,
$exception_errors,
$this->form,
$this->actionList,
$this->propertyList,
$this->renderChildren(),
))

View file

@ -4,37 +4,32 @@
table.differential-results-table {
border-collapse: separate;
border-spacing: 1px;
width: 100%;
width: 96%;
font-size: 11px;
background: #fcfcec;
}
.differential-results-table th {
font-weight: bold;
text-align: center;
white-space: nowrap;
vertical-align: middle;
padding: 2px 4px;
margin: 0;
width: 70px;
width: 40px;
border-right: 1px solid #fff;
}
.differential-results-table td {
padding: 2px 8px;
padding: 0px 8px;
margin: 0;
vertical-align: middle;
}
.differential-results-table tr.differential-results-row-star th,
.differential-results-table tr.differential-results-row-star td {
font-weight: bold;
background: #dfe3ec;
background: {$greybackground};
}
.differential-results-table tr.differential-results-row-section th {
font-weight: bold;
padding-top: 4px;
text-align: left;
}
@ -44,9 +39,9 @@ table.differential-results-table {
}
.differential-results-table tr.differential-results-row-excuse td {
padding-top: 1em;
padding-right: 1em;
padding-bottom: 1em;
padding-top: 8px;
padding-right: 8px;
padding-bottom: 8px;
}
.differential-results-table tr.differential-results-row-red th {

View file

@ -2,43 +2,12 @@
* @provides phabricator-action-list-view-css
*/
.phabricator-action-list-view {
background: #ffffff;
}
.device-desktop .phabricator-action-list-view {
border: 1px solid {$lightblueborder};
border-bottom: 1px solid {$blueborder};
padding: 4px 0;
float: right;
margin-top: 0px;
width: 20%;
font-size: 12px;
}
.device-desktop .phui-header-shell + .phabricator-action-list-view {
margin-top: -33px;
}
.device-desktop .phui-header-shell.phui-header-tall + .phabricator-action-list-view {
margin-top: -55px;
}
.device-desktop .phui-header-shell.phui-header-has-image +
.phabricator-action-list-view {
margin-top: -53px;
}
.device .phui-header-shell + .phabricator-action-list-view {
margin-top: -1px;
}
.device .phabricator-action-list-view {
border-top: 1px solid #dcdcdc;
padding: 4px 0;
}
.device .phabricator-action-list-view {
display: none;
}
@ -50,6 +19,8 @@
.device .phabricator-action-view-item {
font-size: 14px;
line-height: 22px;
padding-bottom: 4px;
border-bottom: 1px solid {$thinblueborder};
}
.phabricator-action-view {
@ -78,10 +49,9 @@
.phabricator-action-view button.phabricator-action-view-item,
.phabricator-action-view-item {
padding: 1px 0 1px 28px;
line-height: 20px;
padding: 2px 4px 2px 28px;
line-height: 18px;
display: block;
font-size: 12px;
text-decoration: none;
color: {$darkgreytext};
}
@ -91,7 +61,7 @@
height: 14px;
position: absolute;
top: 5px;
left: 8px;
left: 9px;
}
.device-desktop .phabricator-action-view:hover .phabricator-action-view-item {

View file

@ -19,6 +19,10 @@
url('/rsrc/image/icon/fatcow/key_question.png') right center no-repeat;
}
.device .keyboard-shortcuts-available {
display: none;
}
.phabricator-property-list-container +
.phabricator-property-list-section-header {
border-color: {$lightgreyborder};
@ -28,6 +32,7 @@
.device-desktop .phabricator-property-list-container {
padding: 12px 0 12px 0;
width: 100%;
}
.device .phabricator-property-list-container {
@ -42,7 +47,7 @@
}
.device-desktop .phabricator-property-list-key {
width: 15%;
width: 18%;
margin-left: 1%;
text-align: right;
float: left;
@ -61,7 +66,7 @@
}
.device-desktop .phabricator-property-list-value {
width: 50%;
width: 78%;
margin-left: 1%;
float: left;
margin-bottom: 4px;
@ -72,10 +77,6 @@
margin-bottom: 8px;
}
.phabriator-property-list-view-end {
clear: both;
}
.phabricator-property-list-section-header {
color: {$bluetext};
padding: 12px 16px 0px;
@ -125,3 +126,26 @@
.phabricator-property-list-view .phabricator-tag-view {
margin: 2px 0;
}
.phabricator-property-list-properties-wrap {
float: left;
width: 78%;
}
.device .phabricator-property-list-properties-wrap {
width: auto;
border: none;
}
.phabricator-property-list-actions {
width: 20%;
float: right;
margin-right: 12px;
border-left: 1px solid {$thinblueborder};
}
.device .phabricator-property-list-actions {
float: none;
width: auto;
margin: -12px 0 12px 0;
}

View file

@ -26,13 +26,6 @@
margin-bottom: 0;
}
.device-desktop .phui-object-box
.phui-header-shell + .phabricator-action-list-view {
margin-top: 0;
margin-bottom: -12px;
border-width: 0 0 0 1px;
}
.device-phone .phui-object-box {
margin-top: 0;
}