From 17f092307cdfe4891ee66075e2665abb3578a976 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 2 Jun 2017 16:10:59 -0700 Subject: [PATCH 01/25] Fix an issue where Phriction moves to new locations would fail with a "content required" error Summary: Ref T12793. I'd like to understand exactly when we broke this, but this seems to be a minimal fix that shouldn't do anything surprising. When you move document `/a/` to `/a/b/` and that path doesn't exist yet, the Content transaction currently fails because there's "no content". The content gets added later by the "move" transaction but this is implicit. To make this work, just ignore the "missing field" error. This is a little roundabout but unlikely to break anything in weird ways. Test Plan: - Moved document `/a/b/` to `/a/b/c/`. - Before patch: error about missing content. - After patch: move worked properly. Reviewers: chad, amckinley Reviewed By: amckinley Maniphest Tasks: T12793 Differential Revision: https://secure.phabricator.com/D18069 --- .../phriction/controller/PhrictionMoveController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/phriction/controller/PhrictionMoveController.php b/src/applications/phriction/controller/PhrictionMoveController.php index f25465c3c0..b82681f0a7 100644 --- a/src/applications/phriction/controller/PhrictionMoveController.php +++ b/src/applications/phriction/controller/PhrictionMoveController.php @@ -60,6 +60,7 @@ final class PhrictionMoveController extends PhrictionController { ->setActor($viewer) ->setContentSourceFromRequest($request) ->setContinueOnNoEffect(true) + ->setContinueOnMissingFields(true) ->setDescription($v_note); $xactions = array(); From f66c6e5c1fc8c8d230993b85e412ec2148d4e144 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 4 Jun 2017 08:52:36 -0700 Subject: [PATCH 02/25] Fix Phriction toc button states Summary: Some unneeded CSS here. Test Plan: Click on ToC button, see more normal colors. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18073 --- resources/celerity/map.php | 10 +++++----- webroot/rsrc/css/phui/phui-document-pro.css | 17 ++--------------- webroot/rsrc/css/phui/phui-header-view.css | 2 +- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 702bc0e609..bced050105 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => 'ea94e844', + 'core.pkg.css' => '8ac2e6b8', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => 'a2755617', @@ -149,7 +149,7 @@ return array( 'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad', 'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb', 'rsrc/css/phui/phui-curtain-view.css' => '55dd0e59', - 'rsrc/css/phui/phui-document-pro.css' => 'bb18da6b', + 'rsrc/css/phui/phui-document-pro.css' => '8af7ea27', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 'rsrc/css/phui/phui-document.css' => 'c32e8dec', 'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9', @@ -157,7 +157,7 @@ return array( 'rsrc/css/phui/phui-form-view.css' => '6175808d', 'rsrc/css/phui/phui-form.css' => 'a5570f70', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', - 'rsrc/css/phui/phui-header-view.css' => 'a3d1aecd', + 'rsrc/css/phui/phui-header-view.css' => '73edce66', 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 'rsrc/css/phui/phui-icon.css' => '4c46b6ba', @@ -834,14 +834,14 @@ return array( 'phui-curtain-view-css' => '55dd0e59', 'phui-document-summary-view-css' => '9ca48bdf', 'phui-document-view-css' => 'c32e8dec', - 'phui-document-view-pro-css' => 'bb18da6b', + 'phui-document-view-pro-css' => '8af7ea27', 'phui-feed-story-css' => '44a9c8e9', 'phui-font-icon-base-css' => '870a7360', 'phui-fontkit-css' => '1320ed01', 'phui-form-css' => 'a5570f70', 'phui-form-view-css' => '6175808d', 'phui-head-thing-view-css' => 'fd311e5f', - 'phui-header-view-css' => 'a3d1aecd', + 'phui-header-view-css' => '73edce66', 'phui-hovercard' => '1bd28176', 'phui-hovercard-view-css' => 'f0592bcf', 'phui-icon-set-selector-css' => '87db8fee', diff --git a/webroot/rsrc/css/phui/phui-document-pro.css b/webroot/rsrc/css/phui/phui-document-pro.css index a4c05a0ecd..60b5106154 100644 --- a/webroot/rsrc/css/phui/phui-document-pro.css +++ b/webroot/rsrc/css/phui/phui-document-pro.css @@ -64,21 +64,13 @@ body.printable { .phui-document-view-pro .phui-document-toc { position: absolute; top: 34px; - left: -36px; + left: -44px; } .printable .phui-document-view-pro a.phui-document-toc { display: none; } -a.button.phui-document-toc { - display: inline-block; - height: 16px; - width: 20px; - padding-left: 8px; - padding-right: 8px; -} - .phui-document-view-pro .phui-document-toc-list { margin: 8px; border: 1px solid {$lightgreyborder}; @@ -105,12 +97,7 @@ a.button.phui-document-toc { } .phui-document-toc-open .phui-document-toc { - background-color: {$blue}; - border-color: {$blue}; -} - -.phui-document-toc-open .phui-document-toc .phui-icon-view { - color: #fff; + border-color: {$blueborder}; } .phui-document-view-pro .phui-document-toc-content { diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index 470e821544..f0c37a1a75 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -120,7 +120,7 @@ body .phui-header-shell.phui-bleed-header .device-phone .phui-header-action-link .phui-button-text { visibility: hidden; width: 0; - margin-left: 4px; + margin-left: 8px; } .device-phone .phui-header-action-link.button .phui-icon-view { From 65c9d789d221774bd3bac5b46a57f04f74fa5723 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 4 Jun 2017 11:52:27 -0700 Subject: [PATCH 03/25] Add a borderless tag style Summary: Formally support borderless tags in PHUITagView. Test Plan: Used in Diffusion History List Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18074 --- resources/celerity/map.php | 10 +++++----- .../diffusion/controller/DiffusionController.php | 1 + .../diffusion/view/DiffusionHistoryListView.php | 3 ++- src/view/phui/PHUITagView.php | 12 ++++++++++++ .../css/application/diffusion/diffusion-history.css | 13 ------------- webroot/rsrc/css/phui/phui-tag-view.css | 9 +++++++++ 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index bced050105..41f1a77b03 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => '8ac2e6b8', + 'core.pkg.css' => '5284a0e0', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => 'a2755617', @@ -71,7 +71,7 @@ return array( 'rsrc/css/application/differential/revision-history.css' => '0e8eb855', 'rsrc/css/application/differential/revision-list.css' => 'f3c47d33', 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', - 'rsrc/css/application/diffusion/diffusion-history.css' => 'de70e348', + 'rsrc/css/application/diffusion/diffusion-history.css' => 'cc283766', 'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba', 'rsrc/css/application/diffusion/diffusion-readme.css' => '18bd3910', 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', @@ -175,7 +175,7 @@ return array( 'rsrc/css/phui/phui-segment-bar-view.css' => 'b1d1b892', 'rsrc/css/phui/phui-spacing.css' => '042804d6', 'rsrc/css/phui/phui-status.css' => 'd5263e49', - 'rsrc/css/phui/phui-tag-view.css' => '3fa7765e', + 'rsrc/css/phui/phui-tag-view.css' => '93b084cf', 'rsrc/css/phui/phui-timeline-view.css' => '313c7f22', 'rsrc/css/phui/phui-two-column-view.css' => 'ce9fa0b7', 'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5', @@ -567,7 +567,7 @@ return array( 'differential-revision-history-css' => '0e8eb855', 'differential-revision-list-css' => 'f3c47d33', 'differential-table-of-contents-css' => 'ae4b7a55', - 'diffusion-history-css' => 'de70e348', + 'diffusion-history-css' => 'cc283766', 'diffusion-icons-css' => 'a6a1e2ba', 'diffusion-readme-css' => '18bd3910', 'diffusion-source-css' => '750add59', @@ -867,7 +867,7 @@ return array( 'phui-segment-bar-view-css' => 'b1d1b892', 'phui-spacing-css' => '042804d6', 'phui-status-list-view-css' => 'd5263e49', - 'phui-tag-view-css' => '3fa7765e', + 'phui-tag-view-css' => '93b084cf', 'phui-theme-css' => '9f261c6b', 'phui-timeline-view-css' => '313c7f22', 'phui-two-column-view-css' => 'ce9fa0b7', diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php index a296761bdf..52465da410 100644 --- a/src/applications/diffusion/controller/DiffusionController.php +++ b/src/applications/diffusion/controller/DiffusionController.php @@ -333,6 +333,7 @@ abstract class DiffusionController extends PhabricatorController { $tag = id(new PHUITagView()) ->setName($commit) ->setColor(PHUITagView::COLOR_INDIGO) + ->setBorder(PHUITagView::BORDER_NONE) ->setType(PHUITagView::TYPE_SHADE); return $tag; diff --git a/src/applications/diffusion/view/DiffusionHistoryListView.php b/src/applications/diffusion/view/DiffusionHistoryListView.php index 533e15d644..9d6727a357 100644 --- a/src/applications/diffusion/view/DiffusionHistoryListView.php +++ b/src/applications/diffusion/view/DiffusionHistoryListView.php @@ -110,7 +110,7 @@ final class DiffusionHistoryListView extends DiffusionHistoryView { ->setType(PHUITagView::TYPE_SHADE) ->setColor(PHUITagView::COLOR_BLUE) ->setHref('/D'.$d_id) - ->addClass('diffusion-differential-tag') + ->setBorder(PHUITagView::BORDER_NONE) ->setSlimShady(true); } } @@ -155,6 +155,7 @@ final class DiffusionHistoryListView extends DiffusionHistoryView { ->setName($commit_name) ->setType(PHUITagView::TYPE_SHADE) ->setColor(PHUITagView::COLOR_INDIGO) + ->setBorder(PHUITagView::BORDER_NONE) ->setSlimShady(true); $item = id(new PHUIObjectItemView()) diff --git a/src/view/phui/PHUITagView.php b/src/view/phui/PHUITagView.php index 1811f8f1a9..292246c4a7 100644 --- a/src/view/phui/PHUITagView.php +++ b/src/view/phui/PHUITagView.php @@ -28,6 +28,8 @@ final class PHUITagView extends AphrontTagView { const COLOR_OBJECT = 'object'; const COLOR_PERSON = 'person'; + const BORDER_NONE = 'border-none'; + private $type; private $href; private $name; @@ -40,6 +42,7 @@ final class PHUITagView extends AphrontTagView { private $icon; private $shade; private $slimShady; + private $border; public function setType($type) { $this->type = $type; @@ -104,6 +107,11 @@ final class PHUITagView extends AphrontTagView { return $this; } + public function setBorder($border) { + $this->border = $border; + return $this; + } + public function setIcon($icon) { $this->icon = $icon; return $this; @@ -142,6 +150,10 @@ final class PHUITagView extends AphrontTagView { $classes[] = 'phui-tag-icon-view'; } + if ($this->border) { + $classes[] = 'phui-tag-'.$this->border; + } + if ($this->phid) { Javelin::initBehavior('phui-hovercards'); diff --git a/webroot/rsrc/css/application/diffusion/diffusion-history.css b/webroot/rsrc/css/application/diffusion/diffusion-history.css index fd22f9b1a5..b90977373f 100644 --- a/webroot/rsrc/css/application/diffusion/diffusion-history.css +++ b/webroot/rsrc/css/application/diffusion/diffusion-history.css @@ -7,14 +7,6 @@ font-size: {$biggerfontsize}; } -.diffusion-history-list .phui-oi-attribute .phui-tag-core { - border-color: transparent; -} - -.diffusion-history-list .phui-oi-attribute .phui-tag-indigo a { - color: {$indigo}; -} - .diffusion-history-message { background-color: {$bluebackground}; padding: 16px; @@ -35,8 +27,3 @@ .diffusion-history-list .diffusion-differential-tag { margin-left: 4px; } - -a.phui-tag-view:hover.diffusion-differential-tag .phui-tag-core { - border-color: transparent; - text-decoration: underline; -} diff --git a/webroot/rsrc/css/phui/phui-tag-view.css b/webroot/rsrc/css/phui/phui-tag-view.css index 56b5badf8d..885b20c12b 100644 --- a/webroot/rsrc/css/phui/phui-tag-view.css +++ b/webroot/rsrc/css/phui/phui-tag-view.css @@ -154,6 +154,15 @@ a.phui-tag-view:hover margin: 0 4px 2px 0; } +.phui-tag-view.phui-tag-border-none .phui-tag-core { + border-color: transparent; +} + +a.phui-tag-view:hover.phui-tag-border-none .phui-tag-core { + border-color: transparent !important; + text-decoration: underline; +} + /* - Shaded Tags --------------------------------------------------------------- From 48c6ca40c44f276a403b4fb4782f78e3549f98de Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 3 Jun 2017 06:21:45 -0700 Subject: [PATCH 04/25] Add an "Unsaved" button to the Differential persistent header Summary: Ref T12733. Test Plan: {F4987956} Reviewers: chad Reviewed By: chad Maniphest Tasks: T12733 Differential Revision: https://secure.phabricator.com/D18070 --- resources/celerity/map.php | 63 ++++----- .../view/DifferentialChangesetListView.php | 4 + .../differential/changeset-view.css | 4 + .../rsrc/js/application/diff/DiffChangeset.js | 28 +++- .../js/application/diff/DiffChangesetList.js | 126 ++++++++++++++++-- webroot/rsrc/js/phuix/PHUIXButtonView.js | 1 + 6 files changed, 181 insertions(+), 45 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 41f1a77b03..b403d7199a 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -12,8 +12,8 @@ return array( 'core.pkg.css' => '5284a0e0', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', - 'differential.pkg.css' => 'a2755617', - 'differential.pkg.js' => '9cab3335', + 'differential.pkg.css' => '1ccbf3a9', + 'differential.pkg.js' => 'b453b745', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '84c8f8fd', 'favicon.ico' => '30672e08', @@ -64,7 +64,7 @@ return array( 'rsrc/css/application/dashboard/dashboard.css' => 'fe5b1869', 'rsrc/css/application/diff/inline-comment-summary.css' => '51efda3a', 'rsrc/css/application/differential/add-comment.css' => 'c47f8c40', - 'rsrc/css/application/differential/changeset-view.css' => '983751ee', + 'rsrc/css/application/differential/changeset-view.css' => 'c3f44655', 'rsrc/css/application/differential/core.css' => '5b7b8ff4', 'rsrc/css/application/differential/phui-inline-comment.css' => 'ffd1a542', 'rsrc/css/application/differential/revision-comment.css' => '14b8565a', @@ -393,8 +393,8 @@ return array( 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173', 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', - 'rsrc/js/application/diff/DiffChangeset.js' => 'aaaf4cb5', - 'rsrc/js/application/diff/DiffChangesetList.js' => '85abc805', + 'rsrc/js/application/diff/DiffChangeset.js' => 'fc3919c8', + 'rsrc/js/application/diff/DiffChangesetList.js' => 'ffa063d8', 'rsrc/js/application/diff/DiffInline.js' => '1d17130f', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', @@ -526,7 +526,7 @@ return array( 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 'rsrc/js/phuix/PHUIXActionView.js' => 'b3465b9b', 'rsrc/js/phuix/PHUIXAutocomplete.js' => 'f6699267', - 'rsrc/js/phuix/PHUIXButtonView.js' => '0f13520b', + 'rsrc/js/phuix/PHUIXButtonView.js' => 'b3c515be', 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '8018ee50', 'rsrc/js/phuix/PHUIXExample.js' => '68af71ca', 'rsrc/js/phuix/PHUIXFormControl.js' => '83e03671', @@ -560,7 +560,7 @@ return array( 'conpherence-thread-manager' => '4d863052', 'conpherence-transaction-css' => '85129c68', 'd3' => 'a11a5ff2', - 'differential-changeset-view-css' => '983751ee', + 'differential-changeset-view-css' => 'c3f44655', 'differential-core-view-css' => '5b7b8ff4', 'differential-revision-add-comment-css' => 'c47f8c40', 'differential-revision-comment-css' => '14b8565a', @@ -772,8 +772,8 @@ return array( 'phabricator-darklog' => 'c8e1ffe3', 'phabricator-darkmessage' => 'c48cccdd', 'phabricator-dashboard-css' => 'fe5b1869', - 'phabricator-diff-changeset' => 'aaaf4cb5', - 'phabricator-diff-changeset-list' => '85abc805', + 'phabricator-diff-changeset' => 'fc3919c8', + 'phabricator-diff-changeset-list' => 'ffa063d8', 'phabricator-diff-inline' => '1d17130f', 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-draggable-list' => 'bea6e7f4', @@ -878,7 +878,7 @@ return array( 'phuix-action-list-view' => 'b5c256b8', 'phuix-action-view' => 'b3465b9b', 'phuix-autocomplete' => 'f6699267', - 'phuix-button-view' => '0f13520b', + 'phuix-button-view' => 'b3c515be', 'phuix-dropdown-menu' => '8018ee50', 'phuix-form-control-view' => '83e03671', 'phuix-icon-view' => 'bff6884b', @@ -960,10 +960,6 @@ return array( 'javelin-dom', 'javelin-router', ), - '0f13520b' => array( - 'javelin-install', - 'javelin-dom', - ), '0f764c35' => array( 'javelin-install', 'javelin-util', @@ -1514,9 +1510,6 @@ return array( 'javelin-dom', 'javelin-stratcom', ), - '85abc805' => array( - 'javelin-install', - ), '85ee8ce6' => array( 'aphront-dialog-view-css', ), @@ -1621,9 +1614,6 @@ return array( 'javelin-mask', 'phabricator-drag-and-drop-file-upload', ), - '983751ee' => array( - 'phui-inline-comment-view-css', - ), '9a6dd75c' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1716,17 +1706,6 @@ return array( 'javelin-util', 'phabricator-prefab', ), - 'aaaf4cb5' => array( - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-install', - 'javelin-workflow', - 'javelin-router', - 'javelin-behavior-device', - 'javelin-vector', - 'phabricator-diff-inline', - ), 'ab2f381b' => array( 'javelin-request', 'javelin-behavior', @@ -1785,6 +1764,10 @@ return array( 'javelin-behavior', 'phabricator-prefab', ), + 'b3c515be' => array( + 'javelin-install', + 'javelin-dom', + ), 'b3e7d692' => array( 'javelin-install', ), @@ -1877,6 +1860,9 @@ return array( 'javelin-dom', 'javelin-vector', ), + 'c3f44655' => array( + 'phui-inline-comment-view-css', + ), 'c420b0b9' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -2155,6 +2141,17 @@ return array( 'javelin-behavior-device', 'phabricator-keyboard-shortcut', ), + 'fc3919c8' => array( + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-install', + 'javelin-workflow', + 'javelin-router', + 'javelin-behavior-device', + 'javelin-vector', + 'phabricator-diff-inline', + ), 'fc91ab6c' => array( 'javelin-behavior', 'javelin-dom', @@ -2166,6 +2163,10 @@ return array( 'javelin-view-visitor', 'javelin-util', ), + 'ffa063d8' => array( + 'javelin-install', + 'phuix-button-view', + ), ), 'packages' => array( 'conpherence.pkg.css' => array( diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php index b8090b88a2..f113afacf8 100644 --- a/src/applications/differential/view/DifferentialChangesetListView.php +++ b/src/applications/differential/view/DifferentialChangesetListView.php @@ -275,6 +275,10 @@ final class DifferentialChangesetListView extends AphrontView { pht('Hide or show the current file.'), 'You must select a file to hide or show.' => pht('You must select a file to hide or show.'), + + 'Unsaved' => pht('Unsaved'), + 'Unsubmitted' => pht('Unsubmitted'), + 'Comments' => pht('Comments'), ), )); diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css index f1be2b5f99..33dcea1213 100644 --- a/webroot/rsrc/css/application/differential/changeset-view.css +++ b/webroot/rsrc/css/application/differential/changeset-view.css @@ -413,3 +413,7 @@ tr.differential-inline-loading { .diff-banner-has-unsubmitted { background: {$sh-yellowbackground}; } + +.diff-banner-buttons { + float: right; +} diff --git a/webroot/rsrc/js/application/diff/DiffChangeset.js b/webroot/rsrc/js/application/diff/DiffChangeset.js index b5ebe4ce70..b00218bcfa 100644 --- a/webroot/rsrc/js/application/diff/DiffChangeset.js +++ b/webroot/rsrc/js/application/diff/DiffChangeset.js @@ -403,6 +403,8 @@ JX.install('DiffChangeset', { block.items.push(rows[ii]); } + var last_inline = null; + var last_inline_item = null; for (ii = 0; ii < blocks.length; ii++) { block = blocks[ii]; @@ -422,16 +424,38 @@ JX.install('DiffChangeset', { for (var jj = 0; jj < block.items.length; jj++) { var inline = this.getInlineForRow(block.items[jj]); - items.push({ + // When comments are being edited, they have a hidden row with + // the actual comment and then a visible row with the editor. + + // In this case, we only want to generate one item, but it should + // use the editor as a scroll target. To accomplish this, check if + // this row has the same inline as the previous row. If so, update + // the last item to use this row's nodes. + + if (inline === last_inline) { + last_inline_item.nodes.begin = block.items[jj]; + last_inline_item.nodes.end = block.items[jj]; + continue; + } else { + last_inline = inline; + } + + last_inline_item = { type: block.type, changeset: this, target: inline, hidden: inline.isHidden(), + deleted: !inline.getID() && !inline.isEditing(), nodes: { begin: block.items[jj], end: block.items[jj] + }, + attributes: { + unsaved: inline.isEditing() } - }); + }; + + items.push(last_inline_item); } } } diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js index b79f05296e..ff0afc21e4 100644 --- a/webroot/rsrc/js/application/diff/DiffChangesetList.js +++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js @@ -1,6 +1,7 @@ /** * @provides phabricator-diff-changeset-list * @requires javelin-install + * phuix-button-view * @javelin */ @@ -111,6 +112,7 @@ JX.install('DiffChangesetList', { _rangeTarget: null, _bannerNode: null, + _unsavedButton: null, sleep: function() { this._asleep = true; @@ -258,7 +260,13 @@ JX.install('DiffChangesetList', { _installJumpKey: function(key, label, delta, filter, show_hidden) { filter = filter || null; - var handler = JX.bind(this, this._onjumpkey, delta, filter, show_hidden); + + var options = { + filter: filter, + hidden: show_hidden + }; + + var handler = JX.bind(this, this._onjumpkey, delta, options); return this._installKey(key, label, handler); }, @@ -440,9 +448,14 @@ JX.install('DiffChangesetList', { .show(); }, - _onjumpkey: function(delta, filter, show_hidden, manager) { + _onjumpkey: function(delta, options) { var state = this._getSelectionState(); + var filter = options.filter || null; + var hidden = options.hidden || false; + var wrap = options.wrap || false; + var attribute = options.attribute || null; + var cursor = state.cursor; var items = state.items; @@ -452,6 +465,7 @@ JX.install('DiffChangesetList', { return; } + var did_wrap = false; while (true) { if (cursor === null) { cursor = 0; @@ -464,9 +478,22 @@ JX.install('DiffChangesetList', { return; } - // If we've gone forward off the end of the list, bail out. + // If we've gone forward off the end of the list, figure out where we + // should end up. if (cursor >= items.length) { - return; + if (!wrap) { + // If we aren't wrapping around, we're done. + return; + } + + if (did_wrap) { + // If we're already wrapped around, we're done. + return; + } + + // Otherwise, wrap the cursor back to the top. + cursor = 0; + did_wrap = true; } // If we're selecting things of a particular type (like only files) @@ -479,17 +506,31 @@ JX.install('DiffChangesetList', { // If the item is hidden, don't select it when iterating with jump // keys. It can still potentially be selected in other ways. - if (!show_hidden) { + if (!hidden) { if (items[cursor].hidden) { continue; } } + // If the item has been deleted, don't select it when iterating. The + // cursor may remain on it until it is removed. + if (items[cursor].deleted) { + continue; + } + + // If we're selecting things with a particular attribute, like + // "unsaved", skip items without the attribute. + if (attribute !== null) { + if (!(items[cursor].attributes || {})[attribute]) { + continue; + } + } + // Otherwise, we've found a valid item to select. break; } - this._setSelectionState(items[cursor], manager); + this._setSelectionState(items[cursor]); }, _getSelectionState: function() { @@ -512,24 +553,34 @@ JX.install('DiffChangesetList', { }; }, - _setSelectionState: function(item, manager) { + _setSelectionState: function(item) { this._cursorItem = item; - this._redrawSelection(manager, true); + this._redrawSelection(true); return this; }, - _redrawSelection: function(manager, scroll) { + _redrawSelection: function(scroll) { var cursor = this._cursorItem; if (!cursor) { this.setFocus(null); return; } + // If this item has been removed from the document (for example: create + // a new empty comment, then use the "Unsaved" button to select it, then + // cancel it), we can still keep the cursor here but do not want to show + // a selection reticle over an invisible node. + if (cursor.deleted) { + this.setFocus(null); + return; + } + this.setFocus(cursor.nodes.begin, cursor.nodes.end); - if (manager && scroll) { - manager.scrollTo(cursor.nodes.begin); + if (scroll) { + var pos = JX.$V(cursor.nodes.begin); + JX.DOM.scrollToPosition(0, pos.y - 60); } return this; @@ -1320,14 +1371,65 @@ JX.install('DiffChangesetList', { 'diff-banner-has-unsubmitted', !!unsubmitted.length); + var unsaved_button = this._getUnsavedButton(); + var pht = this.getTranslations(); + + if (unsaved.length) { + unsaved_button.setText(unsaved.length + ' ' + pht('Unsaved')); + JX.DOM.show(unsaved_button.getNode()); + } else { + JX.DOM.hide(unsaved_button.getNode()); + } + + var path_view = [icon, ' ', changeset.getDisplayPath()]; + + var buttons_attrs = { + className: 'diff-banner-buttons' + }; + + var buttons_list = [ + unsaved_button.getNode() + ]; + + var buttons_view = JX.$N('div', buttons_attrs, buttons_list); + var icon = new JX.PHUIXIconView() .setIcon(changeset.getIcon()) .getNode(); - JX.DOM.setContent(node, [icon, ' ', changeset.getDisplayPath()]); + JX.DOM.setContent(node, [buttons_view, path_view]); document.body.appendChild(node); }, + _getUnsavedButton: function() { + if (!this._unsavedButton) { + var button = new JX.PHUIXButtonView() + .setIcon('fa-commenting-o') + .setButtonType(JX.PHUIXButtonView.BUTTONTYPE_SIMPLE); + + var node = button.getNode(); + + var onunsaved = JX.bind(this, this._onunsavedclick); + JX.DOM.listen(node, 'click', null, onunsaved); + + this._unsavedButton = button; + } + + return this._unsavedButton; + }, + + _onunsavedclick: function(e) { + e.kill(); + + var options = { + filter: 'comment', + wrap: true, + attribute: 'unsaved' + }; + + this._onjumpkey(1, options); + }, + _getBannerNode: function() { if (!this._bannerNode) { var attributes = { diff --git a/webroot/rsrc/js/phuix/PHUIXButtonView.js b/webroot/rsrc/js/phuix/PHUIXButtonView.js index 67b59f24f1..e060cf0e9a 100644 --- a/webroot/rsrc/js/phuix/PHUIXButtonView.js +++ b/webroot/rsrc/js/phuix/PHUIXButtonView.js @@ -57,6 +57,7 @@ JX.install('PHUIXButtonView', { setText: function(text) { JX.DOM.setContent(this._getTextNode(), text); + this._redraw(); return this; }, From 863b7ab766857a7b136921d306741d9eca29ae16 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 3 Jun 2017 06:31:09 -0700 Subject: [PATCH 05/25] Add an "Unsubmitted" button to the Differential persistent header Summary: Ref M1476. Same as D18070 but that did most of the magic. Test Plan: {F4987961} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D18071 --- resources/celerity/map.php | 40 ++++++++--------- .../rsrc/js/application/diff/DiffChangeset.js | 3 +- .../js/application/diff/DiffChangesetList.js | 44 ++++++++++++++++++- 3 files changed, 64 insertions(+), 23 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index b403d7199a..530ac29ea0 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', - 'differential.pkg.js' => 'b453b745', + 'differential.pkg.js' => 'b2c4cbfa', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '84c8f8fd', 'favicon.ico' => '30672e08', @@ -393,8 +393,8 @@ return array( 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173', 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', - 'rsrc/js/application/diff/DiffChangeset.js' => 'fc3919c8', - 'rsrc/js/application/diff/DiffChangesetList.js' => 'ffa063d8', + 'rsrc/js/application/diff/DiffChangeset.js' => 'ee50a0ec', + 'rsrc/js/application/diff/DiffChangesetList.js' => 'b4cf2217', 'rsrc/js/application/diff/DiffInline.js' => '1d17130f', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', @@ -772,8 +772,8 @@ return array( 'phabricator-darklog' => 'c8e1ffe3', 'phabricator-darkmessage' => 'c48cccdd', 'phabricator-dashboard-css' => 'fe5b1869', - 'phabricator-diff-changeset' => 'fc3919c8', - 'phabricator-diff-changeset-list' => 'ffa063d8', + 'phabricator-diff-changeset' => 'ee50a0ec', + 'phabricator-diff-changeset-list' => 'b4cf2217', 'phabricator-diff-inline' => '1d17130f', 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-draggable-list' => 'bea6e7f4', @@ -1771,6 +1771,10 @@ return array( 'b3e7d692' => array( 'javelin-install', ), + 'b4cf2217' => array( + 'javelin-install', + 'phuix-button-view', + ), 'b59e1e96' => array( 'javelin-behavior', 'javelin-stratcom', @@ -2088,6 +2092,17 @@ return array( 'javelin-behavior', 'javelin-uri', ), + 'ee50a0ec' => array( + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-install', + 'javelin-workflow', + 'javelin-router', + 'javelin-behavior-device', + 'javelin-vector', + 'phabricator-diff-inline', + ), 'efe49472' => array( 'javelin-install', 'javelin-util', @@ -2141,17 +2156,6 @@ return array( 'javelin-behavior-device', 'phabricator-keyboard-shortcut', ), - 'fc3919c8' => array( - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-install', - 'javelin-workflow', - 'javelin-router', - 'javelin-behavior-device', - 'javelin-vector', - 'phabricator-diff-inline', - ), 'fc91ab6c' => array( 'javelin-behavior', 'javelin-dom', @@ -2163,10 +2167,6 @@ return array( 'javelin-view-visitor', 'javelin-util', ), - 'ffa063d8' => array( - 'javelin-install', - 'phuix-button-view', - ), ), 'packages' => array( 'conpherence.pkg.css' => array( diff --git a/webroot/rsrc/js/application/diff/DiffChangeset.js b/webroot/rsrc/js/application/diff/DiffChangeset.js index b00218bcfa..ee20682650 100644 --- a/webroot/rsrc/js/application/diff/DiffChangeset.js +++ b/webroot/rsrc/js/application/diff/DiffChangeset.js @@ -451,7 +451,8 @@ JX.install('DiffChangeset', { end: block.items[jj] }, attributes: { - unsaved: inline.isEditing() + unsaved: inline.isEditing(), + unsubmitted: inline.isDraft() } }; diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js index ff0afc21e4..361637641d 100644 --- a/webroot/rsrc/js/application/diff/DiffChangesetList.js +++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js @@ -113,6 +113,7 @@ JX.install('DiffChangesetList', { _bannerNode: null, _unsavedButton: null, + _unsubmittedButton: null, sleep: function() { this._asleep = true; @@ -1371,8 +1372,9 @@ JX.install('DiffChangesetList', { 'diff-banner-has-unsubmitted', !!unsubmitted.length); - var unsaved_button = this._getUnsavedButton(); var pht = this.getTranslations(); + var unsaved_button = this._getUnsavedButton(); + var unsubmitted_button = this._getUnsubmittedButton(); if (unsaved.length) { unsaved_button.setText(unsaved.length + ' ' + pht('Unsaved')); @@ -1381,6 +1383,14 @@ JX.install('DiffChangesetList', { JX.DOM.hide(unsaved_button.getNode()); } + if (unsubmitted.length) { + unsubmitted_button.setText( + unsubmitted.length + ' ' + pht('Unsubmitted')); + JX.DOM.show(unsubmitted_button.getNode()); + } else { + JX.DOM.hide(unsubmitted_button.getNode()); + } + var path_view = [icon, ' ', changeset.getDisplayPath()]; var buttons_attrs = { @@ -1388,7 +1398,8 @@ JX.install('DiffChangesetList', { }; var buttons_list = [ - unsaved_button.getNode() + unsaved_button.getNode(), + unsubmitted_button.getNode() ]; var buttons_view = JX.$N('div', buttons_attrs, buttons_list); @@ -1418,6 +1429,23 @@ JX.install('DiffChangesetList', { return this._unsavedButton; }, + _getUnsubmittedButton: function() { + if (!this._unsubmittedButton) { + var button = new JX.PHUIXButtonView() + .setIcon('fa-comment-o') + .setButtonType(JX.PHUIXButtonView.BUTTONTYPE_SIMPLE); + + var node = button.getNode(); + + var onunsubmitted = JX.bind(this, this._onunsubmittedclick); + JX.DOM.listen(node, 'click', null, onunsubmitted); + + this._unsubmittedButton = button; + } + + return this._unsubmittedButton; + }, + _onunsavedclick: function(e) { e.kill(); @@ -1430,6 +1458,18 @@ JX.install('DiffChangesetList', { this._onjumpkey(1, options); }, + _onunsubmittedclick: function(e) { + e.kill(); + + var options = { + filter: 'comment', + wrap: true, + attribute: 'unsubmitted' + }; + + this._onjumpkey(1, options); + }, + _getBannerNode: function() { if (!this._bannerNode) { var attributes = { From 9773dc0e6cc4e1c2863e89fd6d5157ffdc8e022d Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 3 Jun 2017 06:42:52 -0700 Subject: [PATCH 06/25] Add "X / Y Comments" button to Differential persistent header Summary: Ref M1476. Test Plan: {F4987991} Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D18072 --- resources/celerity/map.php | 40 +++++----- .../rsrc/js/application/diff/DiffChangeset.js | 6 +- .../js/application/diff/DiffChangesetList.js | 76 ++++++++++++++++--- 3 files changed, 91 insertions(+), 31 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 530ac29ea0..4dedae2fec 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', - 'differential.pkg.js' => 'b2c4cbfa', + 'differential.pkg.js' => '889ab0ab', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '84c8f8fd', 'favicon.ico' => '30672e08', @@ -393,8 +393,8 @@ return array( 'rsrc/js/application/dashboard/behavior-dashboard-move-panels.js' => '408bf173', 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', - 'rsrc/js/application/diff/DiffChangeset.js' => 'ee50a0ec', - 'rsrc/js/application/diff/DiffChangesetList.js' => 'b4cf2217', + 'rsrc/js/application/diff/DiffChangeset.js' => 'd498bddb', + 'rsrc/js/application/diff/DiffChangesetList.js' => '0db8cdca', 'rsrc/js/application/diff/DiffInline.js' => '1d17130f', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', @@ -772,8 +772,8 @@ return array( 'phabricator-darklog' => 'c8e1ffe3', 'phabricator-darkmessage' => 'c48cccdd', 'phabricator-dashboard-css' => 'fe5b1869', - 'phabricator-diff-changeset' => 'ee50a0ec', - 'phabricator-diff-changeset-list' => 'b4cf2217', + 'phabricator-diff-changeset' => 'd498bddb', + 'phabricator-diff-changeset-list' => '0db8cdca', 'phabricator-diff-inline' => '1d17130f', 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-draggable-list' => 'bea6e7f4', @@ -960,6 +960,10 @@ return array( 'javelin-dom', 'javelin-router', ), + '0db8cdca' => array( + 'javelin-install', + 'phuix-button-view', + ), '0f764c35' => array( 'javelin-install', 'javelin-util', @@ -1771,10 +1775,6 @@ return array( 'b3e7d692' => array( 'javelin-install', ), - 'b4cf2217' => array( - 'javelin-install', - 'phuix-button-view', - ), 'b59e1e96' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1978,6 +1978,17 @@ return array( 'javelin-uri', 'javelin-util', ), + 'd498bddb' => array( + 'javelin-dom', + 'javelin-util', + 'javelin-stratcom', + 'javelin-install', + 'javelin-workflow', + 'javelin-router', + 'javelin-behavior-device', + 'javelin-vector', + 'phabricator-diff-inline', + ), 'd4eecc63' => array( 'javelin-behavior', 'javelin-dom', @@ -2092,17 +2103,6 @@ return array( 'javelin-behavior', 'javelin-uri', ), - 'ee50a0ec' => array( - 'javelin-dom', - 'javelin-util', - 'javelin-stratcom', - 'javelin-install', - 'javelin-workflow', - 'javelin-router', - 'javelin-behavior-device', - 'javelin-vector', - 'phabricator-diff-inline', - ), 'efe49472' => array( 'javelin-install', 'javelin-util', diff --git a/webroot/rsrc/js/application/diff/DiffChangeset.js b/webroot/rsrc/js/application/diff/DiffChangeset.js index ee20682650..c697ba5a6c 100644 --- a/webroot/rsrc/js/application/diff/DiffChangeset.js +++ b/webroot/rsrc/js/application/diff/DiffChangeset.js @@ -440,6 +440,8 @@ JX.install('DiffChangeset', { last_inline = inline; } + var is_saved = (!inline.isDraft() && !inline.isEditing()); + last_inline_item = { type: block.type, changeset: this, @@ -452,7 +454,9 @@ JX.install('DiffChangeset', { }, attributes: { unsaved: inline.isEditing(), - unsubmitted: inline.isDraft() + unsubmitted: inline.isDraft(), + undone: (is_saved && !inline.isDone()), + done: (is_saved && inline.isDone()) } }; diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js index 361637641d..400b828a9a 100644 --- a/webroot/rsrc/js/application/diff/DiffChangesetList.js +++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js @@ -114,6 +114,8 @@ JX.install('DiffChangesetList', { _bannerNode: null, _unsavedButton: null, _unsubmittedButton: null, + _doneButton: null, + _doneMode: null, sleep: function() { this._asleep = true; @@ -531,7 +533,7 @@ JX.install('DiffChangesetList', { break; } - this._setSelectionState(items[cursor]); + this._setSelectionState(items[cursor], true); }, _getSelectionState: function() { @@ -554,9 +556,9 @@ JX.install('DiffChangesetList', { }; }, - _setSelectionState: function(item) { + _setSelectionState: function(item, scroll) { this._cursorItem = item; - this._redrawSelection(true); + this._redrawSelection(scroll); return this; }, @@ -598,7 +600,7 @@ JX.install('DiffChangesetList', { var state = this._getSelectionState(); if (state.cursor !== null) { - this._setSelectionState(state.items[state.cursor]); + this._setSelectionState(state.items[state.cursor], false); } }, @@ -910,7 +912,7 @@ JX.install('DiffChangesetList', { if (selection.cursor !== null) { item = selection.items[selection.cursor]; if (item.target === inline) { - this._setSelectionState(null); + this._setSelectionState(null, false); return; } } @@ -922,7 +924,7 @@ JX.install('DiffChangesetList', { for (var ii = 0; ii < items.length; ii++) { item = items[ii]; if (item.target === inline) { - this._setSelectionState(item); + this._setSelectionState(item, false); } } }, @@ -1339,7 +1341,7 @@ JX.install('DiffChangesetList', { var unsaved = []; var unsubmitted = []; var undone = []; - var all = []; + var done = []; for (var ii = 0; ii < changesets.length; ii++) { var inlines = changesets[ii].getInlines(); @@ -1350,14 +1352,14 @@ JX.install('DiffChangesetList', { continue; } - all.push(inline); - if (inline.isEditing()) { unsaved.push(inline); } else if (inline.isDraft()) { unsubmitted.push(inline); } else if (!inline.isDone()) { undone.push(inline); + } else { + done.push(inline); } } } @@ -1375,6 +1377,7 @@ JX.install('DiffChangesetList', { var pht = this.getTranslations(); var unsaved_button = this._getUnsavedButton(); var unsubmitted_button = this._getUnsubmittedButton(); + var done_button = this._getDoneButton(); if (unsaved.length) { unsaved_button.setText(unsaved.length + ' ' + pht('Unsaved')); @@ -1391,6 +1394,30 @@ JX.install('DiffChangesetList', { JX.DOM.hide(unsubmitted_button.getNode()); } + if (done.length || undone.length) { + done_button.setText([ + done.length, + ' / ', + (done.length + undone.length), + ' ', + pht('Comments') + ]); + + JX.DOM.show(done_button.getNode()); + + // If any comments are not marked "Done", this cycles through the + // missing comments. Otherwise, it cycles through all the saved + // comments. + if (undone.length) { + this._doneMode = 'undone'; + } else { + this._doneMode = 'done'; + } + + } else { + JX.DOM.hide(done_button.getNode()); + } + var path_view = [icon, ' ', changeset.getDisplayPath()]; var buttons_attrs = { @@ -1399,7 +1426,8 @@ JX.install('DiffChangesetList', { var buttons_list = [ unsaved_button.getNode(), - unsubmitted_button.getNode() + unsubmitted_button.getNode(), + done_button.getNode() ]; var buttons_view = JX.$N('div', buttons_attrs, buttons_list); @@ -1446,6 +1474,22 @@ JX.install('DiffChangesetList', { return this._unsubmittedButton; }, + _getDoneButton: function() { + if (!this._doneButton) { + var button = new JX.PHUIXButtonView() + .setIcon('fa-comment') + .setButtonType(JX.PHUIXButtonView.BUTTONTYPE_SIMPLE); + + var node = button.getNode(); + + var ondone = JX.bind(this, this._ondoneclick); + JX.DOM.listen(node, 'click', null, ondone); + + this._doneButton = button; + } + + return this._doneButton; + }, _onunsavedclick: function(e) { e.kill(); @@ -1470,6 +1514,18 @@ JX.install('DiffChangesetList', { this._onjumpkey(1, options); }, + _ondoneclick: function(e) { + e.kill(); + + var options = { + filter: 'comment', + wrap: true, + attribute: this._doneMode + }; + + this._onjumpkey(1, options); + }, + _getBannerNode: function() { if (!this._bannerNode) { var attributes = { From d3c464a610bc3a708366fc731f0099823736d427 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 5 Jun 2017 20:14:34 +0000 Subject: [PATCH 07/25] Separate button CSS classes Summary: Try to dis-ambiguate various button types and colors. Moves `simple` to `phui-button-simple` and moves colors to `button-color`. Test Plan: Grep for buttons still inline, UIExamples, PHUIX, Herald, and Email Preferences. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18077 --- resources/celerity/map.php | 28 +++--- .../almanac/controller/AlmanacController.php | 4 +- .../almanac/view/AlmanacBindingTableView.php | 2 +- .../view/AlmanacInterfaceTableView.php | 4 +- .../PhabricatorConduitTokensSettingsPanel.php | 2 +- .../config/view/PhabricatorSetupIssueView.php | 6 +- .../controller/ConpherenceController.php | 2 +- .../view/ConpherenceDurableColumnView.php | 2 +- .../plugin/DarkConsoleServicesPlugin.php | 3 +- .../plugin/DarkConsoleXHProfPlugin.php | 2 +- .../view/PhabricatorDaemonTasksTableView.php | 2 +- .../DifferentialRevisionViewController.php | 2 +- .../view/DifferentialChangesetListView.php | 2 +- ...PhabricatorFileTransformListController.php | 2 +- .../controller/HeraldRuleController.php | 4 +- .../ManiphestBatchEditController.php | 2 +- .../view/ManiphestTaskResultListView.php | 6 +- ...habricatorMetaMTAApplicationEmailPanel.php | 4 +- ...OAuthServerAuthorizationsSettingsPanel.php | 2 +- .../PhabricatorOwnersPathsController.php | 2 +- .../view/PassphraseCredentialControl.php | 2 +- .../pholio/view/PholioUploadedImageView.php | 2 +- .../cart/PhortuneCartCheckoutController.php | 2 +- .../PhortuneSubscriptionEditController.php | 2 +- .../phortune/view/PhortuneOrderTableView.php | 2 +- .../controller/PhrictionDiffController.php | 12 +-- .../PhabricatorPolicyEditController.php | 2 +- ...PhabricatorEmailAddressesSettingsPanel.php | 6 +- .../PhabricatorMultiFactorSettingsPanel.php | 2 +- .../PhabricatorSessionsSettingsPanel.php | 4 +- .../panel/PhabricatorTokensSettingsPanel.php | 4 +- .../uiexample/examples/PHUIButtonExample.php | 73 ++------------- .../examples/PHUIColorPalletteExample.php | 2 +- .../PhabricatorNotificationUIExample.php | 2 +- src/view/AphrontDialogView.php | 2 +- .../form/control/AphrontFormPolicyControl.php | 3 +- .../form/control/PHUIFormIconSetControl.php | 2 +- src/view/layout/AphrontListFilterView.php | 4 +- src/view/phui/PHUIButtonView.php | 7 +- src/view/phui/PHUIHovercardView.php | 2 +- .../css/phui/button/phui-button-simple.css | 88 +++++++++---------- webroot/rsrc/css/phui/button/phui-button.css | 32 +++---- webroot/rsrc/js/phuix/PHUIXButtonView.js | 6 +- 43 files changed, 146 insertions(+), 200 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 4dedae2fec..0745c41d4d 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => '5284a0e0', + 'core.pkg.css' => '1a935531', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', @@ -125,8 +125,8 @@ return array( 'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82', 'rsrc/css/layout/phabricator-source-code-view.css' => '4383192f', 'rsrc/css/phui/button/phui-button-bar.css' => '39fe680c', - 'rsrc/css/phui/button/phui-button-simple.css' => '081cfeea', - 'rsrc/css/phui/button/phui-button.css' => '9f13ddcc', + 'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68', + 'rsrc/css/phui/button/phui-button.css' => '022581b4', 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', 'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600', 'rsrc/css/phui/calendar/phui-calendar-month.css' => '8e10e92c', @@ -526,7 +526,7 @@ return array( 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 'rsrc/js/phuix/PHUIXActionView.js' => 'b3465b9b', 'rsrc/js/phuix/PHUIXAutocomplete.js' => 'f6699267', - 'rsrc/js/phuix/PHUIXButtonView.js' => 'b3c515be', + 'rsrc/js/phuix/PHUIXButtonView.js' => 'a37126bd', 'rsrc/js/phuix/PHUIXDropdownMenu.js' => '8018ee50', 'rsrc/js/phuix/PHUIXExample.js' => '68af71ca', 'rsrc/js/phuix/PHUIXFormControl.js' => '83e03671', @@ -820,8 +820,8 @@ return array( 'phui-big-info-view-css' => 'bd903741', 'phui-box-css' => '269cbc99', 'phui-button-bar-css' => '39fe680c', - 'phui-button-css' => '9f13ddcc', - 'phui-button-simple-css' => '081cfeea', + 'phui-button-css' => '022581b4', + 'phui-button-simple-css' => '8e1baf68', 'phui-calendar-css' => '477acfaa', 'phui-calendar-day-css' => '572b1893', 'phui-calendar-list-css' => '576be600', @@ -878,7 +878,7 @@ return array( 'phuix-action-list-view' => 'b5c256b8', 'phuix-action-view' => 'b3465b9b', 'phuix-autocomplete' => 'f6699267', - 'phuix-button-view' => 'b3c515be', + 'phuix-button-view' => 'a37126bd', 'phuix-dropdown-menu' => '8018ee50', 'phuix-form-control-view' => '83e03671', 'phuix-icon-view' => 'bff6884b', @@ -936,9 +936,6 @@ return array( 'javelin-stratcom', 'javelin-workflow', ), - '081cfeea' => array( - 'phui-button-css', - ), '0825c27a' => array( 'javelin-behavior', 'javelin-dom', @@ -1561,6 +1558,9 @@ return array( 'javelin-stratcom', 'javelin-install', ), + '8e1baf68' => array( + 'phui-button-css', + ), '8ff5e24c' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1651,6 +1651,10 @@ return array( 'javelin-util', 'phabricator-keyboard-shortcut', ), + 'a37126bd' => array( + 'javelin-install', + 'javelin-dom', + ), 'a3a63478' => array( 'phui-workcard-view-css', ), @@ -1768,10 +1772,6 @@ return array( 'javelin-behavior', 'phabricator-prefab', ), - 'b3c515be' => array( - 'javelin-install', - 'javelin-dom', - ), 'b3e7d692' => array( 'javelin-install', ), diff --git a/src/applications/almanac/controller/AlmanacController.php b/src/applications/almanac/controller/AlmanacController.php index e4d9921660..d6d7188511 100644 --- a/src/applications/almanac/controller/AlmanacController.php +++ b/src/applications/almanac/controller/AlmanacController.php @@ -84,8 +84,8 @@ abstract class AlmanacController 'a', array( 'class' => ($can_edit - ? 'button grey small' - : 'button grey small disabled'), + ? 'button button-grey small' + : 'button button-grey small disabled'), 'sigil' => 'workflow', 'href' => $delete_uri, ), diff --git a/src/applications/almanac/view/AlmanacBindingTableView.php b/src/applications/almanac/view/AlmanacBindingTableView.php index 06797c912d..746d3de5c2 100644 --- a/src/applications/almanac/view/AlmanacBindingTableView.php +++ b/src/applications/almanac/view/AlmanacBindingTableView.php @@ -77,7 +77,7 @@ final class AlmanacBindingTableView extends AphrontView { phutil_tag( 'a', array( - 'class' => 'small grey button', + 'class' => 'small button button-grey', 'href' => '/almanac/binding/'.$binding->getID().'/', ), pht('Details')), diff --git a/src/applications/almanac/view/AlmanacInterfaceTableView.php b/src/applications/almanac/view/AlmanacInterfaceTableView.php index f937e34f44..1fdcd0bf35 100644 --- a/src/applications/almanac/view/AlmanacInterfaceTableView.php +++ b/src/applications/almanac/view/AlmanacInterfaceTableView.php @@ -30,9 +30,9 @@ final class AlmanacInterfaceTableView extends AphrontView { $can_edit = $this->getCanEdit(); if ($can_edit) { - $button_class = 'small grey button'; + $button_class = 'small button button-grey'; } else { - $button_class = 'small grey button disabled'; + $button_class = 'small button button-grey disabled'; } $handles = $viewer->loadHandles(mpull($interfaces, 'getNetworkPHID')); diff --git a/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php b/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php index 59161d2814..fc89d310e1 100644 --- a/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php +++ b/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php @@ -60,7 +60,7 @@ final class PhabricatorConduitTokensSettingsPanel javelin_tag( 'a', array( - 'class' => 'button small grey', + 'class' => 'button small button-grey', 'href' => '/conduit/token/terminate/'.$token->getID().'/', 'sigil' => 'workflow', ), diff --git a/src/applications/config/view/PhabricatorSetupIssueView.php b/src/applications/config/view/PhabricatorSetupIssueView.php index 10e802eb3f..71bdb9d8dc 100644 --- a/src/applications/config/view/PhabricatorSetupIssueView.php +++ b/src/applications/config/view/PhabricatorSetupIssueView.php @@ -129,7 +129,7 @@ final class PhabricatorSetupIssueView extends AphrontView { array( 'href' => '/config/unignore/'.$issue->getIssueKey().'/', 'sigil' => 'workflow', - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht('Unignore Setup Issue')); } else { @@ -138,7 +138,7 @@ final class PhabricatorSetupIssueView extends AphrontView { array( 'href' => '/config/ignore/'.$issue->getIssueKey().'/', 'sigil' => 'workflow', - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht('Ignore Setup Issue')); } @@ -147,7 +147,7 @@ final class PhabricatorSetupIssueView extends AphrontView { 'a', array( 'href' => '/config/issue/'.$issue->getIssueKey().'/', - 'class' => 'button grey', + 'class' => 'button button-grey', 'style' => 'float: right', ), pht('Reload Page')); diff --git a/src/applications/conpherence/controller/ConpherenceController.php b/src/applications/conpherence/controller/ConpherenceController.php index 9d7473e159..f47e7bf1ad 100644 --- a/src/applications/conpherence/controller/ConpherenceController.php +++ b/src/applications/conpherence/controller/ConpherenceController.php @@ -140,7 +140,7 @@ abstract class ConpherenceController extends PhabricatorController { 'button', array( 'type' => 'SUBMIT', - 'class' => 'button green mlr', + 'class' => 'button button-green mlr', ), pht('Join Room')); diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php index 5d6a5eaaec..83c40aa32e 100644 --- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php +++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php @@ -404,7 +404,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { 'a', array( 'href' => '/conpherence/search/', - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht('Find Rooms')), ); diff --git a/src/applications/console/plugin/DarkConsoleServicesPlugin.php b/src/applications/console/plugin/DarkConsoleServicesPlugin.php index ea5a100550..7d779027da 100644 --- a/src/applications/console/plugin/DarkConsoleServicesPlugin.php +++ b/src/applications/console/plugin/DarkConsoleServicesPlugin.php @@ -170,7 +170,8 @@ final class DarkConsoleServicesPlugin extends DarkConsolePlugin { 'a', array( 'href' => $data['analyzeURI'], - 'class' => $data['didAnalyze'] ? 'disabled button' : 'green button', + 'class' => $data['didAnalyze'] ? + 'disabled button' : 'button button-green', ), pht('Analyze Query Plans')), phutil_tag('h1', array(), pht('Calls to External Services')), diff --git a/src/applications/console/plugin/DarkConsoleXHProfPlugin.php b/src/applications/console/plugin/DarkConsoleXHProfPlugin.php index f751cc31a5..f76b77c850 100644 --- a/src/applications/console/plugin/DarkConsoleXHProfPlugin.php +++ b/src/applications/console/plugin/DarkConsoleXHProfPlugin.php @@ -67,7 +67,7 @@ final class DarkConsoleXHProfPlugin extends DarkConsolePlugin { 'a', array( 'href' => $profile_uri, - 'class' => $run ? 'disabled button' : 'green button', + 'class' => $run ? 'disabled button' : 'button button-green', ), pht('Profile Page')), phutil_tag('h1', array(), pht('XHProf Profiler')), diff --git a/src/applications/daemon/view/PhabricatorDaemonTasksTableView.php b/src/applications/daemon/view/PhabricatorDaemonTasksTableView.php index 4fded0b68a..440610be25 100644 --- a/src/applications/daemon/view/PhabricatorDaemonTasksTableView.php +++ b/src/applications/daemon/view/PhabricatorDaemonTasksTableView.php @@ -41,7 +41,7 @@ final class PhabricatorDaemonTasksTableView extends AphrontView { 'a', array( 'href' => '/daemon/task/'.$task->getID().'/', - 'class' => 'button small grey', + 'class' => 'button small button-grey', ), pht('View Task')), ); diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 769ac37e1a..69e45b377d 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -156,7 +156,7 @@ final class DifferentialRevisionViewController extends DifferentialController { phutil_tag( 'a', array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'href' => $request_uri ->alter('large', 'true') ->setFragment('toc'), diff --git a/src/applications/differential/view/DifferentialChangesetListView.php b/src/applications/differential/view/DifferentialChangesetListView.php index f113afacf8..25f762ba66 100644 --- a/src/applications/differential/view/DifferentialChangesetListView.php +++ b/src/applications/differential/view/DifferentialChangesetListView.php @@ -174,7 +174,7 @@ final class DifferentialChangesetListView extends AphrontView { $load = javelin_tag( 'a', array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'href' => '#'.$uniq_id, 'sigil' => 'differential-load', 'meta' => array( diff --git a/src/applications/files/controller/PhabricatorFileTransformListController.php b/src/applications/files/controller/PhabricatorFileTransformListController.php index 026f60320e..ab5322fc1a 100644 --- a/src/applications/files/controller/PhabricatorFileTransformListController.php +++ b/src/applications/files/controller/PhabricatorFileTransformListController.php @@ -68,7 +68,7 @@ final class PhabricatorFileTransformListController $view_link = phutil_tag( 'a', array( - 'class' => 'small grey button', + 'class' => 'small button button-grey', 'href' => $view_href, ), $view_text); diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php index 74ce553f9c..0e7f6b0aa5 100644 --- a/src/applications/herald/controller/HeraldRuleController.php +++ b/src/applications/herald/controller/HeraldRuleController.php @@ -191,7 +191,7 @@ final class HeraldRuleController extends HeraldController { 'a', array( 'href' => '#', - 'class' => 'button green', + 'class' => 'button button-green', 'sigil' => 'create-condition', 'mustcapture' => true, ), @@ -212,7 +212,7 @@ final class HeraldRuleController extends HeraldController { 'a', array( 'href' => '#', - 'class' => 'button green', + 'class' => 'button button-green', 'sigil' => 'create-action', 'mustcapture' => true, ), diff --git a/src/applications/maniphest/controller/ManiphestBatchEditController.php b/src/applications/maniphest/controller/ManiphestBatchEditController.php index 90fcda28ec..f2ec4b433f 100644 --- a/src/applications/maniphest/controller/ManiphestBatchEditController.php +++ b/src/applications/maniphest/controller/ManiphestBatchEditController.php @@ -173,7 +173,7 @@ final class ManiphestBatchEditController extends ManiphestController { 'a', array( 'href' => '#', - 'class' => 'button green', + 'class' => 'button button-green', 'sigil' => 'add-action', 'mustcapture' => true, ), diff --git a/src/applications/maniphest/view/ManiphestTaskResultListView.php b/src/applications/maniphest/view/ManiphestTaskResultListView.php index 9e28e89d8d..0144df0e33 100644 --- a/src/applications/maniphest/view/ManiphestTaskResultListView.php +++ b/src/applications/maniphest/view/ManiphestTaskResultListView.php @@ -196,7 +196,7 @@ final class ManiphestTaskResultListView extends ManiphestView { array( 'href' => '#', 'mustcapture' => true, - 'class' => 'grey button', + 'class' => 'button button-grey', 'id' => 'batch-select-all', ), pht('Select All')); @@ -206,7 +206,7 @@ final class ManiphestTaskResultListView extends ManiphestView { array( 'href' => '#', 'mustcapture' => true, - 'class' => 'grey button', + 'class' => 'button button-grey', 'id' => 'batch-select-none', ), pht('Clear Selection')); @@ -224,7 +224,7 @@ final class ManiphestTaskResultListView extends ManiphestView { 'a', array( 'href' => '/maniphest/export/'.$saved_query->getQueryKey().'/', - 'class' => 'grey button', + 'class' => 'button button-grey', ), pht('Export to Excel')); diff --git a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php index a2d32e3360..afde9fee23 100644 --- a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php +++ b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php @@ -341,7 +341,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel $button_edit = javelin_tag( 'a', array( - 'class' => 'button small grey', + 'class' => 'button small button-grey', 'href' => $uri->alter('edit', $email->getID()), 'sigil' => 'workflow', ), @@ -350,7 +350,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel $button_remove = javelin_tag( 'a', array( - 'class' => 'button small grey', + 'class' => 'button small button-grey', 'href' => $uri->alter('delete', $email->getID()), 'sigil' => 'workflow', ), diff --git a/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php b/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php index 06f26b2ee3..596f3decc9 100644 --- a/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php +++ b/src/applications/oauthserver/panel/PhabricatorOAuthServerAuthorizationsSettingsPanel.php @@ -87,7 +87,7 @@ final class PhabricatorOAuthServerAuthorizationsSettingsPanel 'a', array( 'href' => $this->getPanelURI('?revoke='.$authorization->getID()), - 'class' => 'small grey button', + 'class' => 'small button button-grey', 'sigil' => 'workflow', ), pht('Revoke')); diff --git a/src/applications/owners/controller/PhabricatorOwnersPathsController.php b/src/applications/owners/controller/PhabricatorOwnersPathsController.php index b69faf5648..e5463b4cb4 100644 --- a/src/applications/owners/controller/PhabricatorOwnersPathsController.php +++ b/src/applications/owners/controller/PhabricatorOwnersPathsController.php @@ -124,7 +124,7 @@ final class PhabricatorOwnersPathsController 'a', array( 'href' => '#', - 'class' => 'button green', + 'class' => 'button button-green', 'sigil' => 'addpath', 'mustcapture' => true, ), diff --git a/src/applications/passphrase/view/PassphraseCredentialControl.php b/src/applications/passphrase/view/PassphraseCredentialControl.php index 015dce1f40..411afd6f85 100644 --- a/src/applications/passphrase/view/PassphraseCredentialControl.php +++ b/src/applications/passphrase/view/PassphraseCredentialControl.php @@ -113,7 +113,7 @@ final class PassphraseCredentialControl extends AphrontFormControl { 'a', array( 'href' => '#', - 'class' => 'button grey', + 'class' => 'button button-grey', 'sigil' => 'passphrase-credential-add', 'mustcapture' => true, ), diff --git a/src/applications/pholio/view/PholioUploadedImageView.php b/src/applications/pholio/view/PholioUploadedImageView.php index 460b54c517..e583fa687b 100644 --- a/src/applications/pholio/view/PholioUploadedImageView.php +++ b/src/applications/pholio/view/PholioUploadedImageView.php @@ -120,7 +120,7 @@ final class PholioUploadedImageView extends AphrontView { return javelin_tag( 'a', array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'sigil' => 'pholio-drop-remove', ), 'X'); diff --git a/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php b/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php index fdc19dae44..dd611ecb7b 100644 --- a/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php +++ b/src/applications/phortune/controller/cart/PhortuneCartCheckoutController.php @@ -152,7 +152,7 @@ final class PhortuneCartCheckoutController $new_method = javelin_tag( 'a', array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'href' => $payment_method_uri, ), pht('Add New Payment Method')); diff --git a/src/applications/phortune/controller/subscription/PhortuneSubscriptionEditController.php b/src/applications/phortune/controller/subscription/PhortuneSubscriptionEditController.php index 7af8aa3456..185bbdbcc6 100644 --- a/src/applications/phortune/controller/subscription/PhortuneSubscriptionEditController.php +++ b/src/applications/phortune/controller/subscription/PhortuneSubscriptionEditController.php @@ -123,7 +123,7 @@ final class PhortuneSubscriptionEditController extends PhortuneController { 'a', array( 'href' => $uri, - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht('Add Payment Method...')); diff --git a/src/applications/phortune/view/PhortuneOrderTableView.php b/src/applications/phortune/view/PhortuneOrderTableView.php index a2e492c5be..435f5151d0 100644 --- a/src/applications/phortune/view/PhortuneOrderTableView.php +++ b/src/applications/phortune/view/PhortuneOrderTableView.php @@ -101,7 +101,7 @@ final class PhortuneOrderTableView extends AphrontView { 'a', array( 'href' => $cart->getCheckoutURI(), - 'class' => 'small green button', + 'class' => 'small button button-green', ), pht('Pay Now')), ); diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index 8ae9618bbd..b66a3b3094 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -103,7 +103,7 @@ final class PhrictionDiffController extends PhrictionController { 'a', array( 'href' => $uri->alter('l', $l - 1)->alter('r', $r - 1), - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht("\xC2\xAB Previous Change")); } else { @@ -111,7 +111,7 @@ final class PhrictionDiffController extends PhrictionController { 'a', array( 'href' => '#', - 'class' => 'button grey disabled', + 'class' => 'button button-grey disabled', ), pht('Original Change')); } @@ -122,7 +122,7 @@ final class PhrictionDiffController extends PhrictionController { 'a', array( 'href' => $uri->alter('l', $l + 1)->alter('r', $r + 1), - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht("Next Change \xC2\xBB")); } else { @@ -130,7 +130,7 @@ final class PhrictionDiffController extends PhrictionController { 'a', array( 'href' => '#', - 'class' => 'button grey disabled', + 'class' => 'button button-grey disabled', ), pht('Most Recent Change')); } @@ -200,7 +200,7 @@ final class PhrictionDiffController extends PhrictionController { 'a', array( 'href' => '/phriction/edit/'.$document_id.'/', - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht('Edit Current Version')); } @@ -210,7 +210,7 @@ final class PhrictionDiffController extends PhrictionController { 'a', array( 'href' => '/phriction/edit/'.$document_id.'/?revert='.$version, - 'class' => 'button grey', + 'class' => 'button button-grey', ), pht('Revert to Version %s...', $version)); } diff --git a/src/applications/policy/controller/PhabricatorPolicyEditController.php b/src/applications/policy/controller/PhabricatorPolicyEditController.php index 75701cc748..f211aa754d 100644 --- a/src/applications/policy/controller/PhabricatorPolicyEditController.php +++ b/src/applications/policy/controller/PhabricatorPolicyEditController.php @@ -199,7 +199,7 @@ final class PhabricatorPolicyEditController 'a', array( 'href' => '#', - 'class' => 'button green', + 'class' => 'button button-green', 'sigil' => 'create-rule', 'mustcapture' => true, ), diff --git a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php index 31249985e4..d628341dea 100644 --- a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php @@ -63,7 +63,7 @@ final class PhabricatorEmailAddressesSettingsPanel $button_verify = javelin_tag( 'a', array( - 'class' => 'button small grey', + 'class' => 'button small button-grey', 'href' => $uri->alter('verify', $email->getID()), 'sigil' => 'workflow', ), @@ -72,7 +72,7 @@ final class PhabricatorEmailAddressesSettingsPanel $button_make_primary = javelin_tag( 'a', array( - 'class' => 'button small grey', + 'class' => 'button small button-grey', 'href' => $uri->alter('primary', $email->getID()), 'sigil' => 'workflow', ), @@ -81,7 +81,7 @@ final class PhabricatorEmailAddressesSettingsPanel $button_remove = javelin_tag( 'a', array( - 'class' => 'button small grey', + 'class' => 'button small button-grey', 'href' => $uri->alter('delete', $email->getID()), 'sigil' => 'workflow', ), diff --git a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php index 77eb1c55d5..8f1a5c643c 100644 --- a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php @@ -69,7 +69,7 @@ final class PhabricatorMultiFactorSettingsPanel array( 'href' => $this->getPanelURI('?delete='.$factor->getID()), 'sigil' => 'workflow', - 'class' => 'small grey button', + 'class' => 'small button button-grey', ), pht('Remove')), ); diff --git a/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php b/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php index a468ed53d0..e643f2ee08 100644 --- a/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php @@ -58,7 +58,7 @@ final class PhabricatorSessionsSettingsPanel extends PhabricatorSettingsPanel { $button = phutil_tag( 'a', array( - 'class' => 'small grey button disabled', + 'class' => 'small button button-grey disabled', ), pht('Current')); } else { @@ -67,7 +67,7 @@ final class PhabricatorSessionsSettingsPanel extends PhabricatorSettingsPanel { 'a', array( 'href' => '/auth/session/terminate/'.$session->getID().'/', - 'class' => 'small grey button', + 'class' => 'small button button-grey', 'sigil' => 'workflow', ), pht('Terminate')); diff --git a/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php b/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php index d2e0be4a53..c2659d5226 100644 --- a/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php @@ -30,7 +30,7 @@ final class PhabricatorTokensSettingsPanel extends PhabricatorSettingsPanel { 'a', array( 'href' => '/auth/token/revoke/'.$token->getID().'/', - 'class' => 'small grey button', + 'class' => 'small button button-grey', 'sigil' => 'workflow', ), pht('Revoke')); @@ -38,7 +38,7 @@ final class PhabricatorTokensSettingsPanel extends PhabricatorSettingsPanel { $button = javelin_tag( 'a', array( - 'class' => 'small grey button disabled', + 'class' => 'small button button-grey disabled', ), pht('Revoke')); } diff --git a/src/applications/uiexample/examples/PHUIButtonExample.php b/src/applications/uiexample/examples/PHUIButtonExample.php index aed5d5bf08..fe58123f03 100644 --- a/src/applications/uiexample/examples/PHUIButtonExample.php +++ b/src/applications/uiexample/examples/PHUIButtonExample.php @@ -16,63 +16,11 @@ final class PHUIButtonExample extends PhabricatorUIExample { $request = $this->getRequest(); $user = $request->getUser(); - $colors = array('', 'green', 'grey', 'disabled'); - $sizes = array('', 'small'); - $tags = array('a', 'button'); - - // phutil_tag - - $column = array(); - foreach ($tags as $tag) { - foreach ($colors as $color) { - foreach ($sizes as $key => $size) { - $class = implode(' ', array($color, $size)); - - if ($tag == 'a') { - $class .= ' button'; - } - - $column[$key][] = phutil_tag( - $tag, - array( - 'class' => $class, - ), - phutil_utf8_ucwords($size.' '.$color.' '.$tag)); - - $column[$key][] = hsprintf('

'); - } - } - } - - $column3 = array(); - foreach ($colors as $color) { - $caret = phutil_tag('span', array('class' => 'caret'), ''); - $column3[] = phutil_tag( - 'a', - array( - 'class' => $color.' button dropdown', - ), - array( - phutil_utf8_ucwords($color.' Dropdown'), - $caret, - )); - $column3[] = hsprintf('

'); - } - - $layout1 = id(new AphrontMultiColumnView()) - ->addColumn($column[0]) - ->addColumn($column[1]) - ->addColumn($column3) - ->setFluidLayout(true) - ->setGutter(AphrontMultiColumnView::GUTTER_MEDIUM); - // PHUIButtonView - $colors = array( null, PHUIButtonView::GREEN, PHUIButtonView::GREY, - PHUIButtonView::DISABLED, ); $sizes = array(null, PHUIButtonView::SMALL); $column = array(); @@ -223,24 +171,21 @@ final class PHUIButtonExample extends PhabricatorUIExample { // Set it and forget it - $head1 = id(new PHUIHeaderView()) - ->setHeader('phutil_tag'); - $head2 = id(new PHUIHeaderView()) - ->setHeader('PHUIButtonView'); + ->setHeader('PHUIButtonView') + ->addClass('ml'); $head3 = id(new PHUIHeaderView()) - ->setHeader(pht('Icon Buttons')); + ->setHeader(pht('Icon Buttons')) + ->addClass('ml'); $head4 = id(new PHUIHeaderView()) - ->setHeader(pht('Simple Buttons')); + ->setHeader(pht('Simple Buttons')) + ->addClass('ml'); $head5 = id(new PHUIHeaderView()) - ->setHeader(pht('Big Icon Buttons')); - - $wrap1 = id(new PHUIBoxView()) - ->appendChild($layout1) - ->addMargin(PHUI::MARGIN_LARGE); + ->setHeader(pht('Big Icon Buttons')) + ->addClass('ml'); $wrap2 = id(new PHUIBoxView()) ->appendChild($layout2) @@ -259,8 +204,6 @@ final class PHUIButtonExample extends PhabricatorUIExample { ->addMargin(PHUI::MARGIN_LARGE); return array( - $head1, - $wrap1, $head2, $wrap2, $head3, diff --git a/src/applications/uiexample/examples/PHUIColorPalletteExample.php b/src/applications/uiexample/examples/PHUIColorPalletteExample.php index a8910b930d..ea8ac538be 100644 --- a/src/applications/uiexample/examples/PHUIColorPalletteExample.php +++ b/src/applications/uiexample/examples/PHUIColorPalletteExample.php @@ -101,7 +101,7 @@ final class PHUIColorPalletteExample extends PhabricatorUIExample { 'a', array( 'href' => 'http://color.hailpixel.com/#'.implode(',', $url), - 'class' => 'button grey mlb', + 'class' => 'button button-grey mlb', ), pht('Color Palette')); diff --git a/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php b/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php index 5d15d884cc..4f39df6065 100644 --- a/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php +++ b/src/applications/uiexample/examples/PhabricatorNotificationUIExample.php @@ -24,7 +24,7 @@ final class PhabricatorNotificationUIExample extends PhabricatorUIExample { 'a', array( 'sigil' => 'notification-example', - 'class' => 'button green', + 'class' => 'button button-green', ), pht('Show Notification')); diff --git a/src/view/AphrontDialogView.php b/src/view/AphrontDialogView.php index 4616393813..12bec92843 100644 --- a/src/view/AphrontDialogView.php +++ b/src/view/AphrontDialogView.php @@ -248,7 +248,7 @@ final class AphrontDialogView 'a', array( 'href' => $this->cancelURI, - 'class' => 'button grey', + 'class' => 'button button-grey', 'name' => '__cancel__', 'sigil' => 'jx-workflow-button', 'meta' => $meta, diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index 6f343bf00e..0b0e608048 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -324,7 +324,8 @@ final class AphrontFormPolicyControl extends AphrontFormControl { javelin_tag( 'a', array( - 'class' => 'grey button dropdown has-icon has-text policy-control', + 'class' => 'button button-grey dropdown has-icon has-text '. + 'policy-control', 'href' => '#', 'mustcapture' => true, 'sigil' => 'policy-control', diff --git a/src/view/form/control/PHUIFormIconSetControl.php b/src/view/form/control/PHUIFormIconSetControl.php index 459bff08fa..96b1ad99b8 100644 --- a/src/view/form/control/PHUIFormIconSetControl.php +++ b/src/view/form/control/PHUIFormIconSetControl.php @@ -30,7 +30,7 @@ final class PHUIFormIconSetControl $classes = array(); $classes[] = 'button'; - $classes[] = 'grey'; + $classes[] = 'button-grey'; if ($is_disabled) { $classes[] = 'disabled'; diff --git a/src/view/layout/AphrontListFilterView.php b/src/view/layout/AphrontListFilterView.php index 7a6be9c3d2..f764964934 100644 --- a/src/view/layout/AphrontListFilterView.php +++ b/src/view/layout/AphrontListFilterView.php @@ -44,7 +44,7 @@ final class AphrontListFilterView extends AphrontView { $hide_action = javelin_tag( 'a', array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'sigil' => 'reveal-content', 'id' => $hide_action_id, 'href' => $this->showHideHref, @@ -65,7 +65,7 @@ final class AphrontListFilterView extends AphrontView { $show_action = javelin_tag( 'a', array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'sigil' => 'reveal-content', 'style' => 'display: none;', 'href' => '#', diff --git a/src/view/phui/PHUIButtonView.php b/src/view/phui/PHUIButtonView.php index 2e269bd9af..10ce5b5876 100644 --- a/src/view/phui/PHUIButtonView.php +++ b/src/view/phui/PHUIButtonView.php @@ -4,6 +4,7 @@ final class PHUIButtonView extends AphrontTagView { const GREEN = 'green'; const GREY = 'grey'; + const BLUE = 'blue'; const DISABLED = 'disabled'; const SMALL = 'small'; @@ -159,7 +160,7 @@ final class PHUIButtonView extends AphrontTagView { $classes[] = 'button'; if ($this->color) { - $classes[] = $this->color; + $classes[] = 'button-'.$this->color; } if ($this->size) { @@ -188,10 +189,10 @@ final class PHUIButtonView extends AphrontTagView { switch ($this->getButtonType()) { case self::BUTTONTYPE_DEFAULT: - // Nothing special for default buttons. + $classes[] = 'phui-button-default'; break; case self::BUTTONTYPE_SIMPLE: - $classes[] = 'simple'; + $classes[] = 'phui-button-simple'; break; } diff --git a/src/view/phui/PHUIHovercardView.php b/src/view/phui/PHUIHovercardView.php index b99fc8153e..f6cfc45a35 100644 --- a/src/view/phui/PHUIHovercardView.php +++ b/src/view/phui/PHUIHovercardView.php @@ -173,7 +173,7 @@ final class PHUIHovercardView extends AphrontTagView { foreach ($this->actions as $action) { $options = array( - 'class' => 'button grey', + 'class' => 'button button-grey', 'href' => $action['uri'], ); diff --git a/webroot/rsrc/css/phui/button/phui-button-simple.css b/webroot/rsrc/css/phui/button/phui-button-simple.css index fa0a8d11b2..4bc6daee23 100644 --- a/webroot/rsrc/css/phui/button/phui-button-simple.css +++ b/webroot/rsrc/css/phui/button/phui-button-simple.css @@ -6,55 +6,55 @@ /* - Basic -------------------------------------------------------------------*/ -button.simple, -input[type="submit"].simple, -a.simple, -a.simple:visited { +button.phui-button-simple, +input[type="submit"].phui-button-simple, +a.phui-button-simple, +a.phui-button-simple:visited { background: #fff; color: {$bluetext}; border: 1px solid {$lightblueborder}; } -button.simple .phui-icon-view, -input[type="submit"].simple .phui-icon-view, -a.simple .phui-icon-view, -a.simple:visited .phui-icon-view { +button.phui-button-simple .phui-icon-view, +input[type="submit"].phui-button-simple .phui-icon-view, +a.phui-button-simple .phui-icon-view, +a.phui-button-simple:visited .phui-icon-view { color: {$lightbluetext}; } -a.button.simple:hover, -button.simple:hover { +a.button.phui-button-simple:hover, +button.phui-button-simple:hover { border-color: {$blueborder}; background-image: none; background-color: #fff; transition: 0s; } -a.simple.current { +a.phui-button-simple.current { background: {$lightblue}; } /* - Red --------------------------------------------------------------------*/ -button.simple.red, -input[type="submit"].simple.red, -a.simple.red, -a.simple.red:visited { +button.phui-button-simple.button-red, +input[type="submit"].phui-button-simple.button-red, +a.phui-button-simple.button-red, +a.phui-button-simple.button-red:visited { background: {$sh-redbackground}; color: {$redtext}; border: 1px solid {$sh-redborder}; } -button.simple.red .phui-icon-view, -input[type="submit"].simple.red .phui-icon-view, -a.simple.red .phui-icon-view, -a.simple.red:visited .phui-icon-view { +button.phui-button-simple.button-red .phui-icon-view, +input[type="submit"].phui-button-simple.button-red .phui-icon-view, +a.phui-button-simple.button-red .phui-icon-view, +a.phui-button-simple.button-red:visited .phui-icon-view { color: {$redtext}; } -a.button.simple.red:hover, -button.simple.red:hover { +a.button.phui-button-simple.button-red:hover, +button.phui-button-simple.button-red:hover { border-color: {$sh-redtext}; background-image: none; background-color: {$sh-redbackground}; @@ -63,24 +63,24 @@ button.simple.red:hover { /* - Green ------------------------------------------------------------------*/ -button.simple.green, -input[type="submit"].simple.green, -a.simple.green, -a.simple.green:visited { +button.phui-button-simple.button-green, +input[type="submit"].phui-button-simple.button-green, +a.phui-button-simple.button-green, +a.phui-button-simple.button-green:visited { background: {$sh-greenbackground}; color: {$greentext}; border: 1px solid {$sh-greenborder}; } -button.simple.green .phui-icon-view, -input[type="submit"].simple.green .phui-icon-view, -a.simple.green .phui-icon-view, -a.simple.green:visited .phui-icon-view { +button.phui-button-simple.button-green .phui-icon-view, +input[type="submit"].phui-button-simple.button-green .phui-icon-view, +a.phui-button-simple.button-green .phui-icon-view, +a.phui-button-simple.button-green:visited .phui-icon-view { color: {$greentext}; } -a.button.simple.green:hover, -button.simple.green:hover { +a.button.phui-button-simple.button-green:hover, +button.phui-button-simple.button-green:hover { border-color: {$sh-greentext}; background-image: none; background-color: {$sh-greenbackground}; @@ -89,24 +89,24 @@ button.simple.green:hover { /* - Yellow -----------------------------------------------------------------*/ -button.simple.yellow, -input[type="submit"].simple.yellow, -a.simple.yellow, -a.simple.yellow:visited { +button.phui-button-simple.button-yellow, +input[type="submit"].phui-button-simple.button-yellow, +a.phui-button-simple.button-yellow, +a.phui-button-simple.button-yellow:visited { background-color: {$sh-yellowbackground}; color: {$sh-yellowtext}; border: 1px solid {$sh-yellowborder}; } -button.simple.yellow .phui-icon-view, -input[type="submit"].simple.yellow .phui-icon-view, -a.simple.yellow .phui-icon-view, -a.simple.yellow:visited .phui-icon-view { +button.phui-button-simple.button-yellow .phui-icon-view, +input[type="submit"].phui-button-simple.button-yellow .phui-icon-view, +a.phui-button-simple.button-yellow .phui-icon-view, +a.phui-button-simple.button-yellow:visited .phui-icon-view { color: {$sh-yellowicon}; } -a.button.simple.yellow:hover, -button.simple.yellow:hover { +a.button.phui-button-simple.button-yellow:hover, +button.phui-button-simple.button-yellow:hover { border-color: {$sh-yellowtext}; background-image: none; background-color: {$sh-yellowbackground}; @@ -116,16 +116,16 @@ button.simple.yellow:hover { /* - Misc -------------------------------------------------------------------*/ -a.button.simple .phui-icon-view { +a.button.phui-button-simple .phui-icon-view { border: none; } -a.button.simple.phuix-dropdown-open { +a.button.phui-button-simple.phuix-dropdown-open { background-color: #fff; color: {$blue}; box-shadow: none; } -a.button.simple.phuix-dropdown-open:hover .phui-icon-view { +a.button.phui-button-simple.phuix-dropdown-open:hover .phui-icon-view { color: {$blue}; } diff --git a/webroot/rsrc/css/phui/button/phui-button.css b/webroot/rsrc/css/phui/button/phui-button.css index d8183febd2..69718808c3 100644 --- a/webroot/rsrc/css/phui/button/phui-button.css +++ b/webroot/rsrc/css/phui/button/phui-button.css @@ -49,13 +49,13 @@ input[type="submit"] { button .phui-icon-view, a.button .phui-icon-view, -button.green .phui-icon-view, -a.button.green .phui-icon-view { +button.button-green .phui-icon-view, +a.button.button-green .phui-icon-view { color: white; } -button.grey .phui-icon-view, -a.button.grey .phui-icon-view { +button.button-grey .phui-icon-view, +a.button.button-grey .phui-icon-view { color: {$darkbluetext}; } @@ -68,18 +68,18 @@ a.icon:visited { text-indent: 29px; } -button.green, -a.green.button, -a.green.button:visited { +button.button-green, +a.button-green.button, +a.button-green.button:visited { background-color: {$green}; border-color: {$green}; background-image: linear-gradient(to bottom, #23BB5B, #139543); } -button.grey, -input[type="submit"].grey, -a.grey, -a.grey:visited { +button.button-grey, +input[type="submit"].button-grey, +a.button-grey, +a.button-grey:visited { background-color: #F7F7F9; background-image: linear-gradient(to bottom, #ffffff, #f1f0f1); border: 1px solid rgba({$alphablue}, 0.3); @@ -108,15 +108,15 @@ button:hover { transition: 0.1s; } -a.button.grey:hover, -button.grey:hover { +a.button.button-grey:hover, +button.button-grey:hover { background-image: linear-gradient(to bottom, #ffffff, #eeebec); border-color: rgba({$alphablue}, 0.4); transition: 0.1s; } -a.button.green:hover, -button.green:hover { +a.button.button-green:hover, +button.button-green:hover { border-color: #127336; background-color: #0DAD48; background-image: linear-gradient(to bottom, #23BB5B, #178841); @@ -244,7 +244,7 @@ a.policy-control .phui-button-text { margin-top: 6px; } -.grey.dropdown .caret { +.button-grey.dropdown .caret { border-top-color: #000; } diff --git a/webroot/rsrc/js/phuix/PHUIXButtonView.js b/webroot/rsrc/js/phuix/PHUIXButtonView.js index e060cf0e9a..e87db88fe4 100644 --- a/webroot/rsrc/js/phuix/PHUIXButtonView.js +++ b/webroot/rsrc/js/phuix/PHUIXButtonView.js @@ -35,10 +35,10 @@ JX.install('PHUIXButtonView', { var node = this.getNode(); if (this._color) { - JX.DOM.alterClass(node, this._color, false); + JX.DOM.alterClass(node, 'button-' + this._color, false); } this._color = color; - JX.DOM.alterClass(node, this._color, true); + JX.DOM.alterClass(node, 'button-' + this._color, true); return this; }, @@ -50,7 +50,7 @@ JX.install('PHUIXButtonView', { var node = this.getNode(); var is_simple = (this._buttonType == self.BUTTONTYPE_SIMPLE); - JX.DOM.alterClass(node, 'simple', is_simple); + JX.DOM.alterClass(node, 'phui-button-simple', is_simple); return this; }, From cb85be81d8193fbbbb41c4cf7cc89d1c0501c2b0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 6 Jun 2017 14:04:09 +0000 Subject: [PATCH 08/25] Add checkbox images for remarkup Summary: Minor, adds some weightier checkbox styles for use in Remarkup. Test Plan: Test a task, Phriction, various remarkup list styles. {F4990161} Reviewers: epriestley Reviewed By: epriestley Subscribers: cspeckmim, Korvin Differential Revision: https://secure.phabricator.com/D18080 --- resources/celerity/map.php | 8 +++-- webroot/rsrc/css/core/remarkup.css | 29 +++++++++++++++--- .../rsrc/image/controls/checkbox-checked.png | Bin 0 -> 514 bytes .../image/controls/checkbox-unchecked.png | Bin 0 -> 328 bytes 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 webroot/rsrc/image/controls/checkbox-checked.png create mode 100644 webroot/rsrc/image/controls/checkbox-unchecked.png diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 0745c41d4d..6dfa36b3bd 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => '1a935531', + 'core.pkg.css' => '176b5104', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', @@ -115,7 +115,7 @@ return array( 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 'rsrc/css/application/uiexample/example.css' => '528b19de', 'rsrc/css/core/core.css' => '23beb330', - 'rsrc/css/core/remarkup.css' => 'd1a5e11e', + 'rsrc/css/core/remarkup.css' => '509fb36e', 'rsrc/css/core/syntax.css' => 'cae95e89', 'rsrc/css/core/z-index.css' => '9d8f7c4b', 'rsrc/css/diviner/diviner-shared.css' => '896f1d43', @@ -298,6 +298,8 @@ return array( 'rsrc/image/checker_dark.png' => 'd8e65881', 'rsrc/image/checker_light.png' => 'a0155918', 'rsrc/image/checker_lighter.png' => 'd5da91b6', + 'rsrc/image/controls/checkbox-checked.png' => 'ad6441ea', + 'rsrc/image/controls/checkbox-unchecked.png' => '8eb1f0ae', 'rsrc/image/d5d8e1.png' => '0c2a1497', 'rsrc/image/darkload.gif' => '1ffd3ec6', 'rsrc/image/divot.png' => '94dded62', @@ -793,7 +795,7 @@ return array( 'phabricator-object-selector-css' => '85ee8ce6', 'phabricator-phtize' => 'd254d646', 'phabricator-prefab' => 'c5af80a2', - 'phabricator-remarkup-css' => 'd1a5e11e', + 'phabricator-remarkup-css' => '509fb36e', 'phabricator-search-results-css' => '8f8e08ed', 'phabricator-shaped-request' => '7cbe244b', 'phabricator-slowvote-css' => 'a94b7230', diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css index 0c07c145a8..98529b9434 100644 --- a/webroot/rsrc/css/core/remarkup.css +++ b/webroot/rsrc/css/core/remarkup.css @@ -122,17 +122,38 @@ .phabricator-remarkup .remarkup-list-with-checkmarks .remarkup-checked-item, .phabricator-remarkup .remarkup-list-with-checkmarks .remarkup-unchecked-item { list-style: none; - margin-left: -18px; + margin-left: -20px; + position: relative; + padding-left: 22px; } .phabricator-remarkup .remarkup-list-with-checkmarks input { - margin-right: 4px; - opacity: 1; + display: none; +} + +.phabricator-remarkup .remarkup-list-with-checkmarks + .remarkup-list-item::before { + height: 16px; + width: 16px; + background-size: 16px; + display: inline-block; + content: ''; + position: absolute; + top: 3px; + left: 0; +} + +.remarkup-list-with-checkmarks .remarkup-checked-item::before { + background-image: url(rsrc/image/controls/checkbox-checked.png); +} + +.remarkup-list-with-checkmarks .remarkup-unchecked-item::before { + background-image: url(rsrc/image/controls/checkbox-unchecked.png); } .phabricator-remarkup .remarkup-list-with-checkmarks .remarkup-checked-item { - text-decoration: line-through; color: {$lightgreytext}; + text-decoration: line-through; } .phabricator-remarkup ul.remarkup-list ol.remarkup-list, diff --git a/webroot/rsrc/image/controls/checkbox-checked.png b/webroot/rsrc/image/controls/checkbox-checked.png new file mode 100644 index 0000000000000000000000000000000000000000..9e93e82a373045bb5b4f726f4493006522674eba GIT binary patch literal 514 zcmV+d0{#7oP)n3pyU9-lD!V}05*6N z5^pWKNTk}tRuumeE&Z)Vj7IOxd?PUu{eB{5Hd0zIaawR!_&5QCuRtN{+zraxiT-U8mKq*BShG?x%FQAmd z7=zlMq6zZL(GHK5!`c8YW4CwU#tZU-e}*-vwS; zAd`rqXiXx6$8o$99NzgQjN=#~M7{@x!{J`=cMAZFMx%}GlL;IOoaNs>5&bm+j}`J4 zlII`As`66;*T6#s@CV>p0{1`%_yIhf0Q~gA>Hzn@0i*G+3o|a>YXATM07*qoM6N<$ Eg1uqZivR!s literal 0 HcmV?d00001 diff --git a/webroot/rsrc/image/controls/checkbox-unchecked.png b/webroot/rsrc/image/controls/checkbox-unchecked.png new file mode 100644 index 0000000000000000000000000000000000000000..e60350d77099dd164b96d039643a9eb4dcb66f44 GIT binary patch literal 328 zcmV-O0k{5%P)4184UvXq58x3n5h^`{dI7cASh(5{?qX%MS{g5)cd!!;9D$lFfdVTFmt?b{ zAd$spzGRwj{>=MMGSf)YRFMPR;}S<`+ieyY;{}iShGwyOh*xxX3@xXP(_-D=0@KLv z&Fh9&)5RNF5$^U3U*{ONOp;vC|fI}R|k|e3t zy$G%9U|rd8b}Oolwq=4q5C{T6AP5A3AP@wCK!jDf$n(55*nB>(R*MK9ZW{b^ zX0w?r%c}Lbk)~-M4?8DrmwtpNeEtLc3(xB}aE{R);Uk=3wf+TDoM3==ENg%+i?as> aYYIQml{{z<<^5>@0000 Date: Tue, 6 Jun 2017 09:33:55 -0700 Subject: [PATCH 09/25] Rescope disabled icon colors in phui-oi Summary: This is a little too agressive, it's meant to only color direct icons, not icons inside tags if the object item is disabled. Test Plan: Check closed tasks and see icon colors inside tags, check a disabled project, see disabled color. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18084 --- resources/celerity/map.php | 6 +++--- webroot/rsrc/css/phui/object-item/phui-oi-list-view.css | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 6dfa36b3bd..4482214fbe 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => '176b5104', + 'core.pkg.css' => 'd88bfb44', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', @@ -135,7 +135,7 @@ return array( 'rsrc/css/phui/object-item/phui-oi-color.css' => 'cd2b9b77', 'rsrc/css/phui/object-item/phui-oi-drag-ui.css' => '08f4ccc3', 'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6', - 'rsrc/css/phui/object-item/phui-oi-list-view.css' => '43752968', + 'rsrc/css/phui/object-item/phui-oi-list-view.css' => 'bf094950', 'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea', 'rsrc/css/phui/phui-action-list.css' => 'c01858f4', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', @@ -860,7 +860,7 @@ return array( 'phui-oi-color-css' => 'cd2b9b77', 'phui-oi-drag-ui-css' => '08f4ccc3', 'phui-oi-flush-ui-css' => '9d9685d6', - 'phui-oi-list-view-css' => '43752968', + 'phui-oi-list-view-css' => 'bf094950', 'phui-oi-simple-ui-css' => 'a8beebea', 'phui-pager-css' => '77d8a794', 'phui-pinboard-view-css' => '2495140e', diff --git a/webroot/rsrc/css/phui/object-item/phui-oi-list-view.css b/webroot/rsrc/css/phui/object-item/phui-oi-list-view.css index f6d1589a9a..5ddedfa24a 100644 --- a/webroot/rsrc/css/phui/object-item/phui-oi-list-view.css +++ b/webroot/rsrc/css/phui/object-item/phui-oi-list-view.css @@ -426,7 +426,7 @@ ul.phui-oi-icons { } .phui-oi.phui-oi-disabled .phui-oi-attribute, -.phui-oi.phui-oi-disabled .phui-oi-attribute .phui-icon-view { +.phui-oi.phui-oi-disabled .phui-oi-attribute > .phui-icon-view { color: {$lightgreytext}; } From ece651255c9e8974c97f9d36082e19f6f0e0af00 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 6 Jun 2017 10:20:45 -0700 Subject: [PATCH 10/25] Optimize mobile layout of DiffusionHistoryView Summary: Little nits and spacing changes to viewing diffusion commit history on phones. Test Plan: Review in Chrome, iOS Simulator. {F4990749} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18085 --- resources/celerity/map.php | 4 +- .../controller/DiffusionHistoryController.php | 3 +- .../diffusion/diffusion-history.css | 53 +++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 4482214fbe..35913087f9 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -71,7 +71,7 @@ return array( 'rsrc/css/application/differential/revision-history.css' => '0e8eb855', 'rsrc/css/application/differential/revision-list.css' => 'f3c47d33', 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', - 'rsrc/css/application/diffusion/diffusion-history.css' => 'cc283766', + 'rsrc/css/application/diffusion/diffusion-history.css' => '6870e8c1', 'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba', 'rsrc/css/application/diffusion/diffusion-readme.css' => '18bd3910', 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', @@ -569,7 +569,7 @@ return array( 'differential-revision-history-css' => '0e8eb855', 'differential-revision-list-css' => 'f3c47d33', 'differential-table-of-contents-css' => 'ae4b7a55', - 'diffusion-history-css' => 'cc283766', + 'diffusion-history-css' => '6870e8c1', 'diffusion-icons-css' => 'a6a1e2ba', 'diffusion-readme-css' => '18bd3910', 'diffusion-source-css' => '750add59', diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php index 8ee6c848a7..b8a1877ddf 100644 --- a/src/applications/diffusion/controller/DiffusionHistoryController.php +++ b/src/applications/diffusion/controller/DiffusionHistoryController.php @@ -69,7 +69,8 @@ final class DiffusionHistoryController extends DiffusionController { return $this->newPage() ->setTitle($title) ->setCrumbs($crumbs) - ->appendChild($view); + ->appendChild($view) + ->addClass('diffusion-history-view'); } private function buildHeader(DiffusionRequest $drequest) { diff --git a/webroot/rsrc/css/application/diffusion/diffusion-history.css b/webroot/rsrc/css/application/diffusion/diffusion-history.css index b90977373f..2d0aea3b10 100644 --- a/webroot/rsrc/css/application/diffusion/diffusion-history.css +++ b/webroot/rsrc/css/application/diffusion/diffusion-history.css @@ -2,6 +2,8 @@ * @provides diffusion-history-css */ +/* - List Styles ------------------------------------------------------------*/ + .diffusion-history-list .phui-oi-link { color: #000; font-size: {$biggerfontsize}; @@ -27,3 +29,54 @@ .diffusion-history-list .diffusion-differential-tag { margin-left: 4px; } + + +/* - Phone Style ------------------------------------------------------------*/ + +.device-phone.diffusion-history-view .phui-two-column-view + .phui-two-column-footer .phui-object-box { + border-color: {$thinblueborder}; +} + +.device-phone.diffusion-history-view .phui-two-column-view + .phui-two-column-footer .phui-header-view { + text-align: center; +} + +.device-phone.diffusion-history-view .phui-two-column-content { + padding: 0; + margin: 0 -4px; +} + +.device-phone.diffusion-history-view .phui-oi-attribute-spacer { + display: none; +} + +.device-phone.diffusion-history-view .phui-oi-attribute { + display: block; + margin: 0 0 4px 0; +} + +.device-phone.diffusion-history-view .phui-oi-image { + height: 36px; + width: 36px; + margin-top: 10px; +} + +.device-phone.diffusion-history-view .phui-oi-with-image .phui-oi-content-box { + margin-left: 44px; +} + +.device-phone.diffusion-history-view .phui-oi-col2.phui-oi-side-column { + padding-bottom: 10px; +} + +.device-phone.diffusion-history-view .diffusion-history-list .button.has-icon + .phui-button-text { + margin: 0; +} + +.device-phone.diffusion-history-view .diffusion-history-list .button.has-icon + .phui-icon-view { + display: none; +} From b7f147ea0f8c6bdcc13c9ee21554cb644e2a1dde Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 6 Jun 2017 11:00:47 -0700 Subject: [PATCH 11/25] Clean up user profile commit list view Summary: Porting over a fix that we could miss the tail end of commits. Also use the new tag borderless option. Test Plan: Review various commit pages in profile. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18086 --- .../diffusion/view/DiffusionCommitListView.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/applications/diffusion/view/DiffusionCommitListView.php b/src/applications/diffusion/view/DiffusionCommitListView.php index f1d1ebc8e4..4d4bcc1020 100644 --- a/src/applications/diffusion/view/DiffusionCommitListView.php +++ b/src/applications/diffusion/view/DiffusionCommitListView.php @@ -94,18 +94,10 @@ final class DiffusionCommitListView extends AphrontView { $handles = $viewer->loadHandles($phids); $cur_date = 0; - $list = null; - $header = null; $view = array(); foreach ($this->commits as $commit) { - $new_date = date('Ymd', $commit->getEpoch()); - if ($cur_date != $new_date) { - if ($list) { - $view[] = id(new PHUIObjectBoxView()) - ->setHeader($header) - ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) - ->setObjectList($list); - } + $new_date = phabricator_date($commit->getEpoch(), $viewer); + if ($cur_date !== $new_date) { $date = ucfirst( phabricator_relative_date($commit->getEpoch(), $viewer)); $header = id(new PHUIHeaderView()) @@ -113,6 +105,11 @@ final class DiffusionCommitListView extends AphrontView { $list = id(new PHUIObjectItemListView()) ->setFlush(true) ->addClass('diffusion-history-list'); + + $view[] = id(new PHUIObjectBoxView()) + ->setHeader($header) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) + ->setObjectList($list); } $commit_phid = $commit->getPHID(); @@ -146,6 +143,7 @@ final class DiffusionCommitListView extends AphrontView { ->setName($commit_name) ->setType(PHUITagView::TYPE_SHADE) ->setColor(PHUITagView::COLOR_INDIGO) + ->setBorder(PHUITagView::BORDER_NONE) ->setSlimShady(true); $item = id(new PHUIObjectItemView()) From d89c24a460bd1e8733999a7c6332fbcd37d40b4d Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 6 Jun 2017 15:29:57 -0700 Subject: [PATCH 12/25] Shrink padding on readmes on phones in Diffusion Summary: Padding is ridiculously large on mobile devices, shrink it. Test Plan: Review in simulator. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18087 --- resources/celerity/map.php | 4 ++-- webroot/rsrc/css/application/diffusion/diffusion-readme.css | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 35913087f9..1b00aee0ad 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -73,7 +73,7 @@ return array( 'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55', 'rsrc/css/application/diffusion/diffusion-history.css' => '6870e8c1', 'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba', - 'rsrc/css/application/diffusion/diffusion-readme.css' => '18bd3910', + 'rsrc/css/application/diffusion/diffusion-readme.css' => '419dd5b6', 'rsrc/css/application/diffusion/diffusion-source.css' => '750add59', 'rsrc/css/application/feed/feed.css' => 'ecd4ec57', 'rsrc/css/application/files/global-drag-and-drop.css' => '5c1b47c2', @@ -571,7 +571,7 @@ return array( 'differential-table-of-contents-css' => 'ae4b7a55', 'diffusion-history-css' => '6870e8c1', 'diffusion-icons-css' => 'a6a1e2ba', - 'diffusion-readme-css' => '18bd3910', + 'diffusion-readme-css' => '419dd5b6', 'diffusion-source-css' => '750add59', 'diviner-shared-css' => '896f1d43', 'font-fontawesome' => 'e838e088', diff --git a/webroot/rsrc/css/application/diffusion/diffusion-readme.css b/webroot/rsrc/css/application/diffusion/diffusion-readme.css index b8e20af5cb..0dd5cdd858 100644 --- a/webroot/rsrc/css/application/diffusion/diffusion-readme.css +++ b/webroot/rsrc/css/application/diffusion/diffusion-readme.css @@ -14,6 +14,10 @@ padding: 24px 32px; } +.device .diffusion-readme-view .phui-document-container { + padding: 8px 16px; +} + .diffusion-readme-view .phabricator-remarkup-toc { display: none; } From fd0cac0d459cc1219d6fce3c230ba1ed853f1e2c Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 6 Jun 2017 15:47:47 -0700 Subject: [PATCH 13/25] Use normalsized font sizes in AphrontTable Summary: Updates to use the standard 13px size we use everywhere else, cleans up a few mobile/display bugs, adds a hover state for `tr`. Test Plan: Review Diffusion, Daemons, Almanac, People Logs, anything else? {F4991070} {F4991071} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18088 --- resources/celerity/map.php | 22 ++++++++-------- webroot/rsrc/css/aphront/table-view.css | 26 +++++++------------ .../diffusion/behavior-commit-graph.js | 2 +- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 1b00aee0ad..262b33fe9c 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,13 +9,13 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => 'd88bfb44', + 'core.pkg.css' => 'f1bbed88', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', 'differential.pkg.js' => '889ab0ab', 'diffusion.pkg.css' => 'b93d9b8c', - 'diffusion.pkg.js' => '84c8f8fd', + 'diffusion.pkg.js' => '6134c5a1', 'favicon.ico' => '30672e08', 'maniphest.pkg.css' => '4845691a', 'maniphest.pkg.js' => '5ab2753f', @@ -32,7 +32,7 @@ return array( 'rsrc/css/aphront/notification.css' => '3f6c89c9', 'rsrc/css/aphront/panel-view.css' => '8427b78d', 'rsrc/css/aphront/phabricator-nav-view.css' => 'faf6a6fc', - 'rsrc/css/aphront/table-view.css' => '34cf86b4', + 'rsrc/css/aphront/table-view.css' => 'a3aa6910', 'rsrc/css/aphront/tokenizer.css' => '15d5ff71', 'rsrc/css/aphront/tooltip.css' => '173b9431', 'rsrc/css/aphront/typeahead-browse.css' => '4f82e510', @@ -406,7 +406,7 @@ return array( 'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => 'c93358e3', 'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'd835b03a', 'rsrc/js/application/diffusion/behavior-commit-branches.js' => 'bdaf4d04', - 'rsrc/js/application/diffusion/behavior-commit-graph.js' => '49ae8328', + 'rsrc/js/application/diffusion/behavior-commit-graph.js' => '75b83cbb', 'rsrc/js/application/diffusion/behavior-diffusion-browse-file.js' => '054a0f0b', 'rsrc/js/application/diffusion/behavior-jump-to.js' => '73d09eef', 'rsrc/js/application/diffusion/behavior-load-blame.js' => '42126667', @@ -542,7 +542,7 @@ return array( 'aphront-list-filter-view-css' => '5d6f0526', 'aphront-multi-column-view-css' => '84cc6640', 'aphront-panel-view-css' => '8427b78d', - 'aphront-table-view-css' => '34cf86b4', + 'aphront-table-view-css' => 'a3aa6910', 'aphront-tokenizer-control-css' => '15d5ff71', 'aphront-tooltip-css' => '173b9431', 'aphront-typeahead-control-css' => '8a84cc7d', @@ -620,7 +620,7 @@ return array( 'javelin-behavior-differential-user-select' => 'a8d8459d', 'javelin-behavior-diffusion-browse-file' => '054a0f0b', 'javelin-behavior-diffusion-commit-branches' => 'bdaf4d04', - 'javelin-behavior-diffusion-commit-graph' => '49ae8328', + 'javelin-behavior-diffusion-commit-graph' => '75b83cbb', 'javelin-behavior-diffusion-jump-to' => '73d09eef', 'javelin-behavior-diffusion-locate-file' => '6d3e1947', 'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc', @@ -1224,11 +1224,6 @@ return array( 'javelin-vector', 'javelin-stratcom', ), - '49ae8328' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - ), '4b3c4443' => array( 'phuix-icon-view', ), @@ -1445,6 +1440,11 @@ return array( 'javelin-install', 'javelin-workboard-card', ), + '75b83cbb' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + ), '76b9fc3e' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/webroot/rsrc/css/aphront/table-view.css b/webroot/rsrc/css/aphront/table-view.css index 2de08095dd..2238f5a041 100644 --- a/webroot/rsrc/css/aphront/table-view.css +++ b/webroot/rsrc/css/aphront/table-view.css @@ -24,7 +24,6 @@ .aphront-table-notice { padding: 12px 16px; - font-size: {$normalfontsize}; color: {$darkbluetext}; border-bottom: 1px solid {$thinblueborder}; } @@ -37,9 +36,16 @@ background: {$lightgreybackground}; } +.device-desktop .aphront-table-view tr:hover { + background: {$bluebackground}; +} + +.device-desktop .aphront-table-view tr.no-data:hover { + background: inherit; +} + .aphront-table-view th { font-weight: bold; - font-size: {$normalfontsize}; white-space: nowrap; color: {$bluetext}; text-shadow: 0 1px 0 white; @@ -78,6 +84,7 @@ th.aphront-table-view-sortable-selected { .aphront-table-view td { white-space: nowrap; vertical-align: middle; + color: {$darkbluetext}; } .aphront-table-down-sort { @@ -115,12 +122,10 @@ th.aphront-table-view-sortable-selected { .aphront-table-view th { padding: 8px 10px; - font-size: {$normalfontsize}; } .aphront-table-view td { padding: 8px 10px; - font-size: {$smallerfontsize}; } .device-tablet .aphront-table-view td, @@ -128,22 +133,12 @@ th.aphront-table-view-sortable-selected { padding: 6px; } -.device-tablet .aphront-table-view td + td, -.device-phone .aphront-table-view td + td { - padding-left: 0px; -} - .device-tablet .aphront-table-view th, .device-phone .aphront-table-view th { padding: 6px; overflow: hidden; } -.device-tablet .aphront-table-view th + th, -.device-phone .aphront-table-view th + th { - padding-left: 0px; -} - .aphront-table-view td.sorted-column { background: {$lightbluebackground}; } @@ -196,7 +191,7 @@ th.aphront-table-view-sortable-selected { } .aphront-table-view td.wrap { - white-space: normal; + white-space: normal; } .aphront-table-view td.prewrap { @@ -282,7 +277,6 @@ span.single-display-line-content { text-align: center; color: {$lightgreytext}; font-style: italic; - font-size: {$normalfontsize}; } .aphront-table-view td.thumb img { diff --git a/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js b/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js index 317a132240..309f972324 100644 --- a/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js +++ b/webroot/rsrc/js/application/diffusion/behavior-commit-graph.js @@ -53,7 +53,7 @@ JX.behavior('diffusion-commit-graph', function(config) { return (col * cell) + (cell / 2); }; - var h = 32; + var h = 34; var w = cell * config.count; var canvas = JX.$N('canvas', {width: w, height: h}); From 0700bb2aca6785af6fe7ee21fd971ead9b6c9073 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 6 Jun 2017 16:53:14 -0700 Subject: [PATCH 14/25] Add a selected color state to PHUIPagerView Summary: This probably got nuked at some point, but the class is there so let's use it. Test Plan: Browse a directory with 800 files. See pager change color. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18089 --- resources/celerity/map.php | 6 +++--- webroot/rsrc/css/phui/phui-pager.css | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 262b33fe9c..ea03c78d2d 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => 'f1bbed88', + 'core.pkg.css' => '7e4901ea', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', @@ -168,7 +168,7 @@ return array( 'rsrc/css/phui/phui-lightbox.css' => '0a035e40', 'rsrc/css/phui/phui-list.css' => '12eb8ce6', 'rsrc/css/phui/phui-object-box.css' => '9cff003c', - 'rsrc/css/phui/phui-pager.css' => '77d8a794', + 'rsrc/css/phui/phui-pager.css' => 'edcbc226', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 'rsrc/css/phui/phui-property-list-view.css' => '2dc7993f', 'rsrc/css/phui/phui-remarkup-preview.css' => '54a34863', @@ -862,7 +862,7 @@ return array( 'phui-oi-flush-ui-css' => '9d9685d6', 'phui-oi-list-view-css' => 'bf094950', 'phui-oi-simple-ui-css' => 'a8beebea', - 'phui-pager-css' => '77d8a794', + 'phui-pager-css' => 'edcbc226', 'phui-pinboard-view-css' => '2495140e', 'phui-property-list-view-css' => '2dc7993f', 'phui-remarkup-preview-css' => '54a34863', diff --git a/webroot/rsrc/css/phui/phui-pager.css b/webroot/rsrc/css/phui/phui-pager.css index 590b8514ce..462ef2ad22 100644 --- a/webroot/rsrc/css/phui/phui-pager.css +++ b/webroot/rsrc/css/phui/phui-pager.css @@ -6,3 +6,9 @@ clear: both; text-align: center; } + +.phui-pager-view a.button.current, +.phui-pager-view a.button.current:hover { + border-color: {$sh-orangetext}; + color: {$sh-orangetext}; +} From 7c955d795e1ba4d0b88b865f9af517a37c9b6db4 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 7 Jun 2017 13:27:26 +0000 Subject: [PATCH 15/25] Remove badge support from PHUIHeaderView Summary: These are now unused. Test Plan: grep, remove uiexamples Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18090 --- resources/celerity/map.php | 6 +++--- .../uiexample/examples/PHUIBoxExample.php | 17 ++++------------- .../examples/PHUIHovercardUIExample.php | 10 ---------- src/view/phui/PHUIHeaderView.php | 16 +--------------- webroot/rsrc/css/phui/phui-header-view.css | 8 -------- 5 files changed, 8 insertions(+), 49 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index ea03c78d2d..1e4721cbd5 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.js' => 'b5b51108', - 'core.pkg.css' => '7e4901ea', + 'core.pkg.css' => 'ab24402f', 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', @@ -157,7 +157,7 @@ return array( 'rsrc/css/phui/phui-form-view.css' => '6175808d', 'rsrc/css/phui/phui-form.css' => 'a5570f70', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', - 'rsrc/css/phui/phui-header-view.css' => '73edce66', + 'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2', 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 'rsrc/css/phui/phui-icon.css' => '4c46b6ba', @@ -843,7 +843,7 @@ return array( 'phui-form-css' => 'a5570f70', 'phui-form-view-css' => '6175808d', 'phui-head-thing-view-css' => 'fd311e5f', - 'phui-header-view-css' => '73edce66', + 'phui-header-view-css' => 'e7de7ee2', 'phui-hovercard' => '1bd28176', 'phui-hovercard-view-css' => 'f0592bcf', 'phui-icon-set-selector-css' => '87db8fee', diff --git a/src/applications/uiexample/examples/PHUIBoxExample.php b/src/applications/uiexample/examples/PHUIBoxExample.php index 4a551de707..f77ac3afd4 100644 --- a/src/applications/uiexample/examples/PHUIBoxExample.php +++ b/src/applications/uiexample/examples/PHUIBoxExample.php @@ -68,21 +68,10 @@ final class PHUIBoxExample extends PhabricatorUIExample { ->setText(pht('Such Wow')) ->addClass(PHUI::MARGIN_SMALL_RIGHT); - $badge1 = id(new PHUIBadgeMiniView()) - ->setIcon('fa-bug') - ->setHeader(pht('Bugmeister')); - - $badge2 = id(new PHUIBadgeMiniView()) - ->setIcon('fa-heart') - ->setHeader(pht('Funder')) - ->setQuality(PhabricatorBadgesQuality::UNCOMMON); - $header = id(new PHUIHeaderView()) ->setHeader(pht('Fancy Box')) ->addActionLink($button) - ->setSubheader(pht('Much Features')) - ->addBadge($badge1) - ->addBadge($badge2); + ->setSubheader(pht('Much Features')); $obj4 = id(new PHUIObjectBoxView()) ->setHeader($header) @@ -116,7 +105,9 @@ final class PHUIBoxExample extends PhabricatorUIExample { return phutil_tag( 'div', - array(), + array( + 'class' => 'ml', + ), array( $head1, $wrap1, diff --git a/src/applications/uiexample/examples/PHUIHovercardUIExample.php b/src/applications/uiexample/examples/PHUIHovercardUIExample.php index 8cdec56d68..b88fdc6639 100644 --- a/src/applications/uiexample/examples/PHUIHovercardUIExample.php +++ b/src/applications/uiexample/examples/PHUIHovercardUIExample.php @@ -55,14 +55,6 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample { ->addTag($tag)); $elements[] = $panel; - $badge1 = id(new PHUIBadgeMiniView()) - ->setIcon('fa-book') - ->setHeader(pht('Documenter')); - - $badge2 = id(new PHUIBadgeMiniView()) - ->setIcon('fa-star') - ->setHeader(pht('Contributor')); - $user_handle = $this->createBasicDummyHandle( 'gwashington', PhabricatorPeopleUserPHIDType::TYPECONST, @@ -75,8 +67,6 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample { ->addField(pht('Status'), pht('Available')) ->addField(pht('Member since'), '30. February 1750') ->addAction(pht('Send a Message'), '/dev/null') - ->addBadge($badge1) - ->addBadge($badge2) ->setUser($user)); $elements[] = $panel; diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php index ab576c64d5..dc836f3d3a 100644 --- a/src/view/phui/PHUIHeaderView.php +++ b/src/view/phui/PHUIHeaderView.php @@ -21,7 +21,6 @@ final class PHUIHeaderView extends AphrontTagView { private $policyObject; private $epoch; private $actionItems = array(); - private $badges = array(); private $href; private $actionList; private $actionListID; @@ -46,11 +45,6 @@ final class PHUIHeaderView extends AphrontTagView { return $this; } - public function addBadge(PHUIBadgeMiniView $badge) { - $this->badges[] = $badge; - return $this; - } - public function setImage($uri) { $this->image = $uri; return $this; @@ -341,21 +335,13 @@ final class PHUIHeaderView extends AphrontTagView { $header_content, )); - if ($this->subheader || $this->badges) { - $badges = null; - if ($this->badges) { - $badges = new PHUIBadgeBoxView(); - $badges->addItems($this->badges); - $badges->setCollapsed(true); - } - + if ($this->subheader) { $left[] = phutil_tag( 'div', array( 'class' => 'phui-header-subheader', ), array( - $badges, $this->subheader, )); } diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index f0c37a1a75..87df1d0fc5 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -307,14 +307,6 @@ body .phui-header-shell.phui-bleed-header text-decoration: underline; } -.phui-header-subheader .phui-badge-flex-view { - display: inline; - margin-right: 4px; -} - -.phui-header-subheader .phui-badge-flex-view:after { - display: inline; -} /*** Profile Header ***********************************************************/ From 38904ea4ad6a3ab28d2b3d73526e7df9dce2d6da Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 7 Jun 2017 09:29:45 -0700 Subject: [PATCH 16/25] More button grey conversions Summary: Ran across a few straglers. Convert to the correct color. Test Plan: grep for profile-image-button, check profile image selection page Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18096 --- .../controller/ConpherenceRoomPictureController.php | 2 +- .../files/controller/PhabricatorFileComposeController.php | 4 ++-- .../controller/PhabricatorPeopleProfilePictureController.php | 2 +- .../controller/blog/PhameBlogProfilePictureController.php | 2 +- .../controller/merchant/PhortuneMerchantPictureController.php | 2 +- .../PhabricatorProjectBoardBackgroundController.php | 2 +- .../controller/PhabricatorProjectEditPictureController.php | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php index 6a39481377..fbf3def9cd 100644 --- a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php +++ b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php @@ -132,7 +132,7 @@ final class ConpherenceRoomPictureController $button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => $spec['tip'], diff --git a/src/applications/files/controller/PhabricatorFileComposeController.php b/src/applications/files/controller/PhabricatorFileComposeController.php index 7afd99330a..b06e855617 100644 --- a/src/applications/files/controller/PhabricatorFileComposeController.php +++ b/src/applications/files/controller/PhabricatorFileComposeController.php @@ -82,7 +82,7 @@ final class PhabricatorFileComposeController $buttons[] = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip compose-select-color', 'style' => 'margin: 0 8px 8px 0', 'meta' => array( @@ -102,7 +102,7 @@ final class PhabricatorFileComposeController $icons[] = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip compose-select-icon', 'style' => 'margin: 0 8px 8px 0', 'meta' => array( diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index cff833aa51..5cab924255 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -190,7 +190,7 @@ final class PhabricatorPeopleProfilePictureController $button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => $spec['tip'], diff --git a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php index 04b41dbb79..4e69034253 100644 --- a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php +++ b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php @@ -133,7 +133,7 @@ final class PhameBlogProfilePictureController $button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => $spec['tip'], diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php index 469887172f..cbd122f682 100644 --- a/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php +++ b/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php @@ -133,7 +133,7 @@ final class PhortuneMerchantPictureController $button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => $spec['tip'], diff --git a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php index be4049bb73..b229f59ecb 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardBackgroundController.php @@ -138,7 +138,7 @@ final class PhabricatorProjectBoardBackgroundController $button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => $option['name'], diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php index 95d3bbd855..5060d0a203 100644 --- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php +++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php @@ -134,7 +134,7 @@ final class PhabricatorProjectEditPictureController $button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => $spec['tip'], @@ -285,7 +285,7 @@ final class PhabricatorProjectEditPictureController $default_button = javelin_tag( 'button', array( - 'class' => 'grey profile-image-button', + 'class' => 'button-grey profile-image-button', 'sigil' => 'has-tooltip', 'meta' => array( 'tip' => pht('Use Icon and Color'), From fb9d036e574fe50e0aff321f817672ffc4b52f36 Mon Sep 17 00:00:00 2001 From: Austin McKinley Date: Wed, 7 Jun 2017 13:30:12 -0700 Subject: [PATCH 17/25] Show task duplicates as related objects in Maniphest and migrate old duplicates Summary: Does the UI work that's part of T12234 and adds migrations for both of the old-style duplicate transactions. Test Plan: - Started with a clean DB. - Checked out really old code that marks tasks as dupes using comments. - Made a bunch of tasks and closed some as dupes. Made a bunch of additional comments. - Checked out D10427 and did a `storage upgrade`. - Made a bunch more new tasks and dupes. - Snapshotted DB. - Ran migration repeatedly until all expected edges showed up in the `phabricator_maniphest.edge`table. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T12234 Differential Revision: https://secure.phabricator.com/D18037 --- .../autopatches/20170528.maniphestdupes.php | 68 +++++++++++++++++++ .../ManiphestTaskDetailController.php | 28 ++++++++ 2 files changed, 96 insertions(+) create mode 100644 resources/sql/autopatches/20170528.maniphestdupes.php diff --git a/resources/sql/autopatches/20170528.maniphestdupes.php b/resources/sql/autopatches/20170528.maniphestdupes.php new file mode 100644 index 0000000000..aea8ae93d2 --- /dev/null +++ b/resources/sql/autopatches/20170528.maniphestdupes.php @@ -0,0 +1,68 @@ +getTransactionType(); + + if ($txn_type == 'mergedinto') { + // dupe handling as implemented in D10427, which creates a specific txn + $add_edges[] = array( + 'src' => $txn->getObjectPHID(), + 'dst' => $txn->getNewValue(), + ); + } else if ($txn_type == 'status' && $txn->getNewValue() == 'duplicate') { + // dupe handling as originally implemented, which just changes the status + // and adds a comment + $src_phid = $txn->getObjectPHID(); + + // get all the comment transactions associated with this task + $viewer = PhabricatorUser::getOmnipotentUser(); + $comment_txns = id(new ManiphestTransactionQuery()) + ->setViewer($viewer) + ->withObjectPHIDs(array($src_phid)) + ->needComments(true) + ->execute(); + + // check each comment, looking for the "Merged Into" message + foreach ($comment_txns as $comment_txn) { + if ($comment_txn->hasComment()) { + $comment = $comment_txn->getComment()->getContent(); + $pattern = '/^\xE2\x9C\x98 Merged into T(\d+)\.$/'; + $matches = array(); + + if (preg_match($pattern, $comment, $matches)) { + $dst_task = id(new ManiphestTaskQuery()) + ->setViewer($viewer) + ->withIDs(array($matches[1])) + ->executeOne(); + + if ($dst_task) { + $dst_phid = $dst_task->getPHID(); + $add_edges[] = array( + 'src' => $src_phid, + 'dst' => $dst_phid, + ); + } + } + } + } + } +} + +if ($add_edges) { + foreach ($add_edges as $edge) { + $src_phid = $edge['src']; + $dst_phid = $edge['dst']; + + $type = ManiphestTaskIsDuplicateOfTaskEdgeType::EDGECONST; + try { + $editor = id(new PhabricatorEdgeEditor()) + ->addEdge($src_phid, $type, $dst_phid) + ->save(); + } catch (PhabricatorEdgeCycleException $ex) { + // Some earlier or later merge made this invalid, just skip it. + } + } +} diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 92fe703f91..ecfb723f97 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -36,6 +36,7 @@ final class ManiphestTaskDetailController extends ManiphestController { ManiphestTaskHasMockEdgeType::EDGECONST, PhabricatorObjectMentionedByObjectEdgeType::EDGECONST, PhabricatorObjectMentionsObjectEdgeType::EDGECONST, + ManiphestTaskHasDuplicateTaskEdgeType::EDGECONST, ); $phid = $task->getPHID(); @@ -159,6 +160,7 @@ final class ManiphestTaskDetailController extends ManiphestController { $related_tabs[] = $this->newMocksTab($task, $query); $related_tabs[] = $this->newMentionsTab($task, $query); + $related_tabs[] = $this->newDuplicatesTab($task, $query); $tab_view = null; @@ -553,6 +555,32 @@ final class ManiphestTaskDetailController extends ManiphestController { ->appendChild($view); } + private function newDuplicatesTab( + ManiphestTask $task, + PhabricatorEdgeQuery $edge_query) { + + $in_type = ManiphestTaskHasDuplicateTaskEdgeType::EDGECONST; + $in_phids = $edge_query->getDestinationPHIDs(array(), array($in_type)); + + $viewer = $this->getViewer(); + $in_handles = $viewer->loadHandles($in_phids); + $in_handles = $this->getCompleteHandles($in_handles); + + $view = new PHUIPropertyListView(); + + if (!count($in_handles)) { + return null; + } + + $view->addProperty( + pht('Duplicates Merged Here'), $in_handles->renderList()); + + return id(new PHUITabView()) + ->setName(pht('Duplicates')) + ->setKey('duplicates') + ->appendChild($view); + } + private function getCompleteHandles(PhabricatorHandleList $handles) { $phids = array(); From 345d80b40d9b4d894eb413e4ddf1a9dd46c7a194 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 7 Jun 2017 13:35:46 -0700 Subject: [PATCH 18/25] Clean up Dark Console broken table css Summary: Fixes T12808 Test Plan: Enable Dark Console. Hover Hover Hover. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12808 Differential Revision: https://secure.phabricator.com/D18099 --- resources/celerity/map.php | 4 ++-- webroot/rsrc/css/aphront/dark-console.css | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 1e4721cbd5..33e8f8ad19 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -25,7 +25,7 @@ return array( 'rsrc/audio/basic/tap.mp3' => 'fc2fd796', 'rsrc/audio/basic/ting.mp3' => '17660001', 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', - 'rsrc/css/aphront/dark-console.css' => '53798a6d', + 'rsrc/css/aphront/dark-console.css' => 'f7b071f1', 'rsrc/css/aphront/dialog-view.css' => '685c7e2d', 'rsrc/css/aphront/list-filter-view.css' => '5d6f0526', 'rsrc/css/aphront/multi-column.css' => '84cc6640', @@ -537,7 +537,7 @@ return array( 'symbols' => array( 'almanac-css' => 'dbb9b3af', 'aphront-bars' => '231ac33c', - 'aphront-dark-console-css' => '53798a6d', + 'aphront-dark-console-css' => 'f7b071f1', 'aphront-dialog-view-css' => '685c7e2d', 'aphront-list-filter-view-css' => '5d6f0526', 'aphront-multi-column-view-css' => '84cc6640', diff --git a/webroot/rsrc/css/aphront/dark-console.css b/webroot/rsrc/css/aphront/dark-console.css index e1ddc5a16d..81e888ba46 100644 --- a/webroot/rsrc/css/aphront/dark-console.css +++ b/webroot/rsrc/css/aphront/dark-console.css @@ -3,12 +3,12 @@ */ .dark-console { - background: #444444; - color: #eeeeee; - width: 100%; - font-family: "Verdana"; - font-size: 11px; - position: relative; + background: #444444; + color: #eeeeee; + width: 100%; + font-family: "Verdana"; + font-size: 11px; + position: relative; } .dark-console a { @@ -74,6 +74,7 @@ .dark-console-requests a.dark-console-request:hover, .dark-console-tabs a.dark-console-tab:hover { background: #1188cc; + text-decoration: none; } .dark-console-tabs a.dark-console-tab { @@ -107,6 +108,12 @@ .dark-console .aphront-table-view td { font-size: 11px; + color: #eee; +} + +.dark-console .aphront-table-view tr:hover, +.dark-console .aphront-table-view tr.alt:hover { + background: #333; } .dark-console .aphront-table-view td.header { From 9ef726a22bbc09a3b384585d7331d1d73bfb85c4 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Wed, 7 Jun 2017 13:48:19 -0700 Subject: [PATCH 19/25] Fix object selector button color Summary: Should be button-grey Test Plan: Use object selector on a diff for a task Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18100 --- resources/celerity/map.php | 18 +++++++++--------- .../rsrc/js/core/behavior-object-selector.js | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 33e8f8ad19..3dccc41cb5 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', - 'differential.pkg.js' => '889ab0ab', + 'differential.pkg.js' => '52e2a4a7', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '6134c5a1', 'favicon.ico' => '30672e08', @@ -496,7 +496,7 @@ return array( 'rsrc/js/core/behavior-lightbox-attachments.js' => '560f41da', 'rsrc/js/core/behavior-line-linker.js' => '1499a8cb', 'rsrc/js/core/behavior-more.js' => 'a80d0378', - 'rsrc/js/core/behavior-object-selector.js' => 'e0ec7f2f', + 'rsrc/js/core/behavior-object-selector.js' => '77c1f0b0', 'rsrc/js/core/behavior-oncopy.js' => '2926fff2', 'rsrc/js/core/behavior-phabricator-nav.js' => '947753e0', 'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => 'acd29eee', @@ -658,7 +658,7 @@ return array( 'javelin-behavior-phabricator-line-linker' => '1499a8cb', 'javelin-behavior-phabricator-nav' => '947753e0', 'javelin-behavior-phabricator-notification-example' => '8ce821c5', - 'javelin-behavior-phabricator-object-selector' => 'e0ec7f2f', + 'javelin-behavior-phabricator-object-selector' => '77c1f0b0', 'javelin-behavior-phabricator-oncopy' => '2926fff2', 'javelin-behavior-phabricator-remarkup-assist' => 'acd29eee', 'javelin-behavior-phabricator-reveal-content' => '60821bc7', @@ -1457,6 +1457,12 @@ return array( 'javelin-reactor', 'javelin-util', ), + '77c1f0b0' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-request', + 'javelin-util', + ), '782ab6e7' => array( 'javelin-behavior', 'javelin-dom', @@ -2032,12 +2038,6 @@ return array( 'javelin-typeahead-ondemand-source', 'javelin-dom', ), - 'e0ec7f2f' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-request', - 'javelin-util', - ), 'e1d25dfb' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/webroot/rsrc/js/core/behavior-object-selector.js b/webroot/rsrc/js/core/behavior-object-selector.js index 686f0f8820..722cfdd562 100644 --- a/webroot/rsrc/js/core/behavior-object-selector.js +++ b/webroot/rsrc/js/core/behavior-object-selector.js @@ -137,7 +137,9 @@ JX.behavior('phabricator-object-selector', function(config) { var select_object_button = JX.$N( 'a', - {href: '#', sigil: 'object-attacher', className: 'button small grey'}, + {href: '#', + sigil: 'object-attacher', + className: 'button small button-grey'}, attach ? 'Select' : 'Remove'); var cells = [ From 8692d673c8ab1ebec062f662aab17023b65cd061 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 7 Jun 2017 19:04:23 -0700 Subject: [PATCH 20/25] Fix minor inline comment header button behaviors Summary: Fixes T12806. Ref T12733. - Don't count synthetic (lint) comments as anything. - When you begin writing an inline then cancel it, don't count it as anything. - When we would show "0 / X", just show "X". Test Plan: - Viewed a diff with synthetic comments, no button. - Wrote, then cancelled an inline. No "X comments". - Clicked / unlicked "Done", saw "X" -> "1 / X". Reviewers: chad Reviewed By: chad Maniphest Tasks: T12806, T12733 Differential Revision: https://secure.phabricator.com/D18103 --- .../view/PHUIDiffInlineCommentDetailView.php | 11 +++--- .../js/application/diff/DiffChangesetList.js | 37 +++++++++++++++---- .../rsrc/js/application/diff/DiffInline.js | 6 +++ 3 files changed, 42 insertions(+), 12 deletions(-) diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php index a42efa932a..46853e185c 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php @@ -107,6 +107,11 @@ final class PHUIDiffInlineCommentDetailView break; } + $is_synthetic = false; + if ($inline->getSyntheticAuthor()) { + $is_synthetic = true; + } + $metadata = array( 'id' => $inline->getID(), 'phid' => $inline->getPHID(), @@ -120,6 +125,7 @@ final class PHUIDiffInlineCommentDetailView 'isDraft' => $inline->isDraft(), 'isFixed' => $is_fixed, 'isGhost' => $inline->getIsGhost(), + 'isSynthetic' => $is_synthetic, ); $sigil = 'differential-inline-comment'; @@ -136,11 +142,6 @@ final class PHUIDiffInlineCommentDetailView $links = array(); - $is_synthetic = false; - if ($inline->getSyntheticAuthor()) { - $is_synthetic = true; - } - $draft_text = null; if (!$is_synthetic) { // This display is controlled by CSS diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js index 400b828a9a..b476b8c168 100644 --- a/webroot/rsrc/js/application/diff/DiffChangesetList.js +++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js @@ -1352,8 +1352,16 @@ JX.install('DiffChangesetList', { continue; } + if (inline.isSynthetic()) { + continue; + } + if (inline.isEditing()) { unsaved.push(inline); + } else if (!inline.getID()) { + // These are new comments which have been cancelled, and do not + // count as anything. + continue; } else if (inline.isDraft()) { unsubmitted.push(inline); } else if (!inline.isDone()) { @@ -1395,13 +1403,28 @@ JX.install('DiffChangesetList', { } if (done.length || undone.length) { - done_button.setText([ - done.length, - ' / ', - (done.length + undone.length), - ' ', - pht('Comments') - ]); + // If you haven't marked any comments as "Done", we just show text + // like "3 Comments". If you've marked at least one done, we show + // "1 / 3 Comments". + + var done_text; + if (done.length) { + done_text = [ + done.length, + ' / ', + (done.length + undone.length), + ' ', + pht('Comments') + ]; + } else { + done_text = [ + undone.length, + ' ', + pht('Comments') + ]; + } + + done_button.setText(done_text); JX.DOM.show(done_button.getNode()); diff --git a/webroot/rsrc/js/application/diff/DiffInline.js b/webroot/rsrc/js/application/diff/DiffInline.js index 6d897c27ae..baee53a7a4 100644 --- a/webroot/rsrc/js/application/diff/DiffInline.js +++ b/webroot/rsrc/js/application/diff/DiffInline.js @@ -34,6 +34,7 @@ JX.install('DiffInline', { _isFixed: null, _isEditing: false, _isNew: false, + _isSynthetic: false, bindToRow: function(row) { this._row = row; @@ -71,6 +72,7 @@ JX.install('DiffInline', { this._isDraft = data.isDraft; this._isFixed = data.isFixed; this._isGhost = data.isGhost; + this._isSynthetic = data.isSynthetic; this._changesetID = data.changesetID; this._isNew = false; @@ -97,6 +99,10 @@ JX.install('DiffInline', { return this._isDeleted; }, + isSynthetic: function() { + return this._isSynthetic; + }, + bindToRange: function(data) { this._displaySide = data.displaySide; this._number = parseInt(data.number, 10); From c3f905af6c7eaf61b6223441dca8d4a39e7fa73b Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 7 Jun 2017 19:11:32 -0700 Subject: [PATCH 21/25] Coniferous roots. --- resources/celerity/map.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 3dccc41cb5..1c0fb7fb3c 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -13,7 +13,7 @@ return array( 'core.pkg.js' => '1475bd91', 'darkconsole.pkg.js' => '1f9a31bc', 'differential.pkg.css' => '1ccbf3a9', - 'differential.pkg.js' => '52e2a4a7', + 'differential.pkg.js' => 'b7504037', 'diffusion.pkg.css' => 'b93d9b8c', 'diffusion.pkg.js' => '6134c5a1', 'favicon.ico' => '30672e08', @@ -396,8 +396,8 @@ return array( 'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '453c5375', 'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => 'd4eecc63', 'rsrc/js/application/diff/DiffChangeset.js' => 'd498bddb', - 'rsrc/js/application/diff/DiffChangesetList.js' => '0db8cdca', - 'rsrc/js/application/diff/DiffInline.js' => '1d17130f', + 'rsrc/js/application/diff/DiffChangesetList.js' => '29bbc02c', + 'rsrc/js/application/diff/DiffInline.js' => '20553f71', 'rsrc/js/application/diff/behavior-preview-link.js' => '051c7832', 'rsrc/js/application/differential/behavior-comment-preview.js' => '51c5ad07', 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', @@ -775,8 +775,8 @@ return array( 'phabricator-darkmessage' => 'c48cccdd', 'phabricator-dashboard-css' => 'fe5b1869', 'phabricator-diff-changeset' => 'd498bddb', - 'phabricator-diff-changeset-list' => '0db8cdca', - 'phabricator-diff-inline' => '1d17130f', + 'phabricator-diff-changeset-list' => '29bbc02c', + 'phabricator-diff-inline' => '20553f71', 'phabricator-drag-and-drop-file-upload' => '58dea2fa', 'phabricator-draggable-list' => 'bea6e7f4', 'phabricator-fatal-config-template-css' => '8f18fa41', @@ -959,10 +959,6 @@ return array( 'javelin-dom', 'javelin-router', ), - '0db8cdca' => array( - 'javelin-install', - 'phuix-button-view', - ), '0f764c35' => array( 'javelin-install', 'javelin-util', @@ -1020,9 +1016,6 @@ return array( 'javelin-request', 'javelin-uri', ), - '1d17130f' => array( - 'javelin-dom', - ), '1e911d0f' => array( 'javelin-stratcom', 'javelin-request', @@ -1046,6 +1039,9 @@ return array( 'javelin-install', 'javelin-dom', ), + '20553f71' => array( + 'javelin-dom', + ), '2290aeef' => array( 'javelin-install', 'javelin-dom', @@ -1071,6 +1067,10 @@ return array( 'javelin-install', 'javelin-util', ), + '29bbc02c' => array( + 'javelin-install', + 'phuix-button-view', + ), '2ae077e1' => array( 'javelin-behavior', 'javelin-dom', From 8ef9490f66a3813d015a95078d711d1f4c997110 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 8 Jun 2017 07:00:57 -0700 Subject: [PATCH 22/25] Add a retroactive migration to expand the `contentHash` field Summary: See D18037. The migration there may cause us to write new file records as a side effect. Ideally, we would rewrite that migration to not ever have this kind of side effect. However, that would make it much more complicated, and it's already very complicated. Instead, retroactively expand the size of this field before `storage adjust` does it, so it has the right size by the time we hit the migration in D18037. Test Plan: @chad, can you `arc patch` this and see if it works? It's possible that it will get us about five lines deeper and then we'll just hit another similar exception, and that this isn't really a viable way forward. Reviewers: chad, amckinley Reviewed By: amckinley Subscribers: amckinley, chad Differential Revision: https://secure.phabricator.com/D18107 --- .../sql/autopatches/20170404.files.retroactive-content-hash.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 resources/sql/autopatches/20170404.files.retroactive-content-hash.sql diff --git a/resources/sql/autopatches/20170404.files.retroactive-content-hash.sql b/resources/sql/autopatches/20170404.files.retroactive-content-hash.sql new file mode 100644 index 0000000000..7c4eb0f013 --- /dev/null +++ b/resources/sql/autopatches/20170404.files.retroactive-content-hash.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_file.file + CHANGE contentHash contentHash BINARY(64); From e26cd3ffe0f9d656535c85a66085f21ab4e612ec Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 8 Jun 2017 05:38:42 -0700 Subject: [PATCH 23/25] Give "x committed " feed stories an explicitly higher action strength than other transactions Summary: Fixes T12811. The issue here //appears// to be that both the "alice committed rXYZabc" and "Herald added projects..." actions have the same (default) strength and end up applying in arbitrary order, and probably got shuffled around as this transitioned to Modular transactions. Give "alice committed rXYZabc" an explicitly higher action strength. Test Plan: - Wrote an "Always, add project X" Herald rule for commits. - Ran `bin/repository reparse --herald ...`. - Saw an "alice committed rXYZabc" story instead of a "Herald added projects: X" story. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12811 Differential Revision: https://secure.phabricator.com/D18104 --- .../audit/storage/PhabricatorAuditTransaction.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/applications/audit/storage/PhabricatorAuditTransaction.php b/src/applications/audit/storage/PhabricatorAuditTransaction.php index d09bdb76ce..ad96edb3a4 100644 --- a/src/applications/audit/storage/PhabricatorAuditTransaction.php +++ b/src/applications/audit/storage/PhabricatorAuditTransaction.php @@ -49,6 +49,17 @@ final class PhabricatorAuditTransaction return $blocks; } + public function getActionStrength() { + $type = $this->getTransactionType(); + + switch ($type) { + case self::TYPE_COMMIT: + return 3.0; + } + + return parent::getActionStrength(); + } + public function getRequiredHandlePHIDs() { $phids = parent::getRequiredHandlePHIDs(); From d5163d014345e3370bfa45aef8bb13ba5bd696b4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 8 Jun 2017 05:53:39 -0700 Subject: [PATCH 24/25] Write patterns to "git grep" on stdin instead of passing them with "-e" Summary: Fixes T12807. Some shells may apparently mangle/strip UTF8 characters? Just dodge this whole problem by sending the pattern over stdin rather than actually figuring out the particulars. Related tasks, like T7339 and T5554, discuss finding broader fixes for this class of issue, and this definitely isn't exactly a fully legitimate fix, but in many cases (as here) we can reasonably just avoid the problem rather than actually fixing it, at least for a long time. Test Plan: Searched for emoji and non-emoji locally, but this worked fine (on OSX) for me before the patch too. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12807 Differential Revision: https://secure.phabricator.com/D18105 --- .../conduit/DiffusionSearchQueryConduitAPIMethod.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php index e9b8f8d15e..389f931c0f 100644 --- a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php @@ -57,11 +57,14 @@ final class DiffusionSearchQueryConduitAPIMethod $results = array(); $future = $repository->getLocalCommandFuture( // NOTE: --perl-regexp is available only with libpcre compiled in. - 'grep --extended-regexp --null -n --no-color -e %s %s -- %s', - $grep, + 'grep --extended-regexp --null -n --no-color -f - %s -- %s', $drequest->getStableCommit(), $path); + // NOTE: We're writing the pattern on stdin to avoid issues with UTF8 + // being mangled by the shell. See T12807. + $future->write($grep); + $binary_pattern = '/Binary file [^:]*:(.+) matches/'; $lines = new LinesOfALargeExecFuture($future); From 3400f24c8b53a742b6dd39a9c244f45c51db85ac Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 8 Jun 2017 06:18:48 -0700 Subject: [PATCH 25/25] Send permanent dameon failures to the log, even when not running in verbose mode Summary: Fixes T12803. An install is having difficulty diagnosing mail failures, and one component is that permanent task failures aren't reaching the log. It's reasonable to send these to the log even when "phd.verbose" is off. See T12803 for a rough review of when we generate these failrues today. Test Plan: - Faked some exceptions. - Got a result in the log (P2058) with `phd.verbose` turned off. Reviewers: chad, amckinley Reviewed By: chad Maniphest Tasks: T12803 Differential Revision: https://secure.phabricator.com/D18106 --- .../metamta/PhabricatorMetaMTAWorker.php | 17 ++++++++++++----- .../workers/PhabricatorTaskmasterDaemon.php | 12 ++++++++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/applications/metamta/PhabricatorMetaMTAWorker.php b/src/applications/metamta/PhabricatorMetaMTAWorker.php index af655f4e0f..dcc6a8dc5e 100644 --- a/src/applications/metamta/PhabricatorMetaMTAWorker.php +++ b/src/applications/metamta/PhabricatorMetaMTAWorker.php @@ -13,10 +13,6 @@ final class PhabricatorMetaMTAWorker protected function doWork() { $message = $this->loadMessage(); - if (!$message) { - throw new PhabricatorWorkerPermanentFailureException( - pht('Unable to load message!')); - } if ($message->getStatus() != PhabricatorMailOutboundStatus::STATUS_QUEUE) { return; @@ -32,7 +28,18 @@ final class PhabricatorMetaMTAWorker private function loadMessage() { $message_id = $this->getTaskData(); - return id(new PhabricatorMetaMTAMail())->load($message_id); + $message = id(new PhabricatorMetaMTAMail()) + ->load($message_id); + + if (!$message) { + throw new PhabricatorWorkerPermanentFailureException( + pht( + 'Unable to load mail message (with ID "%s") while preparing to '. + 'deliver it.', + $message_id)); + } + + return $message; } public function renderForDisplay(PhabricatorUser $viewer) { diff --git a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php index 57a69843a4..c2276843db 100644 --- a/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php +++ b/src/infrastructure/daemon/workers/PhabricatorTaskmasterDaemon.php @@ -23,11 +23,15 @@ final class PhabricatorTaskmasterDaemon extends PhabricatorDaemon { $ex = $task->getExecutionException(); if ($ex) { if ($ex instanceof PhabricatorWorkerPermanentFailureException) { - $this->log( + // NOTE: Make sure these reach the daemon log, even when not + // running in "phd.verbose" mode. See T12803 for discussion. + $log_exception = new PhutilProxyException( pht( - 'Task %d was cancelled: %s', - $id, - $ex->getMessage())); + 'Task "%s" encountered a permanent failure and was '. + 'cancelled.', + $id), + $ex); + phlog($log_exception); } else if ($ex instanceof PhabricatorWorkerYieldException) { $this->log(pht('Task %s yielded.', $id)); } else {