diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 68c281faa5..56aee8abdc 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,11 +7,11 @@ */ return array( 'names' => array( - 'core.pkg.css' => '1d1e9a3a', - 'core.pkg.js' => '573e6664', + 'core.pkg.css' => '5e4df064', + 'core.pkg.js' => 'a79eed25', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '2de124c9', - 'differential.pkg.js' => 'f83532f8', + 'differential.pkg.js' => '5c2ba922', 'diffusion.pkg.css' => 'f45955ed', 'diffusion.pkg.js' => '3a9a8bfa', 'maniphest.pkg.css' => '4845691a', @@ -35,7 +35,7 @@ return array( 'rsrc/css/application/base/main-menu-view.css' => 'd00a795a', 'rsrc/css/application/base/notification-menu.css' => 'f31c0bde', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', - 'rsrc/css/application/base/phui-theme.css' => '981a58f8', + 'rsrc/css/application/base/phui-theme.css' => 'ab7b848c', 'rsrc/css/application/base/standard-page-view.css' => '7b0d68d8', 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', @@ -74,13 +74,13 @@ return array( 'rsrc/css/application/herald/herald-test.css' => 'a52e323e', 'rsrc/css/application/herald/herald.css' => '826075fa', 'rsrc/css/application/maniphest/batch-editor.css' => 'b0f0b6d5', - 'rsrc/css/application/maniphest/report.css' => 'f6931fdf', + 'rsrc/css/application/maniphest/report.css' => '9b9580b7', 'rsrc/css/application/maniphest/task-edit.css' => 'fda62a9b', 'rsrc/css/application/maniphest/task-summary.css' => '11cc5344', 'rsrc/css/application/objectselector/object-selector.css' => '85ee8ce6', 'rsrc/css/application/owners/owners-path-editor.css' => '2f00933b', 'rsrc/css/application/paste/paste.css' => 'a5157c48', - 'rsrc/css/application/people/people-profile.css' => 'fa2069ec', + 'rsrc/css/application/people/people-profile.css' => '2473d929', 'rsrc/css/application/phame/phame.css' => '6d5b3682', 'rsrc/css/application/pholio/pholio-edit.css' => '3ad9d1ee', 'rsrc/css/application/pholio/pholio-inline-comments.css' => '8e545e49', @@ -93,6 +93,7 @@ return array( 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 'rsrc/css/application/policy/policy.css' => '957ea14c', 'rsrc/css/application/ponder/ponder-view.css' => '7b0df4da', + 'rsrc/css/application/project/project-view.css' => '22f7ed0e', 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', @@ -101,8 +102,8 @@ return array( 'rsrc/css/application/slowvote/slowvote.css' => 'da0afb1b', 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 'rsrc/css/application/uiexample/example.css' => '528b19de', - 'rsrc/css/core/core.css' => 'a76cefc9', - 'rsrc/css/core/remarkup.css' => '64277c02', + 'rsrc/css/core/core.css' => '5b3563c8', + 'rsrc/css/core/remarkup.css' => 'e1c8b32f', 'rsrc/css/core/syntax.css' => '9fd11da8', 'rsrc/css/core/z-index.css' => 'a36a45da', 'rsrc/css/diviner/diviner-shared.css' => 'aa3656aa', @@ -122,17 +123,17 @@ return array( 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-badge.css' => 'f25c3476', 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', - 'rsrc/css/phui/phui-box.css' => '10939564', - 'rsrc/css/phui/phui-button.css' => '16020a60', + 'rsrc/css/phui/phui-box.css' => '6e8ac7fd', + 'rsrc/css/phui/phui-button.css' => 'd6ac72db', 'rsrc/css/phui/phui-crumbs-view.css' => '414406b5', 'rsrc/css/phui/phui-document-pro.css' => '8799acf7', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', - 'rsrc/css/phui/phui-document.css' => 'a4a1c3b9', + 'rsrc/css/phui/phui-document.css' => '9c71d2bf', 'rsrc/css/phui/phui-feed-story.css' => 'b7b26d23', 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 'rsrc/css/phui/phui-form.css' => '0b98e572', - 'rsrc/css/phui/phui-header-view.css' => '55bb32dd', + 'rsrc/css/phui/phui-header-view.css' => 'd53cc835', 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 'rsrc/css/phui/phui-icon.css' => '3f33ab57', 'rsrc/css/phui/phui-image-mask.css' => '5a8b09c8', @@ -140,20 +141,20 @@ return array( 'rsrc/css/phui/phui-info-view.css' => '6d7c3509', 'rsrc/css/phui/phui-list.css' => '9da2aa00', 'rsrc/css/phui/phui-object-box.css' => '407eaf5a', - 'rsrc/css/phui/phui-object-item-list-view.css' => '26c30d3f', + 'rsrc/css/phui/phui-object-item-list-view.css' => '0d484a97', 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', - 'rsrc/css/phui/phui-profile-menu.css' => '43826c43', + 'rsrc/css/phui/phui-profile-menu.css' => 'ab4fcf5f', 'rsrc/css/phui/phui-property-list-view.css' => '27b2849e', 'rsrc/css/phui/phui-remarkup-preview.css' => '1a8f2591', 'rsrc/css/phui/phui-spacing.css' => '042804d6', 'rsrc/css/phui/phui-status.css' => '888cedb8', 'rsrc/css/phui/phui-tag-view.css' => 'e60e227b', - 'rsrc/css/phui/phui-text.css' => 'cf019f54', 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', - 'rsrc/css/phui/phui-two-column-view.css' => '39ecafb1', - 'rsrc/css/phui/phui-workboard-view.css' => 'f488d036', - 'rsrc/css/phui/phui-workpanel-view.css' => 'adec7699', + 'rsrc/css/phui/phui-two-column-view.css' => 'c75bfc5b', + 'rsrc/css/phui/workboards/phui-workboard.css' => 'b07a5524', + 'rsrc/css/phui/workboards/phui-workcard.css' => 'ffb55371', + 'rsrc/css/phui/workboards/phui-workpanel.css' => 'e9339dc3', 'rsrc/css/sprite-login.css' => '60e8560e', 'rsrc/css/sprite-menu.css' => '9dd65b92', 'rsrc/css/sprite-tokens.css' => '4f399012', @@ -191,8 +192,8 @@ return array( 'rsrc/externals/font/lato/lato-regular.ttf' => 'e270165b', 'rsrc/externals/font/lato/lato-regular.woff' => '13d39fe2', 'rsrc/externals/font/lato/lato-regular.woff2' => '57a9f742', - 'rsrc/externals/javelin/core/Event.js' => '85ea0626', - 'rsrc/externals/javelin/core/Stratcom.js' => '6c53634d', + 'rsrc/externals/javelin/core/Event.js' => '2ee659ce', + 'rsrc/externals/javelin/core/Stratcom.js' => '6ad39b6f', 'rsrc/externals/javelin/core/__tests__/event-stop-and-kill.js' => '717554e4', 'rsrc/externals/javelin/core/__tests__/install.js' => 'c432ee85', 'rsrc/externals/javelin/core/__tests__/stratcom.js' => '88bf7313', @@ -378,7 +379,7 @@ return array( 'rsrc/js/application/differential/behavior-comment-preview.js' => 'b064af76', 'rsrc/js/application/differential/behavior-diff-radios.js' => 'e1ff79b1', 'rsrc/js/application/differential/behavior-dropdown-menus.js' => '9a6b9324', - 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '65ef6074', + 'rsrc/js/application/differential/behavior-edit-inline-comments.js' => '4fbbc3e9', 'rsrc/js/application/differential/behavior-keyboard-nav.js' => '2c426492', 'rsrc/js/application/differential/behavior-populate.js' => '8694b1df', 'rsrc/js/application/differential/behavior-toggle-files.js' => 'ca3f91eb', @@ -464,7 +465,7 @@ return array( 'rsrc/js/core/behavior-choose-control.js' => '327a00d1', 'rsrc/js/core/behavior-crop.js' => 'fa0f4fc2', 'rsrc/js/core/behavior-dark-console.js' => 'f411b6ae', - 'rsrc/js/core/behavior-device.js' => 'a205cf28', + 'rsrc/js/core/behavior-device.js' => 'b5b36110', 'rsrc/js/core/behavior-drag-and-drop-textarea.js' => '4f6a4b4e', 'rsrc/js/core/behavior-error-log.js' => '6882e80a', 'rsrc/js/core/behavior-fancy-datepicker.js' => '8ae55229', @@ -500,10 +501,10 @@ return array( 'rsrc/js/core/phtize.js' => 'd254d646', 'rsrc/js/phui/behavior-phui-dropdown-menu.js' => '54733475', 'rsrc/js/phui/behavior-phui-object-box-tabs.js' => '2bfa2836', - 'rsrc/js/phui/behavior-phui-profile-menu.js' => 'bfc2e675', + 'rsrc/js/phui/behavior-phui-profile-menu.js' => '12884df9', 'rsrc/js/phuix/PHUIXActionListView.js' => 'b5c256b8', 'rsrc/js/phuix/PHUIXActionView.js' => '8cf6d262', - 'rsrc/js/phuix/PHUIXAutocomplete.js' => '21dc9144', + 'rsrc/js/phuix/PHUIXAutocomplete.js' => '9196fb06', 'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'bd4c8dca', 'rsrc/js/phuix/PHUIXFormControl.js' => '8fba1997', 'rsrc/js/phuix/PHUIXIconView.js' => 'bff6884b', @@ -583,12 +584,12 @@ return array( 'javelin-behavior-dashboard-tab-panel' => 'd4eecc63', 'javelin-behavior-day-view' => '5c46cff2', 'javelin-behavior-desktop-notifications-control' => 'edd1ba66', - 'javelin-behavior-device' => 'a205cf28', + 'javelin-behavior-device' => 'b5b36110', 'javelin-behavior-differential-add-reviewers-and-ccs' => 'e10f8e18', 'javelin-behavior-differential-comment-jump' => '4fdb476d', 'javelin-behavior-differential-diff-radios' => 'e1ff79b1', 'javelin-behavior-differential-dropdown-menus' => '9a6b9324', - 'javelin-behavior-differential-edit-inline-comments' => '65ef6074', + 'javelin-behavior-differential-edit-inline-comments' => '4fbbc3e9', 'javelin-behavior-differential-feedback-preview' => 'b064af76', 'javelin-behavior-differential-keyboard-navigation' => '2c426492', 'javelin-behavior-differential-populate' => '8694b1df', @@ -649,7 +650,7 @@ return array( 'javelin-behavior-pholio-mock-view' => 'fbe497e7', 'javelin-behavior-phui-dropdown-menu' => '54733475', 'javelin-behavior-phui-object-box-tabs' => '2bfa2836', - 'javelin-behavior-phui-profile-menu' => 'bfc2e675', + 'javelin-behavior-phui-profile-menu' => '12884df9', 'javelin-behavior-policy-control' => 'ae45872f', 'javelin-behavior-policy-rule-editor' => '5e9f347c', 'javelin-behavior-project-boards' => 'ba4fa35c', @@ -682,7 +683,7 @@ return array( 'javelin-diffusion-locate-file-source' => 'b42eddc7', 'javelin-dom' => '805b806a', 'javelin-dynval' => 'f6555212', - 'javelin-event' => '85ea0626', + 'javelin-event' => '2ee659ce', 'javelin-fx' => '54b612ba', 'javelin-history' => 'd4505101', 'javelin-install' => '05270951', @@ -701,7 +702,7 @@ return array( 'javelin-router' => '29274e2b', 'javelin-scrollbar' => '087e919c', 'javelin-sound' => '949c0fe5', - 'javelin-stratcom' => '6c53634d', + 'javelin-stratcom' => '6ad39b6f', 'javelin-tokenizer' => '8d3bc1b2', 'javelin-typeahead' => '70baed2f', 'javelin-typeahead-composite-source' => '503e17fd', @@ -722,7 +723,7 @@ return array( 'javelin-workflow' => '5b2e3e2b', 'lightbox-attachment-css' => '7acac05d', 'maniphest-batch-editor' => 'b0f0b6d5', - 'maniphest-report-css' => 'f6931fdf', + 'maniphest-report-css' => '9b9580b7', 'maniphest-task-edit-css' => 'fda62a9b', 'maniphest-task-summary-css' => '11cc5344', 'multirow-row-manager' => 'b5d57730', @@ -730,13 +731,13 @@ return array( 'owners-path-editor-css' => '2f00933b', 'paste-css' => 'a5157c48', 'path-typeahead' => 'f7fc67ec', - 'people-profile-css' => 'fa2069ec', + 'people-profile-css' => '2473d929', 'phabricator-action-list-view-css' => 'c5eba19d', 'phabricator-application-launch-view-css' => '95351601', 'phabricator-busy' => '59a7976a', 'phabricator-chatlog-css' => 'd295b020', 'phabricator-content-source-view-css' => '4b8b05d4', - 'phabricator-core-css' => 'a76cefc9', + 'phabricator-core-css' => '5b3563c8', 'phabricator-countdown-css' => 'e7544472', 'phabricator-dashboard-css' => 'eb458607', 'phabricator-drag-and-drop-file-upload' => 'ad10aeac', @@ -758,7 +759,7 @@ return array( 'phabricator-object-selector-css' => '85ee8ce6', 'phabricator-phtize' => 'd254d646', 'phabricator-prefab' => 'e67df814', - 'phabricator-remarkup-css' => '64277c02', + 'phabricator-remarkup-css' => 'e1c8b32f', 'phabricator-search-results-css' => '7dea472c', 'phabricator-shaped-request' => '7cbe244b', 'phabricator-side-menu-view-css' => '3a3d9f41', @@ -792,22 +793,22 @@ return array( 'phui-action-panel-css' => '91c7b835', 'phui-badge-view-css' => 'f25c3476', 'phui-big-info-view-css' => 'bd903741', - 'phui-box-css' => '10939564', - 'phui-button-css' => '16020a60', + 'phui-box-css' => '6e8ac7fd', + 'phui-button-css' => 'd6ac72db', 'phui-calendar-css' => 'ccabe893', 'phui-calendar-day-css' => 'd1cf6f93', 'phui-calendar-list-css' => 'c1c7f338', 'phui-calendar-month-css' => '476be7e0', 'phui-crumbs-view-css' => '414406b5', 'phui-document-summary-view-css' => '9ca48bdf', - 'phui-document-view-css' => 'a4a1c3b9', + 'phui-document-view-css' => '9c71d2bf', 'phui-document-view-pro-css' => '8799acf7', 'phui-feed-story-css' => 'b7b26d23', 'phui-font-icon-base-css' => 'ecbbb4c2', 'phui-fontkit-css' => '9cda225e', 'phui-form-css' => '0b98e572', 'phui-form-view-css' => '4a1a0f5e', - 'phui-header-view-css' => '55bb32dd', + 'phui-header-view-css' => 'd53cc835', 'phui-icon-set-selector-css' => '1ab67aad', 'phui-icon-view-css' => '3f33ab57', 'phui-image-mask-css' => '5a8b09c8', @@ -816,24 +817,24 @@ return array( 'phui-inline-comment-view-css' => '0fdb3667', 'phui-list-view-css' => '9da2aa00', 'phui-object-box-css' => '407eaf5a', - 'phui-object-item-list-view-css' => '26c30d3f', + 'phui-object-item-list-view-css' => '0d484a97', 'phui-pager-css' => 'bea33d23', 'phui-pinboard-view-css' => '2495140e', - 'phui-profile-menu-css' => '43826c43', + 'phui-profile-menu-css' => 'ab4fcf5f', 'phui-property-list-view-css' => '27b2849e', 'phui-remarkup-preview-css' => '1a8f2591', 'phui-spacing-css' => '042804d6', 'phui-status-list-view-css' => '888cedb8', 'phui-tag-view-css' => 'e60e227b', - 'phui-text-css' => 'cf019f54', - 'phui-theme-css' => '981a58f8', + 'phui-theme-css' => 'ab7b848c', 'phui-timeline-view-css' => '2efceff8', - 'phui-two-column-view-css' => '39ecafb1', - 'phui-workboard-view-css' => 'f488d036', - 'phui-workpanel-view-css' => 'adec7699', + 'phui-two-column-view-css' => 'c75bfc5b', + 'phui-workboard-view-css' => 'b07a5524', + 'phui-workcard-view-css' => 'ffb55371', + 'phui-workpanel-view-css' => 'e9339dc3', 'phuix-action-list-view' => 'b5c256b8', 'phuix-action-view' => '8cf6d262', - 'phuix-autocomplete' => '21dc9144', + 'phuix-autocomplete' => '9196fb06', 'phuix-dropdown-menu' => 'bd4c8dca', 'phuix-form-control-view' => '8fba1997', 'phuix-icon-view' => 'bff6884b', @@ -841,6 +842,7 @@ return array( 'policy-edit-css' => '815c66f7', 'policy-transaction-detail-css' => '82100a43', 'ponder-view-css' => '7b0df4da', + 'project-view-css' => '22f7ed0e', 'raphael-core' => '51ee6b43', 'raphael-g' => '40dde778', 'raphael-g-line' => '40da039e', @@ -926,6 +928,11 @@ return array( 'javelin-install', 'javelin-util', ), + '12884df9' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + ), '13c739ea' => array( 'javelin-behavior', 'javelin-stratcom', @@ -999,12 +1006,6 @@ return array( 'javelin-stratcom', 'conpherence-thread-manager', ), - '21dc9144' => array( - 'javelin-install', - 'javelin-dom', - 'phuix-icon-view', - 'phabricator-prefab', - ), '2290aeef' => array( 'javelin-install', 'javelin-dom', @@ -1049,6 +1050,9 @@ return array( 'javelin-install', 'javelin-event', ), + '2ee659ce' => array( + 'javelin-install', + ), '327a00d1' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1163,6 +1167,14 @@ return array( 'phabricator-drag-and-drop-file-upload', 'phabricator-textareautils', ), + '4fbbc3e9' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-util', + 'javelin-vector', + 'differential-inline-comment-editor', + ), '4fdb476d' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1294,14 +1306,6 @@ return array( 'javelin-request', 'javelin-workflow', ), - '65ef6074' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-util', - 'javelin-vector', - 'differential-inline-comment-editor', - ), '66dd6e9e' => array( 'javelin-behavior', 'javelin-behavior-device', @@ -1315,6 +1319,12 @@ return array( '69adf288' => array( 'javelin-install', ), + '6ad39b6f' => array( + 'javelin-install', + 'javelin-event', + 'javelin-util', + 'javelin-magical-init', + ), '6b8ef10b' => array( 'javelin-install', ), @@ -1326,12 +1336,6 @@ return array( 'javelin-install', 'javelin-util', ), - '6c53634d' => array( - 'javelin-install', - 'javelin-event', - 'javelin-util', - 'javelin-magical-init', - ), '6d3e1947' => array( 'javelin-behavior', 'javelin-diffusion-locate-file-source', @@ -1445,9 +1449,6 @@ return array( 'javelin-dom', 'javelin-stratcom', ), - '85ea0626' => array( - 'javelin-install', - ), '85ee8ce6' => array( 'aphront-dialog-view-css', ), @@ -1520,6 +1521,12 @@ return array( 'javelin-dom', 'javelin-request', ), + '9196fb06' => array( + 'javelin-install', + 'javelin-dom', + 'phuix-icon-view', + 'phabricator-prefab', + ), '93d0c9e3' => array( 'javelin-behavior', 'javelin-stratcom', @@ -1595,13 +1602,6 @@ return array( 'javelin-vector', 'javelin-magical-init', ), - 'a205cf28' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - 'javelin-vector', - 'javelin-install', - ), 'a2828756' => array( 'javelin-dom', 'javelin-util', @@ -1732,6 +1732,13 @@ return array( 'javelin-dom', 'phabricator-draggable-list', ), + 'b5b36110' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-dom', + 'javelin-vector', + 'javelin-install', + ), 'b5c256b8' => array( 'javelin-install', 'javelin-dom', @@ -1774,11 +1781,6 @@ return array( 'javelin-util', 'javelin-request', ), - 'bfc2e675' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-dom', - ), 'bff6884b' => array( 'javelin-install', 'javelin-dom', @@ -1980,6 +1982,9 @@ return array( 'e6e25838' => array( 'javelin-install', ), + 'e9339dc3' => array( + 'phui-workcard-view-css', + ), 'e9581f08' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/resources/sql/autopatches/20160124.people.1.icon.sql b/resources/sql/autopatches/20160124.people.1.icon.sql new file mode 100644 index 0000000000..7cd96658d9 --- /dev/null +++ b/resources/sql/autopatches/20160124.people.1.icon.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_user.user_profile + ADD icon VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT}; diff --git a/resources/sql/autopatches/20160124.people.2.icondefault.sql b/resources/sql/autopatches/20160124.people.2.icondefault.sql new file mode 100644 index 0000000000..bf7dd24886 --- /dev/null +++ b/resources/sql/autopatches/20160124.people.2.icondefault.sql @@ -0,0 +1,2 @@ +UPDATE {$NAMESPACE}_user.user_profile + SET icon = 'person' WHERE icon = ''; diff --git a/resources/sql/autopatches/20160128.repo.1.pull.sql b/resources/sql/autopatches/20160128.repo.1.pull.sql new file mode 100644 index 0000000000..4a8ec89480 --- /dev/null +++ b/resources/sql/autopatches/20160128.repo.1.pull.sql @@ -0,0 +1,14 @@ +CREATE TABLE {$NAMESPACE}_repository.repository_pullevent ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + phid VARBINARY(64) NOT NULL, + repositoryPHID VARBINARY(64), + epoch INT UNSIGNED NOT NULL, + pullerPHID VARBINARY(64), + remoteAddress INT UNSIGNED, + remoteProtocol VARCHAR(32) COLLATE {$COLLATE_TEXT}, + resultType VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT}, + resultCode INT UNSIGNED NOT NULL, + properties LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT}, + KEY `key_repository` (repositoryPHID), + KEY `key_epoch` (epoch) +) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT}; diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 720a5d0c3c..6339e6c564 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -688,6 +688,7 @@ phutil_register_library_map(array( 'DiffusionPreCommitRefRepositoryHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefRepositoryHeraldField.php', 'DiffusionPreCommitRefRepositoryProjectsHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefRepositoryProjectsHeraldField.php', 'DiffusionPreCommitRefTypeHeraldField' => 'applications/diffusion/herald/DiffusionPreCommitRefTypeHeraldField.php', + 'DiffusionPullEventGarbageCollector' => 'applications/diffusion/DiffusionPullEventGarbageCollector.php', 'DiffusionPushCapability' => 'applications/diffusion/capability/DiffusionPushCapability.php', 'DiffusionPushEventViewController' => 'applications/diffusion/controller/DiffusionPushEventViewController.php', 'DiffusionPushLogController' => 'applications/diffusion/controller/DiffusionPushLogController.php', @@ -1524,8 +1525,6 @@ phutil_register_library_map(array( 'PHUIStatusListView' => 'view/phui/PHUIStatusListView.php', 'PHUITagExample' => 'applications/uiexample/examples/PHUITagExample.php', 'PHUITagView' => 'view/phui/PHUITagView.php', - 'PHUITextExample' => 'applications/uiexample/examples/PHUITextExample.php', - 'PHUITextView' => 'view/phui/PHUITextView.php', 'PHUITimelineEventView' => 'view/phui/PHUITimelineEventView.php', 'PHUITimelineExample' => 'applications/uiexample/examples/PHUITimelineExample.php', 'PHUITimelineView' => 'view/phui/PHUITimelineView.php', @@ -2737,6 +2736,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleEmpowerController' => 'applications/people/controller/PhabricatorPeopleEmpowerController.php', 'PhabricatorPeopleExternalPHIDType' => 'applications/people/phid/PhabricatorPeopleExternalPHIDType.php', 'PhabricatorPeopleHovercardEngineExtension' => 'applications/people/engineextension/PhabricatorPeopleHovercardEngineExtension.php', + 'PhabricatorPeopleIconSet' => 'applications/people/icon/PhabricatorPeopleIconSet.php', 'PhabricatorPeopleInviteController' => 'applications/people/controller/PhabricatorPeopleInviteController.php', 'PhabricatorPeopleInviteListController' => 'applications/people/controller/PhabricatorPeopleInviteListController.php', 'PhabricatorPeopleInviteSendController' => 'applications/people/controller/PhabricatorPeopleInviteSendController.php', @@ -2746,11 +2746,13 @@ phutil_register_library_map(array( 'PhabricatorPeopleLogSearchEngine' => 'applications/people/query/PhabricatorPeopleLogSearchEngine.php', 'PhabricatorPeopleLogsController' => 'applications/people/controller/PhabricatorPeopleLogsController.php', 'PhabricatorPeopleMainMenuBarExtension' => 'applications/people/extension/PhabricatorPeopleMainMenuBarExtension.php', + 'PhabricatorPeopleManageProfilePanel' => 'applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php', 'PhabricatorPeopleNewController' => 'applications/people/controller/PhabricatorPeopleNewController.php', 'PhabricatorPeopleNoOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleNoOwnerDatasource.php', 'PhabricatorPeopleOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleOwnerDatasource.php', 'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php', 'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php', + 'PhabricatorPeopleProfileManageController' => 'applications/people/controller/PhabricatorPeopleProfileManageController.php', 'PhabricatorPeopleProfilePanelEngine' => 'applications/people/engine/PhabricatorPeopleProfilePanelEngine.php', 'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php', 'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php', @@ -2889,7 +2891,6 @@ phutil_register_library_map(array( 'PhabricatorProjectHeraldAction' => 'applications/project/herald/PhabricatorProjectHeraldAction.php', 'PhabricatorProjectHeraldAdapter' => 'applications/project/herald/PhabricatorProjectHeraldAdapter.php', 'PhabricatorProjectHeraldFieldGroup' => 'applications/project/herald/PhabricatorProjectHeraldFieldGroup.php', - 'PhabricatorProjectHistoryController' => 'applications/project/controller/PhabricatorProjectHistoryController.php', 'PhabricatorProjectIconSet' => 'applications/project/icon/PhabricatorProjectIconSet.php', 'PhabricatorProjectIconsConfigOptionType' => 'applications/project/config/PhabricatorProjectIconsConfigOptionType.php', 'PhabricatorProjectInterface' => 'applications/project/interface/PhabricatorProjectInterface.php', @@ -2901,6 +2902,8 @@ phutil_register_library_map(array( 'PhabricatorProjectLogicalOrNotDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalOrNotDatasource.php', 'PhabricatorProjectLogicalUserDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php', 'PhabricatorProjectLogicalViewerDatasource' => 'applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php', + 'PhabricatorProjectManageController' => 'applications/project/controller/PhabricatorProjectManageController.php', + 'PhabricatorProjectManageProfilePanel' => 'applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php', 'PhabricatorProjectMaterializedMemberEdgeType' => 'applications/project/edge/PhabricatorProjectMaterializedMemberEdgeType.php', 'PhabricatorProjectMemberListView' => 'applications/project/view/PhabricatorProjectMemberListView.php', 'PhabricatorProjectMemberOfProjectEdgeType' => 'applications/project/edge/PhabricatorProjectMemberOfProjectEdgeType.php', @@ -2950,10 +2953,12 @@ phutil_register_library_map(array( 'PhabricatorProjectsEditEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php', 'PhabricatorProjectsEditField' => 'applications/transactions/editfield/PhabricatorProjectsEditField.php', 'PhabricatorProjectsFulltextEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsFulltextEngineExtension.php', + 'PhabricatorProjectsMembersSearchEngineAttachment' => 'applications/project/engineextension/PhabricatorProjectsMembersSearchEngineAttachment.php', 'PhabricatorProjectsMembershipIndexEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsMembershipIndexEngineExtension.php', 'PhabricatorProjectsPolicyRule' => 'applications/project/policyrule/PhabricatorProjectsPolicyRule.php', 'PhabricatorProjectsSearchEngineAttachment' => 'applications/project/engineextension/PhabricatorProjectsSearchEngineAttachment.php', 'PhabricatorProjectsSearchEngineExtension' => 'applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php', + 'PhabricatorProjectsWatchersSearchEngineAttachment' => 'applications/project/engineextension/PhabricatorProjectsWatchersSearchEngineAttachment.php', 'PhabricatorProtocolAdapter' => 'infrastructure/daemon/bot/adapter/PhabricatorProtocolAdapter.php', 'PhabricatorPygmentSetupCheck' => 'applications/config/check/PhabricatorPygmentSetupCheck.php', 'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php', @@ -3022,6 +3027,9 @@ phutil_register_library_map(array( 'PhabricatorRepositoryMirrorQuery' => 'applications/repository/query/PhabricatorRepositoryMirrorQuery.php', 'PhabricatorRepositoryParsedChange' => 'applications/repository/data/PhabricatorRepositoryParsedChange.php', 'PhabricatorRepositoryPullEngine' => 'applications/repository/engine/PhabricatorRepositoryPullEngine.php', + 'PhabricatorRepositoryPullEvent' => 'applications/repository/storage/PhabricatorRepositoryPullEvent.php', + 'PhabricatorRepositoryPullEventPHIDType' => 'applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php', + 'PhabricatorRepositoryPullEventQuery' => 'applications/repository/query/PhabricatorRepositoryPullEventQuery.php', 'PhabricatorRepositoryPullLocalDaemon' => 'applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php', 'PhabricatorRepositoryPushEvent' => 'applications/repository/storage/PhabricatorRepositoryPushEvent.php', 'PhabricatorRepositoryPushEventPHIDType' => 'applications/repository/phid/PhabricatorRepositoryPushEventPHIDType.php', @@ -3365,6 +3373,7 @@ phutil_register_library_map(array( 'PhabricatorUserEmail' => 'applications/people/storage/PhabricatorUserEmail.php', 'PhabricatorUserEmailTestCase' => 'applications/people/storage/__tests__/PhabricatorUserEmailTestCase.php', 'PhabricatorUserFulltextEngine' => 'applications/people/search/PhabricatorUserFulltextEngine.php', + 'PhabricatorUserIconField' => 'applications/people/customfield/PhabricatorUserIconField.php', 'PhabricatorUserLog' => 'applications/people/storage/PhabricatorUserLog.php', 'PhabricatorUserLogView' => 'applications/people/view/PhabricatorUserLogView.php', 'PhabricatorUserPHIDResolver' => 'applications/phid/resolver/PhabricatorUserPHIDResolver.php', @@ -4701,6 +4710,7 @@ phutil_register_library_map(array( 'DiffusionPreCommitRefRepositoryHeraldField' => 'DiffusionPreCommitRefHeraldField', 'DiffusionPreCommitRefRepositoryProjectsHeraldField' => 'DiffusionPreCommitRefHeraldField', 'DiffusionPreCommitRefTypeHeraldField' => 'DiffusionPreCommitRefHeraldField', + 'DiffusionPullEventGarbageCollector' => 'PhabricatorGarbageCollector', 'DiffusionPushCapability' => 'PhabricatorPolicyCapability', 'DiffusionPushEventViewController' => 'DiffusionPushLogController', 'DiffusionPushLogController' => 'DiffusionController', @@ -5690,8 +5700,6 @@ phutil_register_library_map(array( 'PHUIStatusListView' => 'AphrontTagView', 'PHUITagExample' => 'PhabricatorUIExample', 'PHUITagView' => 'AphrontTagView', - 'PHUITextExample' => 'PhabricatorUIExample', - 'PHUITextView' => 'AphrontTagView', 'PHUITimelineEventView' => 'AphrontView', 'PHUITimelineExample' => 'PhabricatorUIExample', 'PHUITimelineView' => 'AphrontView', @@ -7101,6 +7109,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleEmpowerController' => 'PhabricatorPeopleController', 'PhabricatorPeopleExternalPHIDType' => 'PhabricatorPHIDType', 'PhabricatorPeopleHovercardEngineExtension' => 'PhabricatorHovercardEngineExtension', + 'PhabricatorPeopleIconSet' => 'PhabricatorIconSet', 'PhabricatorPeopleInviteController' => 'PhabricatorPeopleController', 'PhabricatorPeopleInviteListController' => 'PhabricatorPeopleInviteController', 'PhabricatorPeopleInviteSendController' => 'PhabricatorPeopleInviteController', @@ -7110,11 +7119,13 @@ phutil_register_library_map(array( 'PhabricatorPeopleLogSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorPeopleLogsController' => 'PhabricatorPeopleController', 'PhabricatorPeopleMainMenuBarExtension' => 'PhabricatorMainMenuBarExtension', + 'PhabricatorPeopleManageProfilePanel' => 'PhabricatorProfilePanel', 'PhabricatorPeopleNewController' => 'PhabricatorPeopleController', 'PhabricatorPeopleNoOwnerDatasource' => 'PhabricatorTypeaheadDatasource', 'PhabricatorPeopleOwnerDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController', + 'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfilePanelEngine' => 'PhabricatorProfilePanelEngine', 'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController', @@ -7298,7 +7309,6 @@ phutil_register_library_map(array( 'PhabricatorProjectHeraldAction' => 'HeraldAction', 'PhabricatorProjectHeraldAdapter' => 'HeraldAdapter', 'PhabricatorProjectHeraldFieldGroup' => 'HeraldFieldGroup', - 'PhabricatorProjectHistoryController' => 'PhabricatorProjectController', 'PhabricatorProjectIconSet' => 'PhabricatorIconSet', 'PhabricatorProjectIconsConfigOptionType' => 'PhabricatorConfigJSONOptionType', 'PhabricatorProjectListController' => 'PhabricatorProjectController', @@ -7309,6 +7319,8 @@ phutil_register_library_map(array( 'PhabricatorProjectLogicalOrNotDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorProjectLogicalUserDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorProjectLogicalViewerDatasource' => 'PhabricatorTypeaheadDatasource', + 'PhabricatorProjectManageController' => 'PhabricatorProjectController', + 'PhabricatorProjectManageProfilePanel' => 'PhabricatorProfilePanel', 'PhabricatorProjectMaterializedMemberEdgeType' => 'PhabricatorEdgeType', 'PhabricatorProjectMemberListView' => 'PhabricatorProjectUserListView', 'PhabricatorProjectMemberOfProjectEdgeType' => 'PhabricatorEdgeType', @@ -7361,10 +7373,12 @@ phutil_register_library_map(array( 'PhabricatorProjectsEditEngineExtension' => 'PhabricatorEditEngineExtension', 'PhabricatorProjectsEditField' => 'PhabricatorTokenizerEditField', 'PhabricatorProjectsFulltextEngineExtension' => 'PhabricatorFulltextEngineExtension', + 'PhabricatorProjectsMembersSearchEngineAttachment' => 'PhabricatorSearchEngineAttachment', 'PhabricatorProjectsMembershipIndexEngineExtension' => 'PhabricatorIndexEngineExtension', 'PhabricatorProjectsPolicyRule' => 'PhabricatorPolicyRule', 'PhabricatorProjectsSearchEngineAttachment' => 'PhabricatorSearchEngineAttachment', 'PhabricatorProjectsSearchEngineExtension' => 'PhabricatorSearchEngineExtension', + 'PhabricatorProjectsWatchersSearchEngineAttachment' => 'PhabricatorSearchEngineAttachment', 'PhabricatorProtocolAdapter' => 'Phobject', 'PhabricatorPygmentSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorQuery' => 'Phobject', @@ -7463,6 +7477,12 @@ phutil_register_library_map(array( 'PhabricatorRepositoryMirrorQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorRepositoryParsedChange' => 'Phobject', 'PhabricatorRepositoryPullEngine' => 'PhabricatorRepositoryEngine', + 'PhabricatorRepositoryPullEvent' => array( + 'PhabricatorRepositoryDAO', + 'PhabricatorPolicyInterface', + ), + 'PhabricatorRepositoryPullEventPHIDType' => 'PhabricatorPHIDType', + 'PhabricatorRepositoryPullEventQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorRepositoryPullLocalDaemon' => 'PhabricatorDaemon', 'PhabricatorRepositoryPushEvent' => array( 'PhabricatorRepositoryDAO', @@ -7851,6 +7871,7 @@ phutil_register_library_map(array( 'PhabricatorUserEmail' => 'PhabricatorUserDAO', 'PhabricatorUserEmailTestCase' => 'PhabricatorTestCase', 'PhabricatorUserFulltextEngine' => 'PhabricatorFulltextEngine', + 'PhabricatorUserIconField' => 'PhabricatorUserCustomField', 'PhabricatorUserLog' => array( 'PhabricatorUserDAO', 'PhabricatorPolicyInterface', diff --git a/src/applications/almanac/application/PhabricatorAlmanacApplication.php b/src/applications/almanac/application/PhabricatorAlmanacApplication.php index 88eafd3331..a444554a0e 100644 --- a/src/applications/almanac/application/PhabricatorAlmanacApplication.php +++ b/src/applications/almanac/application/PhabricatorAlmanacApplication.php @@ -14,7 +14,7 @@ final class PhabricatorAlmanacApplication extends PhabricatorApplication { return pht('Service Directory'); } - public function getFontIcon() { + public function getIcon() { return 'fa-server'; } diff --git a/src/applications/almanac/controller/AlmanacConsoleController.php b/src/applications/almanac/controller/AlmanacConsoleController.php index 8abd8c6113..9f46bd54d3 100644 --- a/src/applications/almanac/controller/AlmanacConsoleController.php +++ b/src/applications/almanac/controller/AlmanacConsoleController.php @@ -16,21 +16,21 @@ final class AlmanacConsoleController extends AlmanacController { id(new PHUIObjectItemView()) ->setHeader(pht('Services')) ->setHref($this->getApplicationURI('service/')) - ->setFontIcon('fa-plug') + ->setIcon('fa-plug') ->addAttribute(pht('Manage Almanac services.'))); $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Devices')) ->setHref($this->getApplicationURI('device/')) - ->setFontIcon('fa-server') + ->setIcon('fa-server') ->addAttribute(pht('Manage Almanac devices.'))); $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Networks')) ->setHref($this->getApplicationURI('network/')) - ->setFontIcon('fa-globe') + ->setIcon('fa-globe') ->addAttribute(pht('Manage Almanac networks.'))); $crumbs = $this->buildApplicationCrumbs(); diff --git a/src/applications/almanac/controller/AlmanacController.php b/src/applications/almanac/controller/AlmanacController.php index 8efae11d6a..e1a7c2a69e 100644 --- a/src/applications/almanac/controller/AlmanacController.php +++ b/src/applications/almanac/controller/AlmanacController.php @@ -33,7 +33,7 @@ abstract class AlmanacController Javelin::initBehavior('phabricator-tooltips', array()); $icon_builtin = id(new PHUIIconView()) - ->setIconFont('fa-circle') + ->setIcon('fa-circle') ->addSigil('has-tooltip') ->setMetadata( array( @@ -42,7 +42,7 @@ abstract class AlmanacController )); $icon_custom = id(new PHUIIconView()) - ->setIconFont('fa-circle-o grey') + ->setIcon('fa-circle-o grey') ->addSigil('has-tooltip') ->setMetadata( array( @@ -166,9 +166,7 @@ abstract class AlmanacController ->setWorkflow(true) ->setDisabled(!$can_edit) ->setText(pht('Add Property')) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-plus')); + ->setIcon('fa-plus'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Properties')) diff --git a/src/applications/almanac/controller/AlmanacDeviceViewController.php b/src/applications/almanac/controller/AlmanacDeviceViewController.php index e611cceb7a..c7756c5b25 100644 --- a/src/applications/almanac/controller/AlmanacDeviceViewController.php +++ b/src/applications/almanac/controller/AlmanacDeviceViewController.php @@ -132,9 +132,7 @@ final class AlmanacDeviceViewController ->setWorkflow(!$can_edit) ->setDisabled(!$can_edit) ->setText(pht('Add Interface')) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-plus'))); + ->setIcon('fa-plus')); return id(new PHUIObjectBoxView()) ->setHeader($header) @@ -185,7 +183,7 @@ final class AlmanacDeviceViewController ->setText(pht('Generate Keypair')) ->setIcon( id(new PHUIIconView()) - ->setIconFont('fa-lock'))) + ->setIcon('fa-lock'))) ->addActionLink( id(new PHUIButtonView()) ->setTag('a') @@ -195,7 +193,7 @@ final class AlmanacDeviceViewController ->setText(pht('Upload Public Key')) ->setIcon( id(new PHUIIconView()) - ->setIconFont('fa-upload'))); + ->setIcon('fa-upload'))); return id(new PHUIObjectBoxView()) ->setHeader($header) @@ -221,7 +219,7 @@ final class AlmanacDeviceViewController $handles = $viewer->loadHandles(mpull($services, 'getPHID')); $icon_lock = id(new PHUIIconView()) - ->setIconFont('fa-lock'); + ->setIcon('fa-lock'); $rows = array(); foreach ($services as $service) { diff --git a/src/applications/almanac/controller/AlmanacServiceViewController.php b/src/applications/almanac/controller/AlmanacServiceViewController.php index bfeed96e2f..113722bf06 100644 --- a/src/applications/almanac/controller/AlmanacServiceViewController.php +++ b/src/applications/almanac/controller/AlmanacServiceViewController.php @@ -134,9 +134,7 @@ final class AlmanacServiceViewController ->setWorkflow(!$can_edit) ->setDisabled(!$can_edit) ->setText(pht('Add Binding')) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-plus'))); + ->setIcon('fa-plus')); return id(new PHUIObjectBoxView()) ->setHeader($header) diff --git a/src/applications/audit/application/PhabricatorAuditApplication.php b/src/applications/audit/application/PhabricatorAuditApplication.php index 4f4c5a56d1..66280a16a0 100644 --- a/src/applications/audit/application/PhabricatorAuditApplication.php +++ b/src/applications/audit/application/PhabricatorAuditApplication.php @@ -6,7 +6,7 @@ final class PhabricatorAuditApplication extends PhabricatorApplication { return '/audit/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-check-circle-o'; } diff --git a/src/applications/auth/application/PhabricatorAuthApplication.php b/src/applications/auth/application/PhabricatorAuthApplication.php index a9831b20e3..808562e970 100644 --- a/src/applications/auth/application/PhabricatorAuthApplication.php +++ b/src/applications/auth/application/PhabricatorAuthApplication.php @@ -10,7 +10,7 @@ final class PhabricatorAuthApplication extends PhabricatorApplication { return '/auth/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-key'; } diff --git a/src/applications/auth/controller/config/PhabricatorAuthListController.php b/src/applications/auth/controller/config/PhabricatorAuthListController.php index 71aac9e185..6df32f50a5 100644 --- a/src/applications/auth/controller/config/PhabricatorAuthListController.php +++ b/src/applications/auth/controller/config/PhabricatorAuthListController.php @@ -147,13 +147,11 @@ final class PhabricatorAuthListController ->setSeverity($severity) ->setErrors($issues); - $image = id(new PHUIIconView()) - ->setIconFont('fa-plus'); $button = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::SIMPLE) ->setHref($this->getApplicationURI('config/new/')) - ->setIcon($image) + ->setIcon('fa-plus') ->setDisabled(!$can_manage) ->setText(pht('Add Provider')); diff --git a/src/applications/auth/data/PhabricatorAuthInviteAction.php b/src/applications/auth/data/PhabricatorAuthInviteAction.php index 10b625642a..8b6b61aa30 100644 --- a/src/applications/auth/data/PhabricatorAuthInviteAction.php +++ b/src/applications/auth/data/PhabricatorAuthInviteAction.php @@ -88,7 +88,7 @@ final class PhabricatorAuthInviteAction extends Phobject { } return id(new PHUIIconView()) - ->setIconFont("{$icon} {$color}"); + ->setIcon("{$icon} {$color}"); } public static function newActionListFromAddresses( diff --git a/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php b/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php index ee7f5756ae..e19a35fce6 100644 --- a/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php +++ b/src/applications/auth/view/PhabricatorAuthSSHKeyTableView.php @@ -45,9 +45,9 @@ final class PhabricatorAuthSSHKeyTableView extends AphrontView { } $trusted_icon = id(new PHUIIconView()) - ->setIconFont('fa-star blue'); + ->setIcon('fa-star blue'); $untrusted_icon = id(new PHUIIconView()) - ->setIconFont('fa-times grey'); + ->setIcon('fa-times grey'); $rows = array(); foreach ($keys as $key) { diff --git a/src/applications/badges/application/PhabricatorBadgesApplication.php b/src/applications/badges/application/PhabricatorBadgesApplication.php index dea41ac244..887a11833d 100644 --- a/src/applications/badges/application/PhabricatorBadgesApplication.php +++ b/src/applications/badges/application/PhabricatorBadgesApplication.php @@ -14,7 +14,7 @@ final class PhabricatorBadgesApplication extends PhabricatorApplication { return pht('Achievements and Notority'); } - public function getFontIcon() { + public function getIcon() { return 'fa-trophy'; } diff --git a/src/applications/badges/query/PhabricatorBadgesSearchEngine.php b/src/applications/badges/query/PhabricatorBadgesSearchEngine.php index ab8432833e..4bad4d2c65 100644 --- a/src/applications/badges/query/PhabricatorBadgesSearchEngine.php +++ b/src/applications/badges/query/PhabricatorBadgesSearchEngine.php @@ -147,7 +147,7 @@ final class PhabricatorBadgesSearchEngine ->setHref('/badges/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 0ed4917800..0bbb38ff89 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -155,7 +155,7 @@ abstract class PhabricatorApplication return null; } - public function getFontIcon() { + public function getIcon() { return 'fa-puzzle-piece'; } diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index a1720bb5d5..e6997d97ab 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -352,7 +352,7 @@ abstract class PhabricatorController extends AphrontController { $application = $this->getCurrentApplication(); if ($application) { - $icon = $application->getFontIcon(); + $icon = $application->getIcon(); if (!$icon) { $icon = 'fa-puzzle'; } @@ -400,7 +400,7 @@ abstract class PhabricatorController extends AphrontController { } $icon = id(new PHUIIconView()) - ->setIconFont($icon_name); + ->setIcon($icon_name); require_celerity_resource('policy-css'); diff --git a/src/applications/calendar/application/PhabricatorCalendarApplication.php b/src/applications/calendar/application/PhabricatorCalendarApplication.php index 1f8ea57383..cf05e96666 100644 --- a/src/applications/calendar/application/PhabricatorCalendarApplication.php +++ b/src/applications/calendar/application/PhabricatorCalendarApplication.php @@ -18,7 +18,7 @@ final class PhabricatorCalendarApplication extends PhabricatorApplication { return '/calendar/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-calendar'; } diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php index 43386fe0d6..f423860a3b 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php @@ -125,16 +125,14 @@ final class PhabricatorCalendarEventViewController if ($is_invite_pending) { $decline_button = id(new PHUIButtonView()) ->setTag('a') - ->setIcon(id(new PHUIIconView()) - ->setIconFont('fa-times grey')) + ->setIcon('fa-times grey') ->setHref($this->getApplicationURI("/event/decline/{$id}/")) ->setWorkflow(true) ->setText(pht('Decline')); $accept_button = id(new PHUIButtonView()) ->setTag('a') - ->setIcon(id(new PHUIIconView()) - ->setIconFont('fa-check green')) + ->setIcon('fa-check green') ->setHref($this->getApplicationURI("/event/accept/{$id}/")) ->setWorkflow(true) ->setText(pht('Accept')); diff --git a/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php b/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php index 94246e23c7..a47d4a65e4 100644 --- a/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php +++ b/src/applications/celerity/postprocessor/CelerityDefaultPostprocessor.php @@ -63,7 +63,7 @@ final class CelerityDefaultPostprocessor 'violet' => '#8e44ad', 'lightviolet' => '#ecdff1', 'charcoal' => '#4b4d51', - 'backdrop' => '#dadee7', + 'backdrop' => '#c4cde0', 'hoverwhite' => 'rgba(255,255,255,.6)', 'hovergrey' => '#c5cbcf', 'hoverblue' => '#eceff5', @@ -185,20 +185,15 @@ final class CelerityDefaultPostprocessor 'sh-disabledtext' => '#a6a6a6', 'sh-disabledbackground' => '#f3f3f3', - // Background color for "light" themes. - 'page.background.light' => '#f7f7f7', + // Background color for "most" themes. + 'page.background' => '#f1f1f4', // Background color for "dark" themes. 'page.background.dark' => '#ebecee', - // This is the base background color. - 'menu.profile.background' => '#525867', - 'menu.profile.background.hover' => '#464b58', - 'menu.profile.background.selected' => '#393d48', - - 'menu.profile.text' => '#c6c7cb', - 'menu.profile.text.selected' => '#ffffff', - 'menu.profile.icon.disabled' => '#b9bcc2', + 'menu.profile.text' => 'rgba(255,255,255,.8)', + 'menu.profile.text.selected' => 'rgba(255,255,255,1)', + 'menu.profile.icon.disabled' => 'rgba(255,255,255,.4)', 'menu.main.height' => '44px', diff --git a/src/applications/chatlog/application/PhabricatorChatLogApplication.php b/src/applications/chatlog/application/PhabricatorChatLogApplication.php index b2023ce07c..912ddd9b6b 100644 --- a/src/applications/chatlog/application/PhabricatorChatLogApplication.php +++ b/src/applications/chatlog/application/PhabricatorChatLogApplication.php @@ -14,7 +14,7 @@ final class PhabricatorChatLogApplication extends PhabricatorApplication { return pht('(Deprecated)'); } - public function getFontIcon() { + public function getIcon() { return 'fa-coffee'; } diff --git a/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php b/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php index 8084356ced..fe505ecf60 100644 --- a/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php +++ b/src/applications/chatlog/controller/PhabricatorChatLogChannelLogController.php @@ -213,7 +213,7 @@ final class PhabricatorChatLogChannelLogController ->setTag('a') ->setHref('#latest') ->setText(pht('Jump to Bottom')) - ->setIconFont('fa-arrow-circle-down'); + ->setIcon('fa-arrow-circle-down'); $jump_target = phutil_tag( 'div', diff --git a/src/applications/conduit/application/PhabricatorConduitApplication.php b/src/applications/conduit/application/PhabricatorConduitApplication.php index 7a0ca0e4b9..a036860aad 100644 --- a/src/applications/conduit/application/PhabricatorConduitApplication.php +++ b/src/applications/conduit/application/PhabricatorConduitApplication.php @@ -6,7 +6,7 @@ final class PhabricatorConduitApplication extends PhabricatorApplication { return '/conduit/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-tty'; } diff --git a/src/applications/conduit/query/PhabricatorConduitLogSearchEngine.php b/src/applications/conduit/query/PhabricatorConduitLogSearchEngine.php index 7f1adf1c1a..f5d203c772 100644 --- a/src/applications/conduit/query/PhabricatorConduitLogSearchEngine.php +++ b/src/applications/conduit/query/PhabricatorConduitLogSearchEngine.php @@ -140,7 +140,7 @@ final class PhabricatorConduitLogSearchEngine break; case ConduitAPIMethod::METHOD_STATUS_UNSTABLE: $status = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle yellow') + ->setIcon('fa-exclamation-triangle yellow') ->addSigil('has-tooltip') ->setMetadata( array( @@ -149,7 +149,7 @@ final class PhabricatorConduitLogSearchEngine break; case ConduitAPIMethod::METHOD_STATUS_DEPRECATED: $status = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle red') + ->setIcon('fa-exclamation-triangle red') ->addSigil('has-tooltip') ->setMetadata( array( @@ -158,7 +158,7 @@ final class PhabricatorConduitLogSearchEngine break; default: $status = id(new PHUIIconView()) - ->setIconFont('fa-question-circle') + ->setIcon('fa-question-circle') ->addSigil('has-tooltip') ->setMetadata( array( diff --git a/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php b/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php index b41e689d37..6f315783cc 100644 --- a/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php +++ b/src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php @@ -87,23 +87,19 @@ final class PhabricatorConduitTokensSettingsPanel 'action', )); - $generate_icon = id(new PHUIIconView()) - ->setIconFont('fa-plus'); $generate_button = id(new PHUIButtonView()) ->setText(pht('Generate API Token')) ->setHref('/conduit/token/edit/?objectPHID='.$user->getPHID()) ->setTag('a') ->setWorkflow(true) - ->setIcon($generate_icon); + ->setIcon('fa-plus'); - $terminate_icon = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle'); $terminate_button = id(new PHUIButtonView()) ->setText(pht('Terminate All Tokens')) ->setHref('/conduit/token/terminate/?objectPHID='.$user->getPHID()) ->setTag('a') ->setWorkflow(true) - ->setIcon($terminate_icon); + ->setIcon('fa-exclamation-triangle'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Active API Tokens')) diff --git a/src/applications/config/application/PhabricatorConfigApplication.php b/src/applications/config/application/PhabricatorConfigApplication.php index 36bac1d25b..8570484e31 100644 --- a/src/applications/config/application/PhabricatorConfigApplication.php +++ b/src/applications/config/application/PhabricatorConfigApplication.php @@ -6,7 +6,7 @@ final class PhabricatorConfigApplication extends PhabricatorApplication { return '/config/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-sliders'; } diff --git a/src/applications/config/controller/PhabricatorConfigCacheController.php b/src/applications/config/controller/PhabricatorConfigCacheController.php index 90c1b3a2fd..67fbf6e120 100644 --- a/src/applications/config/controller/PhabricatorConfigCacheController.php +++ b/src/applications/config/controller/PhabricatorConfigCacheController.php @@ -39,15 +39,12 @@ final class PhabricatorConfigCacheController $this->renderCommonProperties($properties, $cache); - $purge_icon = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle'); - $purge_button = id(new PHUIButtonView()) ->setText(pht('Purge Caches')) ->setHref('/config/cache/purge/') ->setTag('a') ->setWorkflow(true) - ->setIcon($purge_icon); + ->setIcon('fa-exclamation-triangle'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Opcode Cache')) @@ -161,7 +158,7 @@ final class PhabricatorConfigCacheController private function renderYes($info) { return array( - id(new PHUIIconView())->setIconFont('fa-check', 'green'), + id(new PHUIIconView())->setIcon('fa-check', 'green'), ' ', $info, ); @@ -169,7 +166,7 @@ final class PhabricatorConfigCacheController private function renderNo($info) { return array( - id(new PHUIIconView())->setIconFont('fa-times-circle', 'red'), + id(new PHUIIconView())->setIcon('fa-times-circle', 'red'), ' ', $info, ); @@ -177,7 +174,7 @@ final class PhabricatorConfigCacheController private function renderInfo($info) { return array( - id(new PHUIIconView())->setIconFont('fa-info-circle', 'grey'), + id(new PHUIIconView())->setIcon('fa-info-circle', 'grey'), ' ', $info, ); diff --git a/src/applications/config/controller/PhabricatorConfigDatabaseController.php b/src/applications/config/controller/PhabricatorConfigDatabaseController.php index ccd18367b2..225312a52f 100644 --- a/src/applications/config/controller/PhabricatorConfigDatabaseController.php +++ b/src/applications/config/controller/PhabricatorConfigDatabaseController.php @@ -36,7 +36,7 @@ abstract class PhabricatorConfigDatabaseController } return id(new PHUIIconView()) - ->setIconFont($icon); + ->setIcon($icon); } protected function renderAttr($attr, $issue) { @@ -71,9 +71,7 @@ abstract class PhabricatorConfigDatabaseController ->addActionLink( id(new PHUIButtonView()) ->setTag('a') - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-book')) + ->setIcon('fa-book') ->setHref($doc_link) ->setText(pht('Learn More'))); } diff --git a/src/applications/config/controller/PhabricatorConfigEditController.php b/src/applications/config/controller/PhabricatorConfigEditController.php index 370ba01f37..0c93c86f09 100644 --- a/src/applications/config/controller/PhabricatorConfigEditController.php +++ b/src/applications/config/controller/PhabricatorConfigEditController.php @@ -104,22 +104,43 @@ final class PhabricatorConfigEditController if ($errors) { $error_view = id(new PHUIInfoView()) ->setErrors($errors); - } else if ($option->getHidden()) { - $msg = pht( + } + + $status_items = array(); + if ($option->getHidden()) { + $message = pht( 'This configuration is hidden and can not be edited or viewed from '. 'the web interface.'); - $error_view = id(new PHUIInfoView()) - ->setTitle(pht('Configuration Hidden')) - ->setSeverity(PHUIInfoView::SEVERITY_WARNING) - ->appendChild(phutil_tag('p', array(), $msg)); + $status_items[] = id(new PHUIStatusItemView()) + ->setIcon('fa-eye-slash red') + ->setTarget(phutil_tag('strong', array(), pht('Configuration Hidden'))) + ->setNote($message); } else if ($option->getLocked()) { + $message = $option->getLockedMessage(); - $msg = $option->getLockedMessage(); - $error_view = id(new PHUIInfoView()) - ->setTitle(pht('Configuration Locked')) - ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) - ->appendChild(phutil_tag('p', array(), $msg)); + $status_items[] = id(new PHUIStatusItemView()) + ->setIcon('fa-lock red') + ->setTarget(phutil_tag('strong', array(), pht('Configuration Locked'))) + ->setNote($message); + } + + if ($status_items) { + $doc_href = PhabricatorEnv::getDoclink( + 'Configuration Guide: Locked and Hidden Configuration'); + + $doc_link = phutil_tag( + 'a', + array( + 'href' => $doc_href, + 'target' => '_blank', + ), + pht('Configuration Guide: Locked and Hidden Configuration')); + + $status_items[] = id(new PHUIStatusItemView()) + ->setIcon('fa-book') + ->setTarget(phutil_tag('strong', array(), pht('Learn More'))) + ->setNote($doc_link); } if ($option->getHidden() || $option->getLocked()) { @@ -144,11 +165,30 @@ final class PhabricatorConfigEditController $form ->setUser($viewer) - ->addHiddenInput('issue', $request->getStr('issue')) - ->appendChild( + ->addHiddenInput('issue', $request->getStr('issue')); + + if ($status_items) { + $status_view = id(new PHUIStatusListView()); + + foreach ($status_items as $status_item) { + $status_view->addItem($status_item); + } + + $form->appendControl( id(new AphrontFormMarkupControl()) - ->setLabel(pht('Description')) - ->setValue($description)); + ->setValue($status_view)); + } + + $description = $option->getDescription(); + if (strlen($description)) { + $description_view = new PHUIRemarkupView($viewer, $description); + + $form + ->appendChild( + id(new AphrontFormMarkupControl()) + ->setLabel(pht('Description')) + ->setValue($description_view)); + } if ($group) { $extra = $group->renderContextualDescription( @@ -195,7 +235,7 @@ final class PhabricatorConfigEditController ->setForm($form); if ($error_view) { - $form_box->setInfoView($error_view); + $form_box->setInfoView($error_view); } $crumbs = $this->buildApplicationCrumbs(); diff --git a/src/applications/config/controller/PhabricatorConfigListController.php b/src/applications/config/controller/PhabricatorConfigListController.php index 6a1823ecda..9e87995ebc 100644 --- a/src/applications/config/controller/PhabricatorConfigListController.php +++ b/src/applications/config/controller/PhabricatorConfigListController.php @@ -53,7 +53,7 @@ final class PhabricatorConfigListController ->setHeader($group->getName()) ->setHref('/config/group/'.$group->getKey().'/') ->addAttribute($group->getDescription()) - ->setFontIcon($group->getFontIcon()); + ->setIcon($group->getIcon()); $list->addItem($item); } } diff --git a/src/applications/config/controller/PhabricatorConfigWelcomeController.php b/src/applications/config/controller/PhabricatorConfigWelcomeController.php index 11e07b96c0..e2d868082a 100644 --- a/src/applications/config/controller/PhabricatorConfigWelcomeController.php +++ b/src/applications/config/controller/PhabricatorConfigWelcomeController.php @@ -374,7 +374,7 @@ final class PhabricatorConfigWelcomeController $viewer = $request->getUser(); $icon = id(new PHUIIconView()) - ->setIconFont($icon.' fa-2x'); + ->setIcon($icon.' fa-2x'); $content = PhabricatorMarkupEngine::renderOneObject( id(new PhabricatorMarkupOneOff())->setContent($content), diff --git a/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php b/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php index 97586a77dd..f6d40a5126 100644 --- a/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php +++ b/src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php @@ -141,9 +141,10 @@ final class PhabricatorConfigManagementSetWorkflow if ($option->getLocked() && $use_database) { throw new PhutilArgumentUsageException( pht( - "Config key '%s' is locked and can only be set in local ". - "configuration.", - $key)); + 'Config key "%s" is locked and can only be set in local '. + 'configuration. To learn more, see "%s" in the documentation.', + $key, + pht('Configuration Guide: Locked and Hidden Configuration'))); } try { diff --git a/src/applications/config/module/PhabricatorConfigPHIDModule.php b/src/applications/config/module/PhabricatorConfigPHIDModule.php index 4c5c09f9c3..cd7d0e0092 100644 --- a/src/applications/config/module/PhabricatorConfigPHIDModule.php +++ b/src/applications/config/module/PhabricatorConfigPHIDModule.php @@ -23,9 +23,9 @@ final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule { $app = PhabricatorApplication::getByClass($class_name); $app_name = $app->getName(); - $icon = $app->getFontIcon(); + $icon = $app->getIcon(); if ($icon) { - $app_icon = id(new PHUIIconView())->setIconFont($icon); + $app_icon = id(new PHUIIconView())->setIcon($icon); } else { $app_icon = null; } @@ -36,7 +36,7 @@ final class PhabricatorConfigPHIDModule extends PhabricatorConfigModule { $icon = $type->getTypeIcon(); if ($icon) { - $type_icon = id(new PHUIIconView())->setIconFont($icon); + $type_icon = id(new PHUIIconView())->setIcon($icon); } else { $type_icon = null; } diff --git a/src/applications/config/option/PhabricatorAWSConfigOptions.php b/src/applications/config/option/PhabricatorAWSConfigOptions.php index af328ba0af..faed807ae3 100644 --- a/src/applications/config/option/PhabricatorAWSConfigOptions.php +++ b/src/applications/config/option/PhabricatorAWSConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorAWSConfigOptions return pht('Configure integration with AWS (EC2, SES, S3, etc).'); } - public function getFontIcon() { + public function getIcon() { return 'fa-server'; } diff --git a/src/applications/config/option/PhabricatorAccessLogConfigOptions.php b/src/applications/config/option/PhabricatorAccessLogConfigOptions.php index 5bc55f64a7..6183f9936f 100644 --- a/src/applications/config/option/PhabricatorAccessLogConfigOptions.php +++ b/src/applications/config/option/PhabricatorAccessLogConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorAccessLogConfigOptions return pht('Configure the access logs, which log HTTP/SSH requests.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-list'; } diff --git a/src/applications/config/option/PhabricatorApplicationConfigOptions.php b/src/applications/config/option/PhabricatorApplicationConfigOptions.php index 491852eab6..dab28af776 100644 --- a/src/applications/config/option/PhabricatorApplicationConfigOptions.php +++ b/src/applications/config/option/PhabricatorApplicationConfigOptions.php @@ -7,7 +7,7 @@ abstract class PhabricatorApplicationConfigOptions extends Phobject { abstract public function getGroup(); abstract public function getOptions(); - public function getFontIcon() { + public function getIcon() { return 'fa-sliders'; } diff --git a/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php b/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php index 8092f52ff8..bd1c8965eb 100644 --- a/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php +++ b/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorAuthenticationConfigOptions return pht('Options relating to authentication.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-key'; } diff --git a/src/applications/config/option/PhabricatorClusterConfigOptions.php b/src/applications/config/option/PhabricatorClusterConfigOptions.php index 8684d98233..0b7974904c 100644 --- a/src/applications/config/option/PhabricatorClusterConfigOptions.php +++ b/src/applications/config/option/PhabricatorClusterConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorClusterConfigOptions return pht('Configure Phabricator to run on a cluster of hosts.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-sitemap'; } diff --git a/src/applications/config/option/PhabricatorCoreConfigOptions.php b/src/applications/config/option/PhabricatorCoreConfigOptions.php index 7f696ae48c..c486ce0db1 100644 --- a/src/applications/config/option/PhabricatorCoreConfigOptions.php +++ b/src/applications/config/option/PhabricatorCoreConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorCoreConfigOptions return pht('Configure core options, including URIs.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-bullseye'; } diff --git a/src/applications/config/option/PhabricatorDeveloperConfigOptions.php b/src/applications/config/option/PhabricatorDeveloperConfigOptions.php index 37cf752f68..a84a7484a6 100644 --- a/src/applications/config/option/PhabricatorDeveloperConfigOptions.php +++ b/src/applications/config/option/PhabricatorDeveloperConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorDeveloperConfigOptions return pht('Options for Phabricator developers, including debugging.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-bug'; } diff --git a/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php b/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php index ef07bc9109..28a0f619dd 100644 --- a/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php +++ b/src/applications/config/option/PhabricatorExtendingPhabricatorConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorExtendingPhabricatorConfigOptions return pht('Make Phabricator even cooler!'); } - public function getFontIcon() { + public function getIcon() { return 'fa-rocket'; } diff --git a/src/applications/config/option/PhabricatorMailgunConfigOptions.php b/src/applications/config/option/PhabricatorMailgunConfigOptions.php index aebcba6725..cc4e71fb59 100644 --- a/src/applications/config/option/PhabricatorMailgunConfigOptions.php +++ b/src/applications/config/option/PhabricatorMailgunConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorMailgunConfigOptions return pht('Configure Mailgun integration.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-send-o'; } diff --git a/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php b/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php index 929f02be2d..16bdb7e520 100644 --- a/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php +++ b/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorMetaMTAConfigOptions return pht('Configure Mail.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-send'; } diff --git a/src/applications/config/option/PhabricatorMySQLConfigOptions.php b/src/applications/config/option/PhabricatorMySQLConfigOptions.php index e3cd480e21..28fa78d2ab 100644 --- a/src/applications/config/option/PhabricatorMySQLConfigOptions.php +++ b/src/applications/config/option/PhabricatorMySQLConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorMySQLConfigOptions return pht('Database configuration.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-database'; } diff --git a/src/applications/config/option/PhabricatorNotificationConfigOptions.php b/src/applications/config/option/PhabricatorNotificationConfigOptions.php index f43f2af32a..7b6acf4ec7 100644 --- a/src/applications/config/option/PhabricatorNotificationConfigOptions.php +++ b/src/applications/config/option/PhabricatorNotificationConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorNotificationConfigOptions return pht('Configure real-time notifications.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-bell'; } diff --git a/src/applications/config/option/PhabricatorPHDConfigOptions.php b/src/applications/config/option/PhabricatorPHDConfigOptions.php index 6fecd7117f..bfe7c148c4 100644 --- a/src/applications/config/option/PhabricatorPHDConfigOptions.php +++ b/src/applications/config/option/PhabricatorPHDConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPHDConfigOptions return pht('Options relating to PHD (daemons).'); } - public function getFontIcon() { + public function getIcon() { return 'fa-pied-piper-alt'; } diff --git a/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php b/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php index b2d5c91e91..6b999b0d55 100644 --- a/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php +++ b/src/applications/config/option/PhabricatorPHPMailerConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPHPMailerConfigOptions return pht('Configure PHPMailer.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-send-o'; } diff --git a/src/applications/config/option/PhabricatorPhurlConfigOptions.php b/src/applications/config/option/PhabricatorPhurlConfigOptions.php index 726540d3dd..69e3dd6769 100644 --- a/src/applications/config/option/PhabricatorPhurlConfigOptions.php +++ b/src/applications/config/option/PhabricatorPhurlConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPhurlConfigOptions return pht('Options for Phurl.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-link'; } diff --git a/src/applications/config/option/PhabricatorRecaptchaConfigOptions.php b/src/applications/config/option/PhabricatorRecaptchaConfigOptions.php index 576ac18913..356bcfd4dd 100644 --- a/src/applications/config/option/PhabricatorRecaptchaConfigOptions.php +++ b/src/applications/config/option/PhabricatorRecaptchaConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorRecaptchaConfigOptions return pht('Configure Recaptcha captchas.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-recycle'; } diff --git a/src/applications/config/option/PhabricatorSMSConfigOptions.php b/src/applications/config/option/PhabricatorSMSConfigOptions.php index 33b75c263f..08f2e50ee1 100644 --- a/src/applications/config/option/PhabricatorSMSConfigOptions.php +++ b/src/applications/config/option/PhabricatorSMSConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorSMSConfigOptions return pht('Configure SMS.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-mobile'; } diff --git a/src/applications/config/option/PhabricatorSecurityConfigOptions.php b/src/applications/config/option/PhabricatorSecurityConfigOptions.php index 8baea2e664..8c9907d736 100644 --- a/src/applications/config/option/PhabricatorSecurityConfigOptions.php +++ b/src/applications/config/option/PhabricatorSecurityConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorSecurityConfigOptions return pht('Security options.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-lock'; } diff --git a/src/applications/config/option/PhabricatorSendGridConfigOptions.php b/src/applications/config/option/PhabricatorSendGridConfigOptions.php index c740792a7a..0baa7390af 100644 --- a/src/applications/config/option/PhabricatorSendGridConfigOptions.php +++ b/src/applications/config/option/PhabricatorSendGridConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorSendGridConfigOptions return pht('Configure SendGrid integration.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-send-o'; } diff --git a/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php b/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php index 3a5305dde6..41133d5ede 100644 --- a/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php +++ b/src/applications/config/option/PhabricatorSyntaxHighlightingConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorSyntaxHighlightingConfigOptions return pht('Options relating to syntax highlighting source code.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-code'; } @@ -102,9 +102,8 @@ final class PhabricatorSyntaxHighlightingConfigOptions 'python' => 'Python', 'rainbow' => 'Rainbow', 'remarkup' => 'Remarkup', - 'rest' => 'reStructuredText', - 'robotframework' => 'RobotFramework', 'rst' => 'reStructuredText', + 'robotframework' => 'RobotFramework', 'ruby' => 'Ruby', 'sql' => 'SQL', 'tex' => 'LaTeX', diff --git a/src/applications/config/option/PhabricatorTranslationsConfigOptions.php b/src/applications/config/option/PhabricatorTranslationsConfigOptions.php index aa7b9a2b32..c82e7901bc 100644 --- a/src/applications/config/option/PhabricatorTranslationsConfigOptions.php +++ b/src/applications/config/option/PhabricatorTranslationsConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorTranslationsConfigOptions return pht('Options relating to translations.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-globe'; } diff --git a/src/applications/config/option/PhabricatorUIConfigOptions.php b/src/applications/config/option/PhabricatorUIConfigOptions.php index 6b94cf1795..e73b4ee780 100644 --- a/src/applications/config/option/PhabricatorUIConfigOptions.php +++ b/src/applications/config/option/PhabricatorUIConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorUIConfigOptions return pht('Configure the Phabricator UI, including colors.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-magnet'; } @@ -25,7 +25,6 @@ final class PhabricatorUIConfigOptions $experimental_link = 'https://secure.phabricator.com/T4214'; $options = array( 'blindigo' => 'blindigo', - 'light' => 'light', 'red' => 'red', 'blue' => 'blue', 'green' => 'green', @@ -52,7 +51,7 @@ EOJSON; return array( $this->newOption('ui.header-color', 'enum', 'blindigo') ->setDescription( - pht('Sets the color of the main header.')) + pht('Sets the default color scheme of Phabricator.')) ->setEnumOptions($options), $this->newOption('ui.footer-items', 'list', array()) ->setSummary( diff --git a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php index 7708e6a539..ea06aaa456 100644 --- a/src/applications/conpherence/application/PhabricatorConpherenceApplication.php +++ b/src/applications/conpherence/application/PhabricatorConpherenceApplication.php @@ -14,7 +14,7 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication { return pht('Chat with Others'); } - public function getFontIcon() { + public function getIcon() { return 'fa-comments'; } diff --git a/src/applications/conpherence/config/ConpherenceConfigOptions.php b/src/applications/conpherence/config/ConpherenceConfigOptions.php index f309b8d569..24e1cb126d 100644 --- a/src/applications/conpherence/config/ConpherenceConfigOptions.php +++ b/src/applications/conpherence/config/ConpherenceConfigOptions.php @@ -11,7 +11,7 @@ final class ConpherenceConfigOptions return pht('Configure Conpherence messaging.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-comments'; } diff --git a/src/applications/conpherence/controller/ConpherenceWidgetController.php b/src/applications/conpherence/controller/ConpherenceWidgetController.php index 0408896a16..e6707577e9 100644 --- a/src/applications/conpherence/controller/ConpherenceWidgetController.php +++ b/src/applications/conpherence/controller/ConpherenceWidgetController.php @@ -57,7 +57,7 @@ final class ConpherenceWidgetController extends ConpherenceController { $widgets = array(); $new_icon = id(new PHUIIconView()) - ->setIconFont('fa-plus') + ->setIcon('fa-plus') ->setHref($this->getWidgetURI()) ->setMetadata(array('widget' => null)) ->addSigil('conpherence-widget-adder'); diff --git a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php index 95c5bd592a..92e5da59b1 100644 --- a/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php +++ b/src/applications/conpherence/query/ConpherenceThreadSearchEngine.php @@ -149,7 +149,7 @@ final class ConpherenceThreadSearchEngine $icon_name = $conpherence->getPolicyIconName($policy_objects); $icon = id(new PHUIIconView()) - ->setIconFont($icon_name); + ->setIcon($icon_name); $item = id(new PHUIObjectItemView()) ->setObjectName($conpherence->getMonogram()) ->setHeader($title) diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php index b371e86c5b..d892eaf62b 100644 --- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php +++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php @@ -214,7 +214,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { $icon = $conpherence->getPolicyIconName($policy_objects); $icon = id(new PHUIIconView()) ->addClass('mmr') - ->setIconFont($icon); + ->setIcon($icon); return $icon; } @@ -277,9 +277,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { ->setTag('a') ->setHref('/conpherence/search/') ->setColor(PHUIButtonView::GREY) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-search')))); + ->setIcon('fa-search'))); } private function buildHeader() { diff --git a/src/applications/conpherence/view/ConpherencePeopleWidgetView.php b/src/applications/conpherence/view/ConpherencePeopleWidgetView.php index a10a9756c7..8bcff0dad6 100644 --- a/src/applications/conpherence/view/ConpherencePeopleWidgetView.php +++ b/src/applications/conpherence/view/ConpherencePeopleWidgetView.php @@ -23,7 +23,7 @@ final class ConpherencePeopleWidgetView extends ConpherenceWidgetView { $remove_html = ''; if ($user_phid == $user->getPHID()) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-times lightbluetext'); + ->setIcon('fa-times lightbluetext'); $remove_html = javelin_tag( 'a', array( diff --git a/src/applications/conpherence/view/ConpherenceThreadListView.php b/src/applications/conpherence/view/ConpherenceThreadListView.php index 668e6f9558..40262c765b 100644 --- a/src/applications/conpherence/view/ConpherenceThreadListView.php +++ b/src/applications/conpherence/view/ConpherenceThreadListView.php @@ -59,7 +59,7 @@ final class ConpherenceThreadListView extends AphrontView { $data = $thread->getDisplayData($user); $icon = id(new PHUIIconView()) ->addClass('msr') - ->setIconFont($thread->getPolicyIconName($policy_objects)); + ->setIcon($thread->getPolicyIconName($policy_objects)); $title = phutil_tag( 'span', array(), @@ -109,7 +109,7 @@ final class ConpherenceThreadListView extends AphrontView { 'conpherence-room-list-header'); $header->appendChild( id(new PHUIIconView()) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setHref('/conpherence/search/') ->setText(pht('Search'))); $menu->addMenuItem($header); diff --git a/src/applications/countdown/application/PhabricatorCountdownApplication.php b/src/applications/countdown/application/PhabricatorCountdownApplication.php index 5daaa5021f..d6c62d7e1c 100644 --- a/src/applications/countdown/application/PhabricatorCountdownApplication.php +++ b/src/applications/countdown/application/PhabricatorCountdownApplication.php @@ -6,7 +6,7 @@ final class PhabricatorCountdownApplication extends PhabricatorApplication { return '/countdown/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-rocket'; } diff --git a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php index ae90e5f3e7..79b329385a 100644 --- a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php +++ b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php @@ -152,7 +152,7 @@ final class PhabricatorCountdownSearchEngine ->setHref('/countdown/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/daemon/application/PhabricatorDaemonsApplication.php b/src/applications/daemon/application/PhabricatorDaemonsApplication.php index c605be63b6..a0fb77beb0 100644 --- a/src/applications/daemon/application/PhabricatorDaemonsApplication.php +++ b/src/applications/daemon/application/PhabricatorDaemonsApplication.php @@ -18,7 +18,7 @@ final class PhabricatorDaemonsApplication extends PhabricatorApplication { return "\xE2\x98\xAF"; } - public function getFontIcon() { + public function getIcon() { return 'fa-pied-piper-alt'; } diff --git a/src/applications/dashboard/application/PhabricatorDashboardApplication.php b/src/applications/dashboard/application/PhabricatorDashboardApplication.php index 0c7304a92b..9653256630 100644 --- a/src/applications/dashboard/application/PhabricatorDashboardApplication.php +++ b/src/applications/dashboard/application/PhabricatorDashboardApplication.php @@ -14,7 +14,7 @@ final class PhabricatorDashboardApplication extends PhabricatorApplication { return pht('Create Custom Pages'); } - public function getFontIcon() { + public function getIcon() { return 'fa-dashboard'; } diff --git a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php index 4136cad358..eaffdaa0d5 100644 --- a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php @@ -55,7 +55,7 @@ final class PhabricatorDashboardPanelListController ->setHref('/dashboard/panel/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php index c660583203..57877783bb 100644 --- a/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php +++ b/src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php @@ -165,7 +165,7 @@ final class PhabricatorDashboardPanelRenderingEngine extends Phobject { break; } $icon = id(new PHUIIconView()) - ->setIconFont('fa-warning red msr'); + ->setIcon('fa-warning red msr'); $content = id(new PHUIBoxView()) ->addClass('dashboard-box') ->appendChild($icon) @@ -250,7 +250,7 @@ final class PhabricatorDashboardPanelRenderingEngine extends Phobject { $edit_uri->setQueryParam('dashboardID', $dashboard_id); } $action_edit = id(new PHUIIconView()) - ->setIconFont('fa-pencil') + ->setIcon('fa-pencil') ->setWorkflow(true) ->setHref((string)$edit_uri); $header->addActionIcon($action_edit); @@ -260,7 +260,7 @@ final class PhabricatorDashboardPanelRenderingEngine extends Phobject { '/dashboard/removepanel/'.$dashboard_id.'/')) ->setQueryParam('panelPHID', $panel->getPHID()); $action_remove = id(new PHUIIconView()) - ->setIconFont('fa-trash-o') + ->setIcon('fa-trash-o') ->setHref((string)$uri) ->setWorkflow(true); $header->addActionIcon($action_remove); diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php index 181d2c8bca..92195aa8f5 100644 --- a/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php +++ b/src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php @@ -117,7 +117,7 @@ final class PhabricatorDashboardQueryPanelType $key = $panel->getProperty('key'); $href = $search_engine->getQueryResultsPageURI($key); $icon = id(new PHUIIconView()) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setHref($href); $header->addActionIcon($icon); diff --git a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php index 83557b141a..26c71c1bab 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php @@ -181,7 +181,7 @@ final class PhabricatorDashboardSearchEngine ->setHref('/dashboard/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/differential/application/PhabricatorDifferentialApplication.php b/src/applications/differential/application/PhabricatorDifferentialApplication.php index a3074d3e31..787bf52788 100644 --- a/src/applications/differential/application/PhabricatorDifferentialApplication.php +++ b/src/applications/differential/application/PhabricatorDifferentialApplication.php @@ -14,7 +14,7 @@ final class PhabricatorDifferentialApplication extends PhabricatorApplication { return pht('Review Code'); } - public function getFontIcon() { + public function getIcon() { return 'fa-cog'; } diff --git a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php index bfa82893b3..7a9ffdc6c1 100644 --- a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php +++ b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php @@ -137,7 +137,7 @@ final class DifferentialCreateDiffConduitAPIMethod ); $xactions = array( - id(new DifferentialTransaction()) + id(new DifferentialDiffTransaction()) ->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE) ->setNewValue($diff_data_dict), ); diff --git a/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php index 5d446d4fbb..75eb12b4f0 100644 --- a/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php +++ b/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php @@ -72,13 +72,13 @@ final class DifferentialCreateRawDiffConduitAPIMethod ); $xactions = array( - id(new DifferentialTransaction()) + id(new DifferentialDiffTransaction()) ->setTransactionType(DifferentialDiffTransaction::TYPE_DIFF_CREATE) ->setNewValue($diff_data_dict), ); if ($request->getValue('viewPolicy')) { - $xactions[] = id(new DifferentialTransaction()) + $xactions[] = id(new DifferentialDiffTransaction()) ->setTransactionType(PhabricatorTransactions::TYPE_VIEW_POLICY) ->setNewValue($request->getValue('viewPolicy')); } diff --git a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php index dd864d523f..bd1aa99359 100644 --- a/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php +++ b/src/applications/differential/config/PhabricatorDifferentialConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorDifferentialConfigOptions return pht('Configure Differential code review.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-cog'; } diff --git a/src/applications/differential/constants/DifferentialRevisionStatus.php b/src/applications/differential/constants/DifferentialRevisionStatus.php index 087e577a78..50bc903c40 100644 --- a/src/applications/differential/constants/DifferentialRevisionStatus.php +++ b/src/applications/differential/constants/DifferentialRevisionStatus.php @@ -63,7 +63,7 @@ final class DifferentialRevisionStatus extends Phobject { ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status); $img = id(new PHUIIconView()) - ->setIconFont(self::getRevisionStatusIcon($status)); + ->setIcon(self::getRevisionStatusIcon($status)); $tag = phutil_tag( 'span', diff --git a/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php b/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php index ae662ab245..23ad165ca9 100644 --- a/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php +++ b/src/applications/differential/doorkeeper/DifferentialDoorkeeperRevisionFeedStoryPublisher.php @@ -57,16 +57,11 @@ final class DifferentialDoorkeeperRevisionFeedStoryPublisher } public function getObjectTitle($object) { - $prefix = $this->getTitlePrefix($object); - - $lines = new PhutilNumber($object->getLineCount()); - $lines = pht('[Request, %d lines]', $lines); - $id = $object->getID(); $title = $object->getTitle(); - return ltrim("{$prefix} {$lines} D{$id}: {$title}"); + return "D{$id}: {$title}"; } public function getObjectURI($object) { diff --git a/src/applications/differential/query/DifferentialRevisionSearchEngine.php b/src/applications/differential/query/DifferentialRevisionSearchEngine.php index 60e16b58b9..002a5df180 100644 --- a/src/applications/differential/query/DifferentialRevisionSearchEngine.php +++ b/src/applications/differential/query/DifferentialRevisionSearchEngine.php @@ -348,7 +348,7 @@ final class DifferentialRevisionSearchEngine ->setHref('/differential/diff/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/differential/view/DifferentialChangesetDetailView.php b/src/applications/differential/view/DifferentialChangesetDetailView.php index 918a49e6a7..6fb35a23d5 100644 --- a/src/applications/differential/view/DifferentialChangesetDetailView.php +++ b/src/applications/differential/view/DifferentialChangesetDetailView.php @@ -206,7 +206,7 @@ final class DifferentialChangesetDetailView extends AphrontView { $display_filename = $changeset->getDisplayFilename(); $display_icon = $this->getFileIcon($display_filename); $icon = id(new PHUIIconView()) - ->setIconFont($display_icon); + ->setIcon($display_icon); $renderer = DifferentialChangesetHTMLRenderer::getHTMLRendererByKey( $this->getRenderer()); diff --git a/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php b/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php index c8cb8c2370..14050e942c 100644 --- a/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php +++ b/src/applications/differential/view/DifferentialChangesetFileTreeSideNavBuilder.php @@ -91,12 +91,12 @@ final class DifferentialChangesetFileTreeSideNavBuilder extends Phobject { $href = '#'.$data->getAnchorName(); $title = $name; $icon = id(new PHUIIconView()) - ->setIconFont('fa-file-text-o bluetext'); + ->setIcon('fa-file-text-o bluetext'); } else { $name .= '/'; $title = $path->getFullPath().'/'; $icon = id(new PHUIIconView()) - ->setIconFont('fa-folder-open blue'); + ->setIcon('fa-folder-open blue'); } $name_element = phutil_tag( diff --git a/src/applications/differential/view/DifferentialRevisionListView.php b/src/applications/differential/view/DifferentialRevisionListView.php index b722633c0d..2c14bbc4a5 100644 --- a/src/applications/differential/view/DifferentialRevisionListView.php +++ b/src/applications/differential/view/DifferentialRevisionListView.php @@ -131,7 +131,7 @@ final class DifferentialRevisionListView extends AphrontView { if (isset($icons['draft'])) { $draft = id(new PHUIIconView()) - ->setIconFont('fa-comment yellow') + ->setIcon('fa-comment yellow') ->addSigil('has-tooltip') ->setMetadata( array( diff --git a/src/applications/diffusion/DiffusionPullEventGarbageCollector.php b/src/applications/diffusion/DiffusionPullEventGarbageCollector.php new file mode 100644 index 0000000000..9407b95070 --- /dev/null +++ b/src/applications/diffusion/DiffusionPullEventGarbageCollector.php @@ -0,0 +1,29 @@ +establishConnection('w'); + + queryfx( + $conn_w, + 'DELETE FROM %T WHERE epoch < %d LIMIT 100', + $table->getTableName(), + $this->getGarbageEpoch()); + + return ($conn_w->getAffectedRows() == 100); + } + +} diff --git a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php index 0f809e9983..fa82b4e80f 100644 --- a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php +++ b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php @@ -14,7 +14,7 @@ final class PhabricatorDiffusionApplication extends PhabricatorApplication { return '/diffusion/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-code'; } diff --git a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php index 9c3d7eff81..50f761eabc 100644 --- a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php +++ b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorDiffusionConfigOptions return pht('Configure Diffusion repository browsing.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-code'; } diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 0f0a583af8..e5d2f7bdfa 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -832,13 +832,11 @@ final class DiffusionBrowseController extends DiffusionController { $editor_link = $user->loadEditorLink($path, $line, $repository); $template = $user->loadEditorLink($path, '%l', $repository); - $icon_edit = id(new PHUIIconView()) - ->setIconFont('fa-pencil'); $button = id(new PHUIButtonView()) ->setTag('a') ->setText(pht('Open in Editor')) ->setHref($editor_link) - ->setIcon($icon_edit) + ->setIcon('fa-pencil') ->setID('editor_link') ->setMetadata(array('link_template' => $template)) ->setDisabled(!$editor_link); @@ -860,13 +858,11 @@ final class DiffusionBrowseController extends DiffusionController { $icon = 'fa-file-text'; } - $iconview = id(new PHUIIconView()) - ->setIconFont($icon); $button = id(new PHUIButtonView()) ->setTag('a') ->setText($text) ->setHref($href) - ->setIcon($iconview); + ->setIcon($icon); return $button; } @@ -1084,10 +1080,10 @@ final class DiffusionBrowseController extends DiffusionController { $revision_link = null; $commit_link = null; $before_link = null; - $style = null; - if ($identifier && !$line['duplicate']) { - $style = 'background: '.$line['color'].';'; + $style = 'background: '.$line['color'].';'; + + if ($identifier && !$line['duplicate']) { if (isset($commit_links[$identifier])) { $commit_link = $commit_links[$identifier]; } @@ -1826,7 +1822,7 @@ final class DiffusionBrowseController extends DiffusionController { $names = array(); foreach ($blame_commits as $identifier => $commit) { $author = $commit->renderAuthorShortName($handles); - $name = $commit->getShortName(); + $name = $commit->getLocalName(); $authors[$identifier] = $author; $names[$identifier] = $name; diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 218a8e3d44..efa3104a92 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -221,14 +221,12 @@ final class DiffusionCommitController extends DiffusionController { $change_panel->setID('toc'); if ($count > self::CHANGES_LIMIT && !$show_all_details) { - $icon = id(new PHUIIconView()) - ->setIconFont('fa-files-o'); $button = id(new PHUIButtonView()) ->setText(pht('Show All Changes')) ->setHref('?show_all=true') ->setTag('a') - ->setIcon($icon); + ->setIcon('fa-files-o'); $warning_view = id(new PHUIInfoView()) ->setSeverity(PHUIInfoView::SEVERITY_WARNING) diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index 9fc948d19a..18989818b6 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -390,13 +390,10 @@ final class DiffusionRepositoryController extends DiffusionController { $header->setSubHeader(pht('Showing %d branches.', $limit)); } - $icon = id(new PHUIIconView()) - ->setIconFont('fa-code-fork'); - $button = new PHUIButtonView(); $button->setText(pht('Show All Branches')); $button->setTag('a'); - $button->setIcon($icon); + $button->setIcon('fa-code-fork'); $button->setHref($drequest->generateURI( array( 'action' => 'branches', @@ -462,13 +459,10 @@ final class DiffusionRepositoryController extends DiffusionController { pht('Showing the %d most recent tags.', $tag_limit)); } - $icon = id(new PHUIIconView()) - ->setIconFont('fa-tag'); - $button = new PHUIButtonView(); $button->setText(pht('Show All Tags')); $button->setTag('a'); - $button->setIcon($icon); + $button->setIcon('fa-tag'); $button->setHref($drequest->generateURI( array( 'action' => 'tags', @@ -557,7 +551,7 @@ final class DiffusionRepositoryController extends DiffusionController { $history_table->setIsHead(true); $icon = id(new PHUIIconView()) - ->setIconFont('fa-list-alt'); + ->setIcon('fa-list-alt'); $button = id(new PHUIButtonView()) ->setText(pht('View Full History')) @@ -620,7 +614,7 @@ final class DiffusionRepositoryController extends DiffusionController { ->setHeader(pht('Repository')); $icon = id(new PHUIIconView()) - ->setIconFont('fa-folder-open'); + ->setIcon('fa-folder-open'); $button = new PHUIButtonView(); $button->setText(pht('Browse Repository')); diff --git a/src/applications/diffusion/controller/DiffusionServeController.php b/src/applications/diffusion/controller/DiffusionServeController.php index ea5d4c209d..1d41d62efa 100644 --- a/src/applications/diffusion/controller/DiffusionServeController.php +++ b/src/applications/diffusion/controller/DiffusionServeController.php @@ -2,6 +2,27 @@ final class DiffusionServeController extends DiffusionController { + private $serviceViewer; + private $serviceRepository; + + public function setServiceViewer(PhabricatorUser $viewer) { + $this->serviceViewer = $viewer; + return $this; + } + + public function getServiceViewer() { + return $this->serviceViewer; + } + + public function setServiceRepository(PhabricatorRepository $repository) { + $this->serviceRepository = $repository; + return $this; + } + + public function getServiceRepository() { + return $this->serviceRepository; + } + public function isVCSRequest(AphrontRequest $request) { $identifier = $this->getRepositoryIdentifierFromRequest($request); if ($identifier === null) { @@ -45,6 +66,75 @@ final class DiffusionServeController extends DiffusionController { } public function handleRequest(AphrontRequest $request) { + $service_exception = null; + $response = null; + + try { + $response = $this->serveRequest($request); + } catch (Exception $ex) { + $service_exception = $ex; + } + + try { + $remote_addr = $request->getRemoteAddr(); + $remote_addr = ip2long($remote_addr); + + $pull_event = id(new PhabricatorRepositoryPullEvent()) + ->setEpoch(PhabricatorTime::getNow()) + ->setRemoteAddress($remote_addr) + ->setRemoteProtocol('http'); + + if ($response) { + $pull_event + ->setResultType('wild') + ->setResultCode($response->getHTTPResponseCode()); + + if ($response instanceof PhabricatorVCSResponse) { + $pull_event->setProperties( + array( + 'response.message' => $response->getMessage(), + )); + } + } else { + $pull_event + ->setResultType('exception') + ->setResultCode(500) + ->setProperties( + array( + 'exception.class' => $ex->getClass(), + 'exception.message' => $ex->getMessage(), + )); + } + + $viewer = $this->getServiceViewer(); + if ($viewer) { + $pull_event->setPullerPHID($viewer->getPHID()); + } + + $repository = $this->getServiceRepository(); + if ($repository) { + $pull_event->setRepositoryPHID($repository->getPHID()); + } + + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $pull_event->save(); + unset($unguarded); + + } catch (Exception $ex) { + if ($service_exception) { + throw $service_exception; + } + throw $ex; + } + + if ($service_exception) { + throw $service_exception; + } + + return $response; + } + + private function serveRequest(AphrontRequest $request) { $identifier = $this->getRepositoryIdentifierFromRequest($request); // If authentication credentials have been provided, try to find a user @@ -65,6 +155,8 @@ final class DiffusionServeController extends DiffusionController { $viewer = new PhabricatorUser(); } + $this->setServiceViewer($viewer); + $allow_public = PhabricatorEnv::getEnvConfig('policy.allow-public'); $allow_auth = PhabricatorEnv::getEnvConfig('diffusion.allow-http-auth'); if (!$allow_public) { @@ -111,6 +203,8 @@ final class DiffusionServeController extends DiffusionController { } } + $this->setServiceRepository($repository); + if (!$repository->isTracked()) { return new PhabricatorVCSResponse( 403, diff --git a/src/applications/diffusion/view/DiffusionBranchTableView.php b/src/applications/diffusion/view/DiffusionBranchTableView.php index 0f4594e576..462f296bcb 100644 --- a/src/applications/diffusion/view/DiffusionBranchTableView.php +++ b/src/applications/diffusion/view/DiffusionBranchTableView.php @@ -81,7 +81,7 @@ final class DiffusionBranchTableView extends DiffusionView { } $status_icon = id(new PHUIIconView()) - ->setIconFont($icon) + ->setIcon($icon) ->addSigil('has-tooltip') ->setHref($doc_href) ->setMetadata( diff --git a/src/applications/diffusion/view/DiffusionView.php b/src/applications/diffusion/view/DiffusionView.php index 74de704dc3..331c172866 100644 --- a/src/applications/diffusion/view/DiffusionView.php +++ b/src/applications/diffusion/view/DiffusionView.php @@ -55,7 +55,7 @@ abstract class DiffusionView extends AphrontView { 'align' => 'E', ), ), - id(new PHUIIconView())->setIconFont('fa-history bluegrey')); + id(new PHUIIconView())->setIcon('fa-history bluegrey')); } final public function linkBrowse($path, array $details = array()) { @@ -95,7 +95,7 @@ abstract class DiffusionView extends AphrontView { } $icon = DifferentialChangeType::getIconForFileType($file_type); - $icon_view = id(new PHUIIconView())->setIconFont("{$icon} blue"); + $icon_view = id(new PHUIIconView())->setIcon($icon); // If we're rendering a file or directory name, don't show the tooltip. if ($display_name !== null) { @@ -183,7 +183,7 @@ abstract class DiffusionView extends AphrontView { $name = HarbormasterBuildable::getBuildableStatusName($status); $icon_view = id(new PHUIIconView()) - ->setIconFont($icon.' '.$color); + ->setIcon($icon.' '.$color); $tooltip_view = javelin_tag( 'span', diff --git a/src/applications/diviner/application/PhabricatorDivinerApplication.php b/src/applications/diviner/application/PhabricatorDivinerApplication.php index 66a8eac63d..83ca5e0dac 100644 --- a/src/applications/diviner/application/PhabricatorDivinerApplication.php +++ b/src/applications/diviner/application/PhabricatorDivinerApplication.php @@ -6,7 +6,7 @@ final class PhabricatorDivinerApplication extends PhabricatorApplication { return '/diviner/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-sun-o'; } diff --git a/src/applications/diviner/controller/DivinerBookController.php b/src/applications/diviner/controller/DivinerBookController.php index ebaf559775..0c84955b2f 100644 --- a/src/applications/diviner/controller/DivinerBookController.php +++ b/src/applications/diviner/controller/DivinerBookController.php @@ -33,7 +33,7 @@ final class DivinerBookController extends DivinerController { ->setTag('a') ->setText(pht('Actions')) ->setHref('#') - ->setIconFont('fa-bars') + ->setIcon('fa-bars') ->addClass('phui-mobile-menu') ->setDropdownMenu($actions); diff --git a/src/applications/diviner/controller/DivinerMainController.php b/src/applications/diviner/controller/DivinerMainController.php index 3050199c8a..97149778c1 100644 --- a/src/applications/diviner/controller/DivinerMainController.php +++ b/src/applications/diviner/controller/DivinerMainController.php @@ -17,14 +17,11 @@ final class DivinerMainController extends DivinerController { $crumbs->setBorder(true); $crumbs->addTextCrumb(pht('Books')); - $search_icon = id(new PHUIIconView()) - ->setIconFont('fa-search'); - $query_button = id(new PHUIButtonView()) ->setTag('a') ->setHref($this->getApplicationURI('query/')) ->setText(pht('Advanced Search')) - ->setIcon($search_icon); + ->setIcon('fa-search'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Documentation Books')) diff --git a/src/applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php b/src/applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php index b0e155a38e..6342dd18b3 100644 --- a/src/applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php +++ b/src/applications/doorkeeper/application/PhabricatorDoorkeeperApplication.php @@ -14,7 +14,7 @@ final class PhabricatorDoorkeeperApplication extends PhabricatorApplication { return pht('Doorkeeper'); } - public function getFontIcon() { + public function getIcon() { return 'fa-recycle'; } diff --git a/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php b/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php index e7f2ef85de..991392f484 100644 --- a/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php +++ b/src/applications/doorkeeper/option/PhabricatorAsanaConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorAsanaConfigOptions return pht('Asana integration options.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-exchange'; } diff --git a/src/applications/drydock/application/PhabricatorDrydockApplication.php b/src/applications/drydock/application/PhabricatorDrydockApplication.php index 6267c26f1e..d19e7cb78d 100644 --- a/src/applications/drydock/application/PhabricatorDrydockApplication.php +++ b/src/applications/drydock/application/PhabricatorDrydockApplication.php @@ -14,7 +14,7 @@ final class PhabricatorDrydockApplication extends PhabricatorApplication { return pht('Allocate Software Resources'); } - public function getFontIcon() { + public function getIcon() { return 'fa-truck'; } diff --git a/src/applications/drydock/controller/DrydockBlueprintViewController.php b/src/applications/drydock/controller/DrydockBlueprintViewController.php index 2566c69840..b23b869fd4 100644 --- a/src/applications/drydock/controller/DrydockBlueprintViewController.php +++ b/src/applications/drydock/controller/DrydockBlueprintViewController.php @@ -168,7 +168,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { id(new PHUIButtonView()) ->setTag('a') ->setHref($resources_uri) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setText(pht('View All'))); return id(new PHUIObjectBoxView()) @@ -233,7 +233,7 @@ final class DrydockBlueprintViewController extends DrydockBlueprintController { id(new PHUIButtonView()) ->setTag('a') ->setHref($authorizations_uri) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setText(pht('View All'))); return id(new PHUIObjectBoxView()) diff --git a/src/applications/drydock/controller/DrydockConsoleController.php b/src/applications/drydock/controller/DrydockConsoleController.php index 77346cea94..c6a8e25fd6 100644 --- a/src/applications/drydock/controller/DrydockConsoleController.php +++ b/src/applications/drydock/controller/DrydockConsoleController.php @@ -31,7 +31,7 @@ final class DrydockConsoleController extends DrydockController { $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Blueprints')) - ->setFontIcon('fa-map-o') + ->setIcon('fa-map-o') ->setHref($this->getApplicationURI('blueprint/')) ->addAttribute( pht( @@ -41,7 +41,7 @@ final class DrydockConsoleController extends DrydockController { $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Resources')) - ->setFontIcon('fa-map') + ->setIcon('fa-map') ->setHref($this->getApplicationURI('resource/')) ->addAttribute( pht('View and manage resources Drydock has built, like hosts.'))); @@ -49,14 +49,14 @@ final class DrydockConsoleController extends DrydockController { $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Leases')) - ->setFontIcon('fa-link') + ->setIcon('fa-link') ->setHref($this->getApplicationURI('lease/')) ->addAttribute(pht('Manage leases on resources.'))); $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Repository Operations')) - ->setFontIcon('fa-fighter-jet') + ->setIcon('fa-fighter-jet') ->setHref($this->getApplicationURI('operation/')) ->addAttribute(pht('Review the repository operation queue.'))); diff --git a/src/applications/drydock/controller/DrydockController.php b/src/applications/drydock/controller/DrydockController.php index ddb6788fb6..17b8d34916 100644 --- a/src/applications/drydock/controller/DrydockController.php +++ b/src/applications/drydock/controller/DrydockController.php @@ -39,9 +39,9 @@ abstract class DrydockController extends PhabricatorController { ->execute(); $consumed_yes = id(new PHUIIconView()) - ->setIconFont('fa-check green'); + ->setIcon('fa-check green'); $consumed_no = id(new PHUIIconView()) - ->setIconFont('fa-clock-o grey'); + ->setIcon('fa-clock-o grey'); $rows = array(); foreach ($commands as $command) { @@ -98,7 +98,7 @@ abstract class DrydockController extends PhabricatorController { id(new PHUIButtonView()) ->setTag('a') ->setHref($all_uri) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setText(pht('View All'))); return id(new PHUIObjectBoxView()) diff --git a/src/applications/drydock/controller/DrydockResourceViewController.php b/src/applications/drydock/controller/DrydockResourceViewController.php index d392796f57..61319fbdbc 100644 --- a/src/applications/drydock/controller/DrydockResourceViewController.php +++ b/src/applications/drydock/controller/DrydockResourceViewController.php @@ -168,7 +168,7 @@ final class DrydockResourceViewController extends DrydockResourceController { id(new PHUIButtonView()) ->setTag('a') ->setHref($leases_uri) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setText(pht('View All'))); $lease_list = id(new DrydockLeaseListView()) diff --git a/src/applications/drydock/view/DrydockLogListView.php b/src/applications/drydock/view/DrydockLogListView.php index 4e1fe664cd..845457f9bc 100644 --- a/src/applications/drydock/view/DrydockLogListView.php +++ b/src/applications/drydock/view/DrydockLogListView.php @@ -71,7 +71,7 @@ final class DrydockLogListView extends AphrontView { $blueprint, $resource, $lease, - id(new PHUIIconView())->setIconFont($icon), + id(new PHUIIconView())->setIcon($icon), $type, $data, phabricator_datetime($log->getEpoch(), $viewer), diff --git a/src/applications/fact/application/PhabricatorFactApplication.php b/src/applications/fact/application/PhabricatorFactApplication.php index 5967778c71..305ed3abc9 100644 --- a/src/applications/fact/application/PhabricatorFactApplication.php +++ b/src/applications/fact/application/PhabricatorFactApplication.php @@ -14,7 +14,7 @@ final class PhabricatorFactApplication extends PhabricatorApplication { return '/fact/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-line-chart'; } diff --git a/src/applications/feed/application/PhabricatorFeedApplication.php b/src/applications/feed/application/PhabricatorFeedApplication.php index ac8c21cda2..f24ff76fe4 100644 --- a/src/applications/feed/application/PhabricatorFeedApplication.php +++ b/src/applications/feed/application/PhabricatorFeedApplication.php @@ -14,7 +14,7 @@ final class PhabricatorFeedApplication extends PhabricatorApplication { return pht('Review Recent Activity'); } - public function getFontIcon() { + public function getIcon() { return 'fa-newspaper-o'; } diff --git a/src/applications/feed/config/PhabricatorFeedConfigOptions.php b/src/applications/feed/config/PhabricatorFeedConfigOptions.php index 5e6926f357..4b6612f931 100644 --- a/src/applications/feed/config/PhabricatorFeedConfigOptions.php +++ b/src/applications/feed/config/PhabricatorFeedConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorFeedConfigOptions return pht('Feed options.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-newspaper-o'; } diff --git a/src/applications/files/application/PhabricatorFilesApplication.php b/src/applications/files/application/PhabricatorFilesApplication.php index 7447ed728d..4cdcd76041 100644 --- a/src/applications/files/application/PhabricatorFilesApplication.php +++ b/src/applications/files/application/PhabricatorFilesApplication.php @@ -14,7 +14,7 @@ final class PhabricatorFilesApplication extends PhabricatorApplication { return pht('Store and Share Files'); } - public function getFontIcon() { + public function getIcon() { return 'fa-file'; } diff --git a/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php b/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php index 0298053d01..9025a0b53d 100644 --- a/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php +++ b/src/applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php @@ -150,7 +150,7 @@ final class PhabricatorFilesComposeIconBuiltinFile 'fa-bug' => pht('Bug'), 'fa-building' => pht('Company'), 'fa-calendar' => pht('Deadline'), - 'fa-camera-retro' => pht('Leica Enth1usiast'), + 'fa-camera-retro' => pht('Leica Enthusiast'), 'fa-chrome' => pht('Shiny'), 'fa-cloud' => pht('The Cloud'), 'fa-coffee' => pht('Go Juice'), @@ -177,7 +177,7 @@ final class PhabricatorFilesComposeIconBuiltinFile 'fa-internet-explorer' => pht('Now Just Edge'), 'fa-key' => pht('Primitive Security'), 'fa-legal' => pht('Hired Protection'), - 'fa-linux' => pht('M\`Lady'), + 'fa-linux' => pht('M\'Lady'), 'fa-lock' => pht('Policy'), 'fa-microphone' => pht('Podcasting'), 'fa-mobile' => pht('Tiny Pocket Cat Meme Machine'), @@ -204,7 +204,7 @@ final class PhabricatorFilesComposeIconBuiltinFile 'fa-user' => pht('Individual'), 'fa-users' => pht('Team'), 'fa-warning' => pht('No Caution Required, Everything Looks Safe'), - 'fa-wheelchair' => pht('Accessability'), + 'fa-wheelchair' => pht('Accessibility'), 'fa-windows' => pht('Windows'), ); } diff --git a/src/applications/files/config/PhabricatorFilesConfigOptions.php b/src/applications/files/config/PhabricatorFilesConfigOptions.php index e9d899f658..43e12eddec 100644 --- a/src/applications/files/config/PhabricatorFilesConfigOptions.php +++ b/src/applications/files/config/PhabricatorFilesConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorFilesConfigOptions return pht('Configure files and file storage.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-file'; } diff --git a/src/applications/files/controller/PhabricatorFileComposeController.php b/src/applications/files/controller/PhabricatorFileComposeController.php index 404cf44aca..1eaafdbad0 100644 --- a/src/applications/files/controller/PhabricatorFileComposeController.php +++ b/src/applications/files/controller/PhabricatorFileComposeController.php @@ -44,7 +44,7 @@ final class PhabricatorFileComposeController )); if ($project_phid) { - $edit_uri = '/project/history/'.$project->getID().'/'; + $edit_uri = '/project/manage/'.$project->getID().'/'; $xactions = array(); $xactions[] = id(new PhabricatorProjectTransaction()) @@ -110,7 +110,7 @@ final class PhabricatorFileComposeController ), ), id(new PHUIIconView()) - ->setIconFont($icon) + ->setIcon($icon) ->addClass('compose-icon-bg')); } @@ -122,7 +122,7 @@ final class PhabricatorFileComposeController $preview = id(new PHUIIconView()) ->setID($preview_id) ->addClass('compose-background-'.$value_color) - ->setIconFont($value_icon) + ->setIcon($value_icon) ->addClass('compose-icon-bg'); $color_input = javelin_tag( diff --git a/src/applications/files/controller/PhabricatorFileIconSetSelectController.php b/src/applications/files/controller/PhabricatorFileIconSetSelectController.php index ed7d18a5ee..1bd14d29d0 100644 --- a/src/applications/files/controller/PhabricatorFileIconSetSelectController.php +++ b/src/applications/files/controller/PhabricatorFileIconSetSelectController.php @@ -35,7 +35,7 @@ final class PhabricatorFileIconSetSelectController $label = $icon->getLabel(); $view = id(new PHUIIconView()) - ->setIconFont($icon->getIcon()); + ->setIcon($icon->getIcon()); $classes = array(); $classes[] = 'icon-button'; diff --git a/src/applications/files/iconset/PhabricatorIconSet.php b/src/applications/files/iconset/PhabricatorIconSet.php index ad8ac4b381..baf5422375 100644 --- a/src/applications/files/iconset/PhabricatorIconSet.php +++ b/src/applications/files/iconset/PhabricatorIconSet.php @@ -49,7 +49,7 @@ abstract class PhabricatorIconSet 'span', array(), array( - id(new PHUIIconView())->setIconFont($icon->getIcon()), + id(new PHUIIconView())->setIcon($icon->getIcon()), ' ', $icon->getLabel(), )); diff --git a/src/applications/files/query/PhabricatorFileSearchEngine.php b/src/applications/files/query/PhabricatorFileSearchEngine.php index 31e03f02b9..f2193d3beb 100644 --- a/src/applications/files/query/PhabricatorFileSearchEngine.php +++ b/src/applications/files/query/PhabricatorFileSearchEngine.php @@ -185,7 +185,7 @@ final class PhabricatorFileSearchEngine ->setHref('/file/upload/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/files/transform/PhabricatorFileThumbnailTransform.php b/src/applications/files/transform/PhabricatorFileThumbnailTransform.php index af97f8a9fa..8d55109eda 100644 --- a/src/applications/files/transform/PhabricatorFileThumbnailTransform.php +++ b/src/applications/files/transform/PhabricatorFileThumbnailTransform.php @@ -57,9 +57,9 @@ final class PhabricatorFileThumbnailTransform public function generateTransforms() { return array( id(new PhabricatorFileThumbnailTransform()) - ->setName(pht("Profile (100px \xC3\x97 100px)")) + ->setName(pht("Profile (200px \xC3\x97 200px)")) ->setKey(self::TRANSFORM_PROFILE) - ->setDimensions(100, 100) + ->setDimensions(200, 200) ->setScaleUp(true), id(new PhabricatorFileThumbnailTransform()) ->setName(pht("Pinboard (280px \xC3\x97 210px)")) diff --git a/src/applications/flag/application/PhabricatorFlagsApplication.php b/src/applications/flag/application/PhabricatorFlagsApplication.php index fad4c0bc8e..c7e2cb3b67 100644 --- a/src/applications/flag/application/PhabricatorFlagsApplication.php +++ b/src/applications/flag/application/PhabricatorFlagsApplication.php @@ -14,7 +14,7 @@ final class PhabricatorFlagsApplication extends PhabricatorApplication { return '/flag/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-flag'; } diff --git a/src/applications/fund/application/PhabricatorFundApplication.php b/src/applications/fund/application/PhabricatorFundApplication.php index ed36cc783b..889baca20e 100644 --- a/src/applications/fund/application/PhabricatorFundApplication.php +++ b/src/applications/fund/application/PhabricatorFundApplication.php @@ -14,7 +14,7 @@ final class PhabricatorFundApplication extends PhabricatorApplication { return pht('Donate'); } - public function getFontIcon() { + public function getIcon() { return 'fa-heart'; } diff --git a/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php b/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php index c9026e722f..97fa40dee8 100644 --- a/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php +++ b/src/applications/harbormaster/application/PhabricatorHarbormasterApplication.php @@ -14,7 +14,7 @@ final class PhabricatorHarbormasterApplication extends PhabricatorApplication { return pht('Build/CI'); } - public function getFontIcon() { + public function getIcon() { return 'fa-ship'; } diff --git a/src/applications/harbormaster/config/PhabricatorHarbormasterConfigOptions.php b/src/applications/harbormaster/config/PhabricatorHarbormasterConfigOptions.php index 0471984dbc..bab1e6de85 100644 --- a/src/applications/harbormaster/config/PhabricatorHarbormasterConfigOptions.php +++ b/src/applications/harbormaster/config/PhabricatorHarbormasterConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorHarbormasterConfigOptions return pht('Configure Harbormaster build engine.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-ship'; } diff --git a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php index 300cb79f23..f9a0807ab1 100644 --- a/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterBuildableViewController.php @@ -311,7 +311,7 @@ final class HarbormasterBuildableViewController id(new PHUIButtonView()) ->setTag('a') ->setHref($lint_href) - ->setIconFont('fa-list-ul') + ->setIcon('fa-list-ul') ->setText('View All')); $lint = id(new PHUIObjectBoxView()) @@ -335,7 +335,7 @@ final class HarbormasterBuildableViewController id(new PHUIButtonView()) ->setTag('a') ->setHref($unit_href) - ->setIconFont('fa-list-ul') + ->setIcon('fa-list-ul') ->setText('View All')); $unit = id(new PHUIObjectBoxView()) diff --git a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php index e306eaef7c..ed1381006b 100644 --- a/src/applications/harbormaster/controller/HarbormasterPlanViewController.php +++ b/src/applications/harbormaster/controller/HarbormasterPlanViewController.php @@ -202,9 +202,7 @@ final class HarbormasterPlanViewController extends HarbormasterPlanController { ->setText(pht('Add Build Step')) ->setHref($this->getApplicationURI("step/add/{$plan_id}/")) ->setTag('a') - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-plus')) + ->setIcon('fa-plus') ->setDisabled(!$can_edit) ->setWorkflow(!$can_edit)); diff --git a/src/applications/herald/adapter/HeraldAdapter.php b/src/applications/herald/adapter/HeraldAdapter.php index c7239438c6..bd6d4953da 100644 --- a/src/applications/herald/adapter/HeraldAdapter.php +++ b/src/applications/herald/adapter/HeraldAdapter.php @@ -830,7 +830,7 @@ abstract class HeraldAdapter extends Phobject { require_celerity_resource('herald-css'); $icon = id(new PHUIIconView()) - ->setIconFont('fa-chevron-circle-right lightgreytext') + ->setIcon('fa-chevron-circle-right lightgreytext') ->addClass('herald-list-icon'); if ($rule->getMustMatchAll()) { diff --git a/src/applications/herald/application/PhabricatorHeraldApplication.php b/src/applications/herald/application/PhabricatorHeraldApplication.php index d6f0fd47b6..9160b0e9d9 100644 --- a/src/applications/herald/application/PhabricatorHeraldApplication.php +++ b/src/applications/herald/application/PhabricatorHeraldApplication.php @@ -6,7 +6,7 @@ final class PhabricatorHeraldApplication extends PhabricatorApplication { return '/herald/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-bullhorn'; } diff --git a/src/applications/herald/query/HeraldRuleSearchEngine.php b/src/applications/herald/query/HeraldRuleSearchEngine.php index b71f8e6278..3b8196c13a 100644 --- a/src/applications/herald/query/HeraldRuleSearchEngine.php +++ b/src/applications/herald/query/HeraldRuleSearchEngine.php @@ -218,7 +218,7 @@ final class HeraldRuleSearchEngine extends PhabricatorApplicationSearchEngine { ->setHref('/herald/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/home/application/PhabricatorHomeApplication.php b/src/applications/home/application/PhabricatorHomeApplication.php index c4fa1c646c..481ade105f 100644 --- a/src/applications/home/application/PhabricatorHomeApplication.php +++ b/src/applications/home/application/PhabricatorHomeApplication.php @@ -16,7 +16,7 @@ final class PhabricatorHomeApplication extends PhabricatorApplication { return pht('Command Center'); } - public function getFontIcon() { + public function getIcon() { return 'fa-home'; } diff --git a/src/applications/home/controller/PhabricatorHomeMainController.php b/src/applications/home/controller/PhabricatorHomeMainController.php index 63ce763b69..1b8557fc7f 100644 --- a/src/applications/home/controller/PhabricatorHomeMainController.php +++ b/src/applications/home/controller/PhabricatorHomeMainController.php @@ -190,7 +190,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController { if (!$tasks) { return $this->renderMiniPanel( pht('No "Needs Triage" Tasks'), - pht('No tasks in projects you are a member of need triage.')); + pht('No tasks tagged with projects you are a member of need triage.')); } $title = pht('Needs Triage'); @@ -318,7 +318,7 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController { ), $title); $icon = id(new PHUIIconView()) - ->setIconFont('fa-search') + ->setIcon('fa-search') ->setHref($href); $header = id(new PHUIHeaderView()) ->setHeader($title) diff --git a/src/applications/legalpad/application/PhabricatorLegalpadApplication.php b/src/applications/legalpad/application/PhabricatorLegalpadApplication.php index e47049ef30..709fd7cc07 100644 --- a/src/applications/legalpad/application/PhabricatorLegalpadApplication.php +++ b/src/applications/legalpad/application/PhabricatorLegalpadApplication.php @@ -14,7 +14,7 @@ final class PhabricatorLegalpadApplication extends PhabricatorApplication { return pht('Agreements and Signatures'); } - public function getFontIcon() { + public function getIcon() { return 'fa-gavel'; } diff --git a/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php b/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php index e88ecb98f1..a9584fc94b 100644 --- a/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php +++ b/src/applications/legalpad/config/PhabricatorLegalpadConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorLegalpadConfigOptions return pht('Configure Legalpad.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-gavel'; } diff --git a/src/applications/legalpad/controller/LegalpadDocumentSignController.php b/src/applications/legalpad/controller/LegalpadDocumentSignController.php index ac24efbb5a..2221ae4499 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentSignController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentSignController.php @@ -250,9 +250,7 @@ final class LegalpadDocumentSignController extends LegalpadController { ->addActionLink( id(new PHUIButtonView()) ->setTag('a') - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-pencil')) + ->setIcon('fa-pencil') ->setText(pht('Manage')) ->setHref($manage_uri) ->setDisabled(!$can_edit) diff --git a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php index 2d94b23193..8b218cf821 100644 --- a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php +++ b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php @@ -186,7 +186,7 @@ final class LegalpadDocumentSearchEngine if ($signature) { $item->addAttribute( array( - id(new PHUIIconView())->setIconFont('fa-check-square-o', 'green'), + id(new PHUIIconView())->setIcon('fa-check-square-o', 'green'), ' ', pht( 'Signed on %s', @@ -195,7 +195,7 @@ final class LegalpadDocumentSearchEngine } else { $item->addAttribute( array( - id(new PHUIIconView())->setIconFont('fa-square-o', 'grey'), + id(new PHUIIconView())->setIcon('fa-square-o', 'grey'), ' ', pht('Not Signed'), )); @@ -223,7 +223,7 @@ final class LegalpadDocumentSearchEngine ->setHref('/legalpad/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php index 6967a21a98..9df8d2478d 100644 --- a/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php +++ b/src/applications/legalpad/query/LegalpadDocumentSignatureSearchEngine.php @@ -183,7 +183,7 @@ final class LegalpadDocumentSignatureSearchEngine pht('Exemption')); id(new PHUIIconView()) - ->setIconFont('fa-envelope', 'red') + ->setIcon('fa-envelope', 'red') ->addSigil('has-tooltip') ->setMetadata(array('tip' => pht('Unverified Email'))); @@ -276,7 +276,7 @@ final class LegalpadDocumentSignatureSearchEngine ->setTag('a') ->setHref($this->getApplicationURI('addsignature/'.$document_id.'/')) ->setWorkflow(true) - ->setIcon(id(new PHUIIconView())->setIconFont('fa-pencil')); + ->setIcon('fa-pencil'); } if (!$this->document) { @@ -300,7 +300,7 @@ final class LegalpadDocumentSignatureSearchEngine return array( id(new PHUIIconView()) - ->setIconFont($icon, $color) + ->setIcon($icon, $color) ->addSigil('has-tooltip') ->setMetadata(array('tip' => $title)), javelin_tag( diff --git a/src/applications/macro/application/PhabricatorMacroApplication.php b/src/applications/macro/application/PhabricatorMacroApplication.php index dabf285fd3..fc7dcabab6 100644 --- a/src/applications/macro/application/PhabricatorMacroApplication.php +++ b/src/applications/macro/application/PhabricatorMacroApplication.php @@ -14,7 +14,7 @@ final class PhabricatorMacroApplication extends PhabricatorApplication { return pht('Image Macros and Memes'); } - public function getFontIcon() { + public function getIcon() { return 'fa-file-image-o'; } diff --git a/src/applications/macro/config/PhabricatorMacroConfigOptions.php b/src/applications/macro/config/PhabricatorMacroConfigOptions.php index 2ab913a733..2cb01ff29f 100644 --- a/src/applications/macro/config/PhabricatorMacroConfigOptions.php +++ b/src/applications/macro/config/PhabricatorMacroConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorMacroConfigOptions return pht('Configure Macro.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-file-image-o'; } diff --git a/src/applications/macro/markup/PhabricatorIconRemarkupRule.php b/src/applications/macro/markup/PhabricatorIconRemarkupRule.php index acd87d4136..e1e6cede07 100644 --- a/src/applications/macro/markup/PhabricatorIconRemarkupRule.php +++ b/src/applications/macro/markup/PhabricatorIconRemarkupRule.php @@ -54,12 +54,12 @@ final class PhabricatorIconRemarkupRule extends PhutilRemarkupRule { static $icon_names; if (!$icon_names) { - $icon_names = array_fuse(PHUIIconView::getFontIcons()); + $icon_names = array_fuse(PHUIIconView::getIcons()); } static $color_names; if (!$color_names) { - $color_names = array_fuse(PHUIIconView::getFontIconColors()); + $color_names = array_fuse(PHUIIconView::getIconColors()); } if (empty($icon_names['fa-'.$icon])) { @@ -80,7 +80,7 @@ final class PhabricatorIconRemarkupRule extends PhutilRemarkupRule { } $icon_view = id(new PHUIIconView()) - ->setIconFont('fa-'.$icon, implode(' ', $classes)); + ->setIcon('fa-'.$icon, implode(' ', $classes)); return $this->getEngine()->storeText($icon_view); } diff --git a/src/applications/macro/query/PhabricatorMacroSearchEngine.php b/src/applications/macro/query/PhabricatorMacroSearchEngine.php index 1619f8185a..7ef57a6a10 100644 --- a/src/applications/macro/query/PhabricatorMacroSearchEngine.php +++ b/src/applications/macro/query/PhabricatorMacroSearchEngine.php @@ -196,7 +196,7 @@ final class PhabricatorMacroSearchEngine ->setHref('/macro/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/maniphest/application/PhabricatorManiphestApplication.php b/src/applications/maniphest/application/PhabricatorManiphestApplication.php index 3fcbbf49f0..61186c7b8d 100644 --- a/src/applications/maniphest/application/PhabricatorManiphestApplication.php +++ b/src/applications/maniphest/application/PhabricatorManiphestApplication.php @@ -14,7 +14,7 @@ final class PhabricatorManiphestApplication extends PhabricatorApplication { return '/maniphest/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-anchor'; } diff --git a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php index a6f1cb79bf..3d47c59e1c 100644 --- a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php +++ b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorManiphestConfigOptions return pht('Configure Maniphest.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-anchor'; } diff --git a/src/applications/maniphest/constants/ManiphestTaskStatus.php b/src/applications/maniphest/constants/ManiphestTaskStatus.php index 5efc2ea56c..ab99f212e5 100644 --- a/src/applications/maniphest/constants/ManiphestTaskStatus.php +++ b/src/applications/maniphest/constants/ManiphestTaskStatus.php @@ -94,7 +94,7 @@ final class ManiphestTaskStatus extends ManiphestConstants { $icon = self::getStatusIcon($status); $img = id(new PHUIIconView()) - ->setIconFont($icon.' '.$icon_color); + ->setIcon($icon.' '.$icon_color); $tag = phutil_tag( 'span', diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php index 5f86c7a68b..4b29ba49f7 100644 --- a/src/applications/maniphest/query/ManiphestTaskQuery.php +++ b/src/applications/maniphest/query/ManiphestTaskQuery.php @@ -278,8 +278,9 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { foreach ($tasks as $key => $task) { if (!$task->getGroupByProjectPHID()) { - // This task is either not in any projects, or only in projects - // which we're ignoring because they're being queried for explicitly. + // This task is either not tagged with any projects, or only tagged + // with projects which we're ignoring because they're being queried + // for explicitly. continue; } @@ -642,14 +643,14 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { * Return project PHIDs which we should ignore when grouping tasks by * project. For example, if a user issues a query like: * - * Tasks in all projects: Frontend, Bugs + * Tasks tagged with all projects: Frontend, Bugs * * ...then we don't show "Frontend" or "Bugs" groups in the result set, since * they're meaningless as all results are in both groups. * * Similarly, for queries like: * - * Tasks in any projects: Public Relations + * Tasks tagged with any projects: Public Relations * * ...we ignore the single project, as every result is in that project. (In * the case that there are several "any" projects, we do not ignore them.) diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php index 8e2f295f1a..4c92f9d642 100644 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -392,7 +392,7 @@ final class ManiphestTaskSearchEngine ->setHref('/maniphest/task/edit/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/meta/application/PhabricatorApplicationsApplication.php b/src/applications/meta/application/PhabricatorApplicationsApplication.php index 1b354213be..fc26eb1e27 100644 --- a/src/applications/meta/application/PhabricatorApplicationsApplication.php +++ b/src/applications/meta/application/PhabricatorApplicationsApplication.php @@ -24,7 +24,7 @@ final class PhabricatorApplicationsApplication extends PhabricatorApplication { return pht('Explore More Applications'); } - public function getFontIcon() { + public function getIcon() { return 'fa-globe'; } diff --git a/src/applications/meta/query/PhabricatorAppSearchEngine.php b/src/applications/meta/query/PhabricatorAppSearchEngine.php index 9dcc0a4399..98a9495fa0 100644 --- a/src/applications/meta/query/PhabricatorAppSearchEngine.php +++ b/src/applications/meta/query/PhabricatorAppSearchEngine.php @@ -209,7 +209,7 @@ final class PhabricatorAppSearchEngine $list = new PHUIObjectItemListView(); foreach ($applications as $application) { - $icon = $application->getFontIcon(); + $icon = $application->getIcon(); if (!$icon) { $icon = 'application'; } diff --git a/src/applications/meta/typeahead/PhabricatorApplicationDatasource.php b/src/applications/meta/typeahead/PhabricatorApplicationDatasource.php index b6d4aa3f18..176c3554cf 100644 --- a/src/applications/meta/typeahead/PhabricatorApplicationDatasource.php +++ b/src/applications/meta/typeahead/PhabricatorApplicationDatasource.php @@ -28,7 +28,7 @@ final class PhabricatorApplicationDatasource continue; } $name = $application->getName().' '.$application->getShortDescription(); - $img = 'phui-font-fa phui-icon-view '.$application->getFontIcon(); + $img = 'phui-font-fa phui-icon-view '.$application->getIcon(); $results[] = id(new PhabricatorTypeaheadResult()) ->setName($name) ->setURI($uri) diff --git a/src/applications/meta/view/PhabricatorApplicationLaunchView.php b/src/applications/meta/view/PhabricatorApplicationLaunchView.php index c714e0daa6..95c3777d4e 100644 --- a/src/applications/meta/view/PhabricatorApplicationLaunchView.php +++ b/src/applications/meta/view/PhabricatorApplicationLaunchView.php @@ -113,7 +113,7 @@ final class PhabricatorApplicationLaunchView extends AphrontTagView { if ($application->getIconURI()) { $styles[] = 'background-image: url('.$application->getIconURI().')'; } else { - $classes[] = $application->getFontIcon(); + $classes[] = $application->getIcon(); $classes[] = 'phui-icon-view'; $classes[] = 'phui-font-fa'; } diff --git a/src/applications/metamta/application/PhabricatorMetaMTAApplication.php b/src/applications/metamta/application/PhabricatorMetaMTAApplication.php index 5617c39c35..adb08aaa24 100644 --- a/src/applications/metamta/application/PhabricatorMetaMTAApplication.php +++ b/src/applications/metamta/application/PhabricatorMetaMTAApplication.php @@ -10,7 +10,7 @@ final class PhabricatorMetaMTAApplication extends PhabricatorApplication { return '/mail/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-send'; } diff --git a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php index ba03603071..1899ac1be1 100644 --- a/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php +++ b/src/applications/metamta/applicationpanel/PhabricatorMetaMTAApplicationEmailPanel.php @@ -29,9 +29,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel id(new PHUIButtonView()) ->setTag('a') ->setText(pht('Edit Application Emails')) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-pencil')) + ->setIcon('fa-pencil') ->setHref($this->getPanelURI()) ->setDisabled(!$can_edit) ->setWorkflow(!$can_edit)); @@ -89,7 +87,7 @@ final class PhabricatorMetaMTAApplicationEmailPanel ->setSubheader($application->getAppEmailBlurb()); $icon = id(new PHUIIconView()) - ->setIconFont('fa-plus'); + ->setIcon('fa-plus'); $button = new PHUIButtonView(); $button->setText(pht('Add New Address')); $button->setTag('a'); diff --git a/src/applications/multimeter/application/PhabricatorMultimeterApplication.php b/src/applications/multimeter/application/PhabricatorMultimeterApplication.php index fdac449bd2..4965ae761d 100644 --- a/src/applications/multimeter/application/PhabricatorMultimeterApplication.php +++ b/src/applications/multimeter/application/PhabricatorMultimeterApplication.php @@ -11,7 +11,7 @@ final class PhabricatorMultimeterApplication return '/multimeter/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-motorcycle'; } diff --git a/src/applications/notification/application/PhabricatorNotificationsApplication.php b/src/applications/notification/application/PhabricatorNotificationsApplication.php index 0228b471b1..b4cc2b45b6 100644 --- a/src/applications/notification/application/PhabricatorNotificationsApplication.php +++ b/src/applications/notification/application/PhabricatorNotificationsApplication.php @@ -14,7 +14,7 @@ final class PhabricatorNotificationsApplication extends PhabricatorApplication { return pht('Real-Time Updates and Alerts'); } - public function getFontIcon() { + public function getIcon() { return 'fa-bell'; } diff --git a/src/applications/notification/controller/PhabricatorNotificationStatusController.php b/src/applications/notification/controller/PhabricatorNotificationStatusController.php index e889c7af5e..eb79a3a8c5 100644 --- a/src/applications/notification/controller/PhabricatorNotificationStatusController.php +++ b/src/applications/notification/controller/PhabricatorNotificationStatusController.php @@ -63,7 +63,7 @@ final class PhabricatorNotificationStatusController )); $test_icon = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle'); + ->setIcon('fa-exclamation-triangle'); $test_button = id(new PHUIButtonView()) ->setTag('a') diff --git a/src/applications/notification/query/PhabricatorNotificationSearchEngine.php b/src/applications/notification/query/PhabricatorNotificationSearchEngine.php index 8d62372dc3..11b935eb50 100644 --- a/src/applications/notification/query/PhabricatorNotificationSearchEngine.php +++ b/src/applications/notification/query/PhabricatorNotificationSearchEngine.php @@ -85,7 +85,7 @@ final class PhabricatorNotificationSearchEngine $viewer = $this->requireViewer(); $image = id(new PHUIIconView()) - ->setIconFont('fa-eye-slash'); + ->setIcon('fa-eye-slash'); $button = id(new PHUIButtonView()) ->setTag('a') diff --git a/src/applications/nuance/application/PhabricatorNuanceApplication.php b/src/applications/nuance/application/PhabricatorNuanceApplication.php index ce19afcd11..e3d5825d4e 100644 --- a/src/applications/nuance/application/PhabricatorNuanceApplication.php +++ b/src/applications/nuance/application/PhabricatorNuanceApplication.php @@ -6,7 +6,7 @@ final class PhabricatorNuanceApplication extends PhabricatorApplication { return pht('Nuance'); } - public function getFontIcon() { + public function getIcon() { return 'fa-fax'; } diff --git a/src/applications/nuance/controller/NuanceConsoleController.php b/src/applications/nuance/controller/NuanceConsoleController.php index 78ab474fb6..ffcde21ba3 100644 --- a/src/applications/nuance/controller/NuanceConsoleController.php +++ b/src/applications/nuance/controller/NuanceConsoleController.php @@ -16,14 +16,14 @@ final class NuanceConsoleController extends NuanceController { id(new PHUIObjectItemView()) ->setHeader(pht('Queues')) ->setHref($this->getApplicationURI('queue/')) - ->setFontIcon('fa-align-left') + ->setIcon('fa-align-left') ->addAttribute(pht('Manage Nuance queues.'))); $menu->addItem( id(new PHUIObjectItemView()) ->setHeader(pht('Sources')) ->setHref($this->getApplicationURI('source/')) - ->setFontIcon('fa-filter') + ->setIcon('fa-filter') ->addAttribute(pht('Manage Nuance sources.'))); $crumbs = $this->buildApplicationCrumbs(); diff --git a/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php b/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php index 08e5e207f6..7bd7eed9ac 100644 --- a/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php +++ b/src/applications/oauthserver/application/PhabricatorOAuthServerApplication.php @@ -14,7 +14,7 @@ final class PhabricatorOAuthServerApplication extends PhabricatorApplication { return pht('OAuth Login Provider'); } - public function getFontIcon() { + public function getIcon() { return 'fa-hotel'; } diff --git a/src/applications/owners/application/PhabricatorOwnersApplication.php b/src/applications/owners/application/PhabricatorOwnersApplication.php index 8511ce401d..574dd6ff7e 100644 --- a/src/applications/owners/application/PhabricatorOwnersApplication.php +++ b/src/applications/owners/application/PhabricatorOwnersApplication.php @@ -10,7 +10,7 @@ final class PhabricatorOwnersApplication extends PhabricatorApplication { return '/owners/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-gift'; } diff --git a/src/applications/owners/config/PhabricatorOwnersConfigOptions.php b/src/applications/owners/config/PhabricatorOwnersConfigOptions.php index 5c5766a43a..0f827672b7 100644 --- a/src/applications/owners/config/PhabricatorOwnersConfigOptions.php +++ b/src/applications/owners/config/PhabricatorOwnersConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorOwnersConfigOptions return pht('Configure Owners.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-gift'; } diff --git a/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php b/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php index f67b82b7b5..f92817d79e 100644 --- a/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php +++ b/src/applications/owners/query/PhabricatorOwnersPackageSearchEngine.php @@ -162,7 +162,7 @@ final class PhabricatorOwnersPackageSearchEngine ->setHref('/owners/edit/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/passphrase/application/PhabricatorPassphraseApplication.php b/src/applications/passphrase/application/PhabricatorPassphraseApplication.php index daf794180f..2ab4f1e33d 100644 --- a/src/applications/passphrase/application/PhabricatorPassphraseApplication.php +++ b/src/applications/passphrase/application/PhabricatorPassphraseApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPassphraseApplication extends PhabricatorApplication { return pht('Credential Store'); } - public function getFontIcon() { + public function getIcon() { return 'fa-user-secret'; } diff --git a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php index d6d34baef1..ac4cbec9bf 100644 --- a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php +++ b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php @@ -118,7 +118,7 @@ final class PassphraseCredentialSearchEngine ->setHref('/passphrase/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/passphrase/storage/PassphraseCredentialTransaction.php b/src/applications/passphrase/storage/PassphraseCredentialTransaction.php index 0615bd9e90..e0c90fcdb9 100644 --- a/src/applications/passphrase/storage/PassphraseCredentialTransaction.php +++ b/src/applications/passphrase/storage/PassphraseCredentialTransaction.php @@ -26,6 +26,7 @@ final class PassphraseCredentialTransaction public function shouldHide() { $old = $this->getOldValue(); + $new = $this->getNewValue(); switch ($this->getTransactionType()) { case self::TYPE_DESCRIPTION: return ($old === null); @@ -35,6 +36,12 @@ final class PassphraseCredentialTransaction return !strlen($old); case self::TYPE_LOOKEDATSECRET: return false; + case self::TYPE_DESTROY: + // Don't show "undestroy" transactions because they're a bit confusing + // and redundant with restoring a secret. + if (!$new) { + return true; + } } return parent::shouldHide(); } @@ -77,12 +84,18 @@ final class PassphraseCredentialTransaction } break; case self::TYPE_SECRET_ID: - return pht( - '%s updated the secret for this credential.', - $this->renderHandleLink($author_phid)); + if ($old === null) { + return pht( + '%s attached a new secret to this credential.', + $this->renderHandleLink($author_phid)); + } else { + return pht( + '%s updated the secret for this credential.', + $this->renderHandleLink($author_phid)); + } case self::TYPE_DESTROY: return pht( - '%s destroyed this credential.', + '%s destroyed the secret for this credential.', $this->renderHandleLink($author_phid)); case self::TYPE_LOOKEDATSECRET: return pht( diff --git a/src/applications/paste/application/PhabricatorPasteApplication.php b/src/applications/paste/application/PhabricatorPasteApplication.php index 881ea8283a..1947c5377b 100644 --- a/src/applications/paste/application/PhabricatorPasteApplication.php +++ b/src/applications/paste/application/PhabricatorPasteApplication.php @@ -10,7 +10,7 @@ final class PhabricatorPasteApplication extends PhabricatorApplication { return '/paste/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-paste'; } diff --git a/src/applications/paste/config/PhabricatorPasteConfigOptions.php b/src/applications/paste/config/PhabricatorPasteConfigOptions.php index bb970905c4..15b32eeb04 100644 --- a/src/applications/paste/config/PhabricatorPasteConfigOptions.php +++ b/src/applications/paste/config/PhabricatorPasteConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPasteConfigOptions return pht('Configure Paste.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-paste'; } diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php index fdf7824f07..da1f04ae09 100644 --- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php +++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php @@ -210,7 +210,7 @@ final class PhabricatorPasteSearchEngine ->setHref('/paste/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/people/application/PhabricatorPeopleApplication.php b/src/applications/people/application/PhabricatorPeopleApplication.php index 48598ba838..c4bc87ea5a 100644 --- a/src/applications/people/application/PhabricatorPeopleApplication.php +++ b/src/applications/people/application/PhabricatorPeopleApplication.php @@ -18,7 +18,7 @@ final class PhabricatorPeopleApplication extends PhabricatorApplication { return "\xE2\x99\x9F"; } - public function getFontIcon() { + public function getIcon() { return 'fa-users'; } @@ -62,6 +62,8 @@ final class PhabricatorPeopleApplication extends PhabricatorApplication { 'PhabricatorPeopleProfileEditController', 'picture/(?P[1-9]\d*)/' => 'PhabricatorPeopleProfilePictureController', + 'manage/(?P[1-9]\d*)/' => + 'PhabricatorPeopleProfileManageController', ), '/p/(?P[\w._-]+)/' => array( '' => 'PhabricatorPeopleProfileViewController', diff --git a/src/applications/people/config/PhabricatorUserConfigOptions.php b/src/applications/people/config/PhabricatorUserConfigOptions.php index afd1d376a0..79be912699 100644 --- a/src/applications/people/config/PhabricatorUserConfigOptions.php +++ b/src/applications/people/config/PhabricatorUserConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorUserConfigOptions return pht('User profiles configuration.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-users'; } @@ -24,6 +24,7 @@ final class PhabricatorUserConfigOptions $default = array( id(new PhabricatorUserRealNameField())->getFieldKey() => true, id(new PhabricatorUserTitleField())->getFieldKey() => true, + id(new PhabricatorUserIconField())->getFieldKey() => true, id(new PhabricatorUserSinceField())->getFieldKey() => true, id(new PhabricatorUserRolesField())->getFieldKey() => true, id(new PhabricatorUserStatusField())->getFieldKey() => true, diff --git a/src/applications/people/controller/PhabricatorPeopleDeleteController.php b/src/applications/people/controller/PhabricatorPeopleDeleteController.php index 01b37b37fe..29ae7edd93 100644 --- a/src/applications/people/controller/PhabricatorPeopleDeleteController.php +++ b/src/applications/people/controller/PhabricatorPeopleDeleteController.php @@ -3,28 +3,22 @@ final class PhabricatorPeopleDeleteController extends PhabricatorPeopleController { - private $id; - - public function willProcessRequest(array $data) { - $this->id = $data['id']; - } - - public function processRequest() { - $request = $this->getRequest(); - $admin = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $request->getUser(); + $id = $request->getURIData('id'); $user = id(new PhabricatorPeopleQuery()) - ->setViewer($admin) - ->withIDs(array($this->id)) + ->setViewer($viewer) + ->withIDs(array($id)) ->executeOne(); if (!$user) { return new Aphront404Response(); } - $profile_uri = '/p/'.$user->getUsername().'/'; + $manage_uri = $this->getApplicationURI("manage/{$id}/"); - if ($user->getPHID() == $admin->getPHID()) { - return $this->buildDeleteSelfResponse($profile_uri); + if ($user->getPHID() == $viewer->getPHID()) { + return $this->buildDeleteSelfResponse($manage_uri); } $str1 = pht( @@ -47,7 +41,7 @@ final class PhabricatorPeopleDeleteController $str4 = pht('To permanently destroy this user, run this command:'); $form = id(new AphrontFormView()) - ->setUser($admin) + ->setUser($viewer) ->appendRemarkupInstructions( csprintf( " phabricator/ $ ./bin/remove destroy %R\n", @@ -62,10 +56,10 @@ final class PhabricatorPeopleDeleteController ->appendParagraph($str3) ->appendParagraph($str4) ->appendChild($form->buildLayoutView()) - ->addCancelButton($profile_uri, pht('Close')); + ->addCancelButton($manage_uri, pht('Close')); } - private function buildDeleteSelfResponse($profile_uri) { + private function buildDeleteSelfResponse($cancel_uri) { return $this->newDialog() ->setTitle(pht('You Shall Journey No Farther')) ->appendParagraph( @@ -73,7 +67,7 @@ final class PhabricatorPeopleDeleteController 'As you stare into the gaping maw of the abyss, something '. 'holds you back.')) ->appendParagraph(pht('You can not delete your own account.')) - ->addCancelButton($profile_uri, pht('Turn Back')); + ->addCancelButton($cancel_uri, pht('Turn Back')); } diff --git a/src/applications/people/controller/PhabricatorPeopleDisableController.php b/src/applications/people/controller/PhabricatorPeopleDisableController.php index 7ef4099709..a556f8e519 100644 --- a/src/applications/people/controller/PhabricatorPeopleDisableController.php +++ b/src/applications/people/controller/PhabricatorPeopleDisableController.php @@ -3,21 +3,14 @@ final class PhabricatorPeopleDisableController extends PhabricatorPeopleController { - private $id; - private $via; - - public function willProcessRequest(array $data) { - $this->id = $data['id']; - $this->via = $data['via']; - } - - public function processRequest() { - $request = $this->getRequest(); - $admin = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $this->getViewer(); + $id = $request->getURIData('id'); + $via = $request->getURIData('id'); $user = id(new PhabricatorPeopleQuery()) - ->setViewer($admin) - ->withIDs(array($this->id)) + ->setViewer($viewer) + ->withIDs(array($id)) ->executeOne(); if (!$user) { return new Aphront404Response(); @@ -27,16 +20,16 @@ final class PhabricatorPeopleDisableController // on profiles and also via the "X" action on the approval queue. We do // things slightly differently depending on the context the actor is in. - $is_disapprove = ($this->via == 'disapprove'); + $is_disapprove = ($via == 'disapprove'); if ($is_disapprove) { $done_uri = $this->getApplicationURI('query/approval/'); $should_disable = true; } else { - $done_uri = '/p/'.$user->getUsername().'/'; + $done_uri = $this->getApplicationURI("manage/{$id}/"); $should_disable = !$user->getIsDisabled(); } - if ($admin->getPHID() == $user->getPHID()) { + if ($viewer->getPHID() == $user->getPHID()) { return $this->newDialog() ->setTitle(pht('Something Stays Your Hand')) ->appendParagraph( @@ -47,7 +40,7 @@ final class PhabricatorPeopleDisableController if ($request->isFormPost()) { id(new PhabricatorUserEditor()) - ->setActor($admin) + ->setActor($viewer) ->disableUser($user, $should_disable); return id(new AphrontRedirectResponse())->setURI($done_uri); diff --git a/src/applications/people/controller/PhabricatorPeopleEmpowerController.php b/src/applications/people/controller/PhabricatorPeopleEmpowerController.php index 74447a48e9..a49f8b3d1d 100644 --- a/src/applications/people/controller/PhabricatorPeopleEmpowerController.php +++ b/src/applications/people/controller/PhabricatorPeopleEmpowerController.php @@ -3,47 +3,41 @@ final class PhabricatorPeopleEmpowerController extends PhabricatorPeopleController { - private $id; - - public function willProcessRequest(array $data) { - $this->id = $data['id']; - } - - public function processRequest() { - $request = $this->getRequest(); - $admin = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $this->getViewer(); + $id = $request->getURIData('id'); $user = id(new PhabricatorPeopleQuery()) - ->setViewer($admin) - ->withIDs(array($this->id)) + ->setViewer($viewer) + ->withIDs(array($id)) ->executeOne(); if (!$user) { return new Aphront404Response(); } - $profile_uri = '/p/'.$user->getUsername().'/'; + $done_uri = $this->getApplicationURI("manage/{$id}/"); id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession( - $admin, + $viewer, $request, - $profile_uri); + $done_uri); - if ($user->getPHID() == $admin->getPHID()) { + if ($user->getPHID() == $viewer->getPHID()) { return $this->newDialog() ->setTitle(pht('Your Way is Blocked')) ->appendParagraph( pht( 'After a time, your efforts fail. You can not adjust your own '. 'status as an administrator.')) - ->addCancelButton($profile_uri, pht('Accept Fate')); + ->addCancelButton($done_uri, pht('Accept Fate')); } if ($request->isFormPost()) { id(new PhabricatorUserEditor()) - ->setActor($admin) + ->setActor($viewer) ->makeAdminUser($user, !$user->getIsAdmin()); - return id(new AphrontRedirectResponse())->setURI($profile_uri); + return id(new AphrontRedirectResponse())->setURI($done_uri); } if ($user->getIsAdmin()) { @@ -69,7 +63,7 @@ final class PhabricatorPeopleEmpowerController ->setTitle($title) ->setShortTitle($short) ->appendParagraph($body) - ->addCancelButton($profile_uri) + ->addCancelButton($done_uri) ->addSubmitButton($submit); } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php index b438093be7..cb258d17ac 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileEditController.php @@ -23,7 +23,7 @@ final class PhabricatorPeopleProfileEditController $this->setUser($user); - $profile_uri = '/p/'.$user->getUsername().'/'; + $done_uri = $this->getApplicationURI("manage/{$id}/"); $field_list = PhabricatorCustomField::getObjectFields( $user, @@ -46,7 +46,7 @@ final class PhabricatorPeopleProfileEditController try { $editor->applyTransactions($user, $xactions); - return id(new AphrontRedirectResponse())->setURI($profile_uri); + return id(new AphrontRedirectResponse())->setURI($done_uri); } catch (PhabricatorApplicationTransactionValidationException $ex) { $validation_exception = $ex; } @@ -61,7 +61,7 @@ final class PhabricatorPeopleProfileEditController $form ->appendChild( id(new AphrontFormSubmitControl()) - ->addCancelButton($profile_uri) + ->addCancelButton($done_uri) ->setValue(pht('Save Profile'))); $allow_public = PhabricatorEnv::getEnvConfig('policy.allow-public'); @@ -86,9 +86,13 @@ final class PhabricatorPeopleProfileEditController $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Edit Profile')); + $nav = $this->getProfileMenu(); + $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); + return $this->newPage() ->setTitle($title) ->setCrumbs($crumbs) + ->setNavigation($nav) ->appendChild($form_box); } } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileManageController.php b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php new file mode 100644 index 0000000000..204fc7abda --- /dev/null +++ b/src/applications/people/controller/PhabricatorPeopleProfileManageController.php @@ -0,0 +1,191 @@ +getViewer(); + $id = $request->getURIData('id'); + + $user = id(new PhabricatorPeopleQuery()) + ->setViewer($viewer) + ->withIDs(array($id)) + ->needProfile(true) + ->needProfileImage(true) + ->needAvailability(true) + ->executeOne(); + if (!$user) { + return new Aphront404Response(); + } + + $this->setUser($user); + + $profile = $user->loadUserProfile(); + $picture = $user->getProfileImageURI(); + + $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); + $profile_icon = id(new PHUIIconView()) + ->setIcon($profile_icon); + $profile_title = $profile->getDisplayTitle(); + + $header = id(new PHUIHeaderView()) + ->setHeader($user->getFullName()) + ->setSubheader(array($profile_icon, $profile_title)) + ->setImage($picture); + + $actions = $this->buildActionList($user); + $properties = $this->buildPropertyView($user); + $properties->setActionList($actions); + $name = $user->getUsername(); + + $object_box = id(new PHUIObjectBoxView()) + ->setHeader($header) + ->addPropertyList($properties); + + $nav = $this->getProfileMenu(); + $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); + + $timeline = $this->buildTransactionTimeline( + $user, + new PhabricatorPeopleTransactionQuery()); + $timeline->setShouldTerminate(true); + + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb(pht('Manage')); + + return $this->newPage() + ->setTitle( + array( + pht('Manage User'), + $user->getUsername(), + )) + ->setNavigation($nav) + ->setCrumbs($crumbs) + ->appendChild( + array( + $object_box, + $timeline, + )); + } + + private function buildPropertyView(PhabricatorUser $user) { + + $viewer = $this->getRequest()->getUser(); + $view = id(new PHUIPropertyListView()) + ->setUser($viewer) + ->setObject($user); + + $field_list = PhabricatorCustomField::getObjectFields( + $user, + PhabricatorCustomField::ROLE_VIEW); + $field_list->appendFieldsToPropertyList($user, $viewer, $view); + + return $view; + } + + private function buildActionList(PhabricatorUser $user) { + $viewer = $this->getViewer(); + + $actions = id(new PhabricatorActionListView()) + ->setUser($viewer); + + $can_edit = PhabricatorPolicyFilter::hasCapability( + $viewer, + $user, + PhabricatorPolicyCapability::CAN_EDIT); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-pencil') + ->setName(pht('Edit Profile')) + ->setHref($this->getApplicationURI('editprofile/'.$user->getID().'/')) + ->setDisabled(!$can_edit) + ->setWorkflow(!$can_edit)); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-picture-o') + ->setName(pht('Edit Profile Picture')) + ->setHref($this->getApplicationURI('picture/'.$user->getID().'/')) + ->setDisabled(!$can_edit) + ->setWorkflow(!$can_edit)); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-wrench') + ->setName(pht('Edit Settings')) + ->setDisabled(!$can_edit) + ->setWorkflow(!$can_edit) + ->setHref('/settings/'.$user->getID().'/')); + + if ($user->getIsAdmin()) { + $empower_icon = 'fa-arrow-circle-o-down'; + $empower_name = pht('Remove Administrator'); + } else { + $empower_icon = 'fa-arrow-circle-o-up'; + $empower_name = pht('Make Administrator'); + } + + $is_admin = $viewer->getIsAdmin(); + $is_self = ($user->getPHID() === $viewer->getPHID()); + $can_admin = ($is_admin && !$is_self); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon($empower_icon) + ->setName($empower_name) + ->setDisabled(!$can_admin) + ->setWorkflow(true) + ->setHref($this->getApplicationURI('empower/'.$user->getID().'/'))); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-tag') + ->setName(pht('Change Username')) + ->setDisabled(!$is_admin) + ->setWorkflow(true) + ->setHref($this->getApplicationURI('rename/'.$user->getID().'/'))); + + if ($user->getIsDisabled()) { + $disable_icon = 'fa-check-circle-o'; + $disable_name = pht('Enable User'); + } else { + $disable_icon = 'fa-ban'; + $disable_name = pht('Disable User'); + } + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon($disable_icon) + ->setName($disable_name) + ->setDisabled(!$can_admin) + ->setWorkflow(true) + ->setHref($this->getApplicationURI('disable/'.$user->getID().'/'))); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-times') + ->setName(pht('Delete User')) + ->setDisabled(!$can_admin) + ->setWorkflow(true) + ->setHref($this->getApplicationURI('delete/'.$user->getID().'/'))); + + $can_welcome = ($is_admin && $user->canEstablishWebSessions()); + + $actions->addAction( + id(new PhabricatorActionView()) + ->setIcon('fa-envelope') + ->setName(pht('Send Welcome Email')) + ->setWorkflow(true) + ->setDisabled(!$can_welcome) + ->setHref($this->getApplicationURI('welcome/'.$user->getID().'/'))); + + return $actions; + } + + +} diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index 0d9554e264..cf78dd9c03 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -22,8 +22,9 @@ final class PhabricatorPeopleProfilePictureController } $this->setUser($user); + $name = $user->getUserName(); - $profile_uri = '/p/'.$user->getUsername().'/'; + $done_uri = '/p/'.$name.'/'; $supported_formats = PhabricatorFile::getTransformableImageFormats(); $e_file = true; @@ -76,7 +77,7 @@ final class PhabricatorPeopleProfilePictureController $xformed->attachToObject($user->getPHID()); } $user->save(); - return id(new AphrontRedirectResponse())->setURI($profile_uri); + return id(new AphrontRedirectResponse())->setURI($done_uri); } } @@ -241,7 +242,7 @@ final class PhabricatorPeopleProfilePictureController pht('Supported formats: %s', implode(', ', $supported_formats)))) ->appendChild( id(new AphrontFormSubmitControl()) - ->addCancelButton($profile_uri) + ->addCancelButton($done_uri) ->setValue(pht('Upload Picture'))); $upload_box = id(new PHUIObjectBoxView()) @@ -251,9 +252,13 @@ final class PhabricatorPeopleProfilePictureController $crumbs = $this->buildApplicationCrumbs(); $crumbs->addTextCrumb(pht('Edit Profile Picture')); + $nav = $this->getProfileMenu(); + $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_MANAGE); + return $this->newPage() ->setTitle($title) ->setCrumbs($crumbs) + ->setNavigation($nav) ->appendChild( array( $form_box, diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php index a515dda959..1453ab7d71 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -27,139 +27,67 @@ final class PhabricatorPeopleProfileViewController $profile = $user->loadUserProfile(); $picture = $user->getProfileImageURI(); + $profile_icon = PhabricatorPeopleIconSet::getIconIcon($profile->getIcon()); + $profile_icon = id(new PHUIIconView()) + ->setIcon($profile_icon); + $profile_title = $profile->getDisplayTitle(); + $header = id(new PHUIHeaderView()) ->setHeader($user->getFullName()) - ->setSubheader($profile->getTitle()) - ->setImage($picture); - - $actions = id(new PhabricatorActionListView()) - ->setObject($user) - ->setUser($viewer); + ->setSubheader(array($profile_icon, $profile_title)) + ->setImage($picture) + ->setProfileHeader(true); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, $user, PhabricatorPolicyCapability::CAN_EDIT); - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-pencil') - ->setName(pht('Edit Profile')) - ->setHref($this->getApplicationURI('editprofile/'.$user->getID().'/')) - ->setDisabled(!$can_edit) - ->setWorkflow(!$can_edit)); - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-picture-o') - ->setName(pht('Edit Profile Picture')) - ->setHref($this->getApplicationURI('picture/'.$user->getID().'/')) - ->setDisabled(!$can_edit) - ->setWorkflow(!$can_edit)); - - $class = 'PhabricatorConpherenceApplication'; - if (PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { - $href = id(new PhutilURI('/conpherence/new/')) - ->setQueryParam('participant', $user->getPHID()); - - $can_send = $viewer->isLoggedIn(); - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-comments') - ->setName(pht('Send Message')) - ->setWorkflow(true) - ->setDisabled(!$can_send) - ->setHref($href)); + if ($can_edit) { + $id = $user->getID(); + $header->setImageEditURL($this->getApplicationURI("picture/{$id}/")); } - if ($viewer->getIsAdmin()) { - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-wrench') - ->setName(pht('Edit Settings')) - ->setDisabled(!$can_edit) - ->setWorkflow(!$can_edit) - ->setHref('/settings/'.$user->getID().'/')); - - if ($user->getIsAdmin()) { - $empower_icon = 'fa-arrow-circle-o-down'; - $empower_name = pht('Remove Administrator'); - } else { - $empower_icon = 'fa-arrow-circle-o-up'; - $empower_name = pht('Make Administrator'); - } - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon($empower_icon) - ->setName($empower_name) - ->setDisabled(($user->getPHID() == $viewer->getPHID())) - ->setWorkflow(true) - ->setHref($this->getApplicationURI('empower/'.$user->getID().'/'))); - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-tag') - ->setName(pht('Change Username')) - ->setWorkflow(true) - ->setHref($this->getApplicationURI('rename/'.$user->getID().'/'))); - - if ($user->getIsDisabled()) { - $disable_icon = 'fa-check-circle-o'; - $disable_name = pht('Enable User'); - } else { - $disable_icon = 'fa-ban'; - $disable_name = pht('Disable User'); - } - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon($disable_icon) - ->setName($disable_name) - ->setDisabled(($user->getPHID() == $viewer->getPHID())) - ->setWorkflow(true) - ->setHref($this->getApplicationURI('disable/'.$user->getID().'/'))); - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-times') - ->setName(pht('Delete User')) - ->setDisabled(($user->getPHID() == $viewer->getPHID())) - ->setWorkflow(true) - ->setHref($this->getApplicationURI('delete/'.$user->getID().'/'))); - - $can_welcome = $user->canEstablishWebSessions(); - - $actions->addAction( - id(new PhabricatorActionView()) - ->setIcon('fa-envelope') - ->setName(pht('Send Welcome Email')) - ->setWorkflow(true) - ->setDisabled(!$can_welcome) - ->setHref($this->getApplicationURI('welcome/'.$user->getID().'/'))); - } - - $properties = $this->buildPropertyView($user, $actions); + $properties = $this->buildPropertyView($user); $name = $user->getUsername(); - $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb($name); - - $object_box = id(new PHUIObjectBoxView()) - ->setHeader($header) - ->addPropertyList($properties); - - $feed = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Recent Activity')) - ->appendChild($this->buildPeopleFeed($user, $viewer)); + $feed = $this->buildPeopleFeed($user, $viewer); + $feed = phutil_tag_div('project-view-feed', $feed); $badges = $this->buildBadgesView($user); + if ($badges) { + $columns = id(new PHUITwoColumnView()) + ->addClass('project-view-badges') + ->setMainColumn( + array( + $properties, + $feed, + )) + ->setSideColumn( + array( + $badges, + )); + } else { + $columns = array($properties, $feed); + } + $nav = $this->getProfileMenu(); $nav->selectFilter(PhabricatorPeopleProfilePanelEngine::PANEL_PROFILE); $crumbs = $this->buildApplicationCrumbs(); + $crumbs->setBorder(true); + + require_celerity_resource('project-view-css'); + $home = phutil_tag( + 'div', + array( + 'class' => 'project-view-home', + ), + array( + $header, + $columns, + )); return $this->newPage() ->setTitle($user->getUsername()) @@ -167,27 +95,32 @@ final class PhabricatorPeopleProfileViewController ->setCrumbs($crumbs) ->appendChild( array( - $object_box, - $badges, - $feed, + $home, )); } private function buildPropertyView( - PhabricatorUser $user, - PhabricatorActionListView $actions) { + PhabricatorUser $user) { $viewer = $this->getRequest()->getUser(); $view = id(new PHUIPropertyListView()) ->setUser($viewer) - ->setObject($user) - ->setActionList($actions); + ->setObject($user); $field_list = PhabricatorCustomField::getObjectFields( $user, PhabricatorCustomField::ROLE_VIEW); $field_list->appendFieldsToPropertyList($user, $viewer, $view); + if ($view->isEmpty()) { + return null; + } + + $view = id(new PHUIBoxView()) + ->setColor(PHUIBoxView::GREY) + ->appendChild($view) + ->addClass('project-view-properties'); + return $view; } @@ -217,11 +150,13 @@ final class PhabricatorPeopleProfileViewController $flex->addItem($item); } - $box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Badges')) - ->appendChild($flex); - } + $box = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Badges')) + ->appendChild($flex) + ->setBackground(PHUIBoxView::GREY); } + } + return $box; } @@ -245,7 +180,7 @@ final class PhabricatorPeopleProfileViewController 'requires but just a single step.')); $view = $builder->buildView(); - return phutil_tag_div('phabricator-project-feed', $view->render()); + return $view->render(); } diff --git a/src/applications/people/controller/PhabricatorPeopleRenameController.php b/src/applications/people/controller/PhabricatorPeopleRenameController.php index 5fec0cf073..cd552717e0 100644 --- a/src/applications/people/controller/PhabricatorPeopleRenameController.php +++ b/src/applications/people/controller/PhabricatorPeopleRenameController.php @@ -3,30 +3,24 @@ final class PhabricatorPeopleRenameController extends PhabricatorPeopleController { - private $id; - - public function willProcessRequest(array $data) { - $this->id = $data['id']; - } - - public function processRequest() { - $request = $this->getRequest(); - $admin = $request->getUser(); + public function handleRequest(AphrontRequest $request) { + $viewer = $this->getViewer(); + $id = $request->getURIData('id'); $user = id(new PhabricatorPeopleQuery()) - ->setViewer($admin) - ->withIDs(array($this->id)) + ->setViewer($viewer) + ->withIDs(array($id)) ->executeOne(); if (!$user) { return new Aphront404Response(); } - $profile_uri = '/p/'.$user->getUsername().'/'; + $done_uri = $this->getApplicationURI("manage/{$id}/"); id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession( - $admin, + $viewer, $request, - $profile_uri); + $done_uri); $errors = array(); @@ -35,7 +29,6 @@ final class PhabricatorPeopleRenameController if ($request->isFormPost()) { $v_username = $request->getStr('username'); - if (!strlen($v_username)) { $e_username = pht('Required'); $errors[] = pht('New username is required.'); @@ -50,12 +43,10 @@ final class PhabricatorPeopleRenameController if (!$errors) { try { id(new PhabricatorUserEditor()) - ->setActor($admin) + ->setActor($viewer) ->changeUsername($user, $v_username); - $new_uri = '/p/'.$v_username.'/'; - - return id(new AphrontRedirectResponse())->setURI($new_uri); + return id(new AphrontRedirectResponse())->setURI($done_uri); } catch (AphrontDuplicateKeyQueryException $ex) { $e_username = pht('Not Unique'); $errors[] = pht('Another user already has that username.'); @@ -88,7 +79,7 @@ final class PhabricatorPeopleRenameController 'password if necessary.'); $form = id(new AphrontFormView()) - ->setUser($admin) + ->setUser($viewer) ->appendChild( id(new AphrontFormStaticControl()) ->setLabel(pht('Old Username')) @@ -114,9 +105,9 @@ final class PhabricatorPeopleRenameController ->appendParagraph($inst4) ->appendParagraph($inst5) ->appendParagraph(null) - ->appendChild($form->buildLayoutView()) + ->appendForm($form) ->addSubmitButton(pht('Rename User')) - ->addCancelButton($profile_uri); + ->addCancelButton($done_uri); } } diff --git a/src/applications/people/customfield/PhabricatorUserIconField.php b/src/applications/people/customfield/PhabricatorUserIconField.php new file mode 100644 index 0000000000..a3f43cb7bf --- /dev/null +++ b/src/applications/people/customfield/PhabricatorUserIconField.php @@ -0,0 +1,61 @@ +value = $object->loadUserProfile()->getIcon(); + } + + public function getOldValueForApplicationTransactions() { + return $this->getObject()->loadUserProfile()->getIcon(); + } + + public function getNewValueForApplicationTransactions() { + return $this->value; + } + + public function applyApplicationTransactionInternalEffects( + PhabricatorApplicationTransaction $xaction) { + $this->getObject()->loadUserProfile()->setIcon($xaction->getNewValue()); + } + + public function readValueFromRequest(AphrontRequest $request) { + $this->value = $request->getStr($this->getFieldKey()); + } + + public function renderEditControl(array $handles) { + return id(new PHUIFormIconSetControl()) + ->setName($this->getFieldKey()) + ->setValue($this->value) + ->setLabel($this->getFieldName()) + ->setIconSet(new PhabricatorPeopleIconSet()); + } + +} diff --git a/src/applications/people/customfield/PhabricatorUserTitleField.php b/src/applications/people/customfield/PhabricatorUserTitleField.php index 6e13b93aa7..af6793e76e 100644 --- a/src/applications/people/customfield/PhabricatorUserTitleField.php +++ b/src/applications/people/customfield/PhabricatorUserTitleField.php @@ -54,8 +54,7 @@ final class PhabricatorUserTitleField return id(new AphrontFormTextControl()) ->setName($this->getFieldKey()) ->setValue($this->value) - ->setLabel($this->getFieldName()) - ->setCaption(pht('Serious business title.')); + ->setLabel($this->getFieldName()); } } diff --git a/src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php b/src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php index 60b11ffebb..af8608900d 100644 --- a/src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php +++ b/src/applications/people/engine/PhabricatorPeopleProfilePanelEngine.php @@ -4,6 +4,7 @@ final class PhabricatorPeopleProfilePanelEngine extends PhabricatorProfilePanelEngine { const PANEL_PROFILE = 'people.profile'; + const PANEL_MANAGE = 'people.manage'; protected function isPanelEngineConfigurable() { return false; @@ -90,6 +91,10 @@ final class PhabricatorPeopleProfilePanelEngine ->setPanelProperty('uri', $uri); } + $panels[] = $this->newPanel() + ->setBuiltinKey(self::PANEL_MANAGE) + ->setPanelKey(PhabricatorPeopleManageProfilePanel::PANELKEY); + return $panels; } diff --git a/src/applications/people/icon/PhabricatorPeopleIconSet.php b/src/applications/people/icon/PhabricatorPeopleIconSet.php new file mode 100644 index 0000000000..06b97829ed --- /dev/null +++ b/src/applications/people/icon/PhabricatorPeopleIconSet.php @@ -0,0 +1,120 @@ +setKey($spec['key']) + ->setIcon($spec['icon']) + ->setLabel($spec['name']); + } + + return $icons; + } + + public static function getDefaultIconKey() { + $specifications = self::getIconSpecifications(); + + foreach ($specifications as $spec) { + if (idx($spec, 'default')) { + return $spec['key']; + } + } + + return null; + } + + public static function getIconIcon($key) { + $specifications = self::getIconSpecifications(); + $map = ipull($specifications, 'icon', 'key'); + return idx($map, $key); + } + + public static function getIconName($key) { + $specifications = self::getIconSpecifications(); + $map = ipull($specifications, 'name', 'key'); + return idx($map, $key); + } + + private static function getIconSpecifications() { + return self::getDefaultSpecifications(); + } + + private static function getDefaultSpecifications() { + return array( + array( + 'key' => 'person', + 'icon' => 'fa-user', + 'name' => pht('User'), + 'default' => true, + ), + array( + 'key' => 'engineering', + 'icon' => 'fa-code', + 'name' => pht('Engineering'), + ), + array( + 'key' => 'operations', + 'icon' => 'fa-space-shuttle', + 'name' => pht('Operations'), + ), + array( + 'key' => 'resources', + 'icon' => 'fa-heart', + 'name' => pht('Resources'), + ), + array( + 'key' => 'relationships', + 'icon' => 'fa-glass', + 'name' => pht('Relationships'), + ), + array( + 'key' => 'administration', + 'icon' => 'fa-fax', + 'name' => pht('Administration'), + ), + array( + 'key' => 'security', + 'icon' => 'fa-shield', + 'name' => pht('Security'), + ), + array( + 'key' => 'logistics', + 'icon' => 'fa-truck', + 'name' => pht('Logistics'), + ), + array( + 'key' => 'research', + 'icon' => 'fa-flask', + 'name' => pht('Research'), + ), + array( + 'key' => 'analysis', + 'icon' => 'fa-bar-chart-o', + 'name' => pht('Analysis'), + ), + array( + 'key' => 'executive', + 'icon' => 'fa-angle-double-up', + 'name' => pht('Executive'), + ), + array( + 'key' => 'animal', + 'icon' => 'fa-paw', + 'name' => pht('Animal'), + ), + ); + } + +} diff --git a/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php b/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php index 0304173f90..ad452d5f02 100644 --- a/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php +++ b/src/applications/people/phid/PhabricatorPeopleUserPHIDType.php @@ -26,6 +26,7 @@ final class PhabricatorPeopleUserPHIDType extends PhabricatorPHIDType { return id(new PhabricatorPeopleQuery()) ->withPHIDs($phids) + ->needProfile(true) ->needProfileImage(true) ->needAvailability(true); } @@ -46,6 +47,15 @@ final class PhabricatorPeopleUserPHIDType extends PhabricatorPHIDType { if ($user->getIsMailingList()) { $handle->setIcon('fa-envelope-o'); + $handle->setSubtitle(pht('Mailing List')); + } else { + $profile = $user->getUserProfile(); + $icon_key = $profile->getIcon(); + $icon_icon = PhabricatorPeopleIconSet::getIconIcon($icon_key); + $subtitle = $profile->getDisplayTitle(); + + $handle->setIcon($icon_icon); + $handle->setSubtitle($subtitle); } $availability = null; diff --git a/src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php b/src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php new file mode 100644 index 0000000000..f010016d35 --- /dev/null +++ b/src/applications/people/profilepanel/PhabricatorPeopleManageProfilePanel.php @@ -0,0 +1,59 @@ +getPanelProperty('name'); + + if (strlen($name)) { + return $name; + } + + return $this->getDefaultName(); + } + + public function buildEditEngineFields( + PhabricatorProfilePanelConfiguration $config) { + return array( + id(new PhabricatorTextEditField()) + ->setKey('name') + ->setLabel(pht('Name')) + ->setPlaceholder($this->getDefaultName()) + ->setValue($config->getPanelProperty('name')), + ); + } + + protected function newNavigationMenuItems( + PhabricatorProfilePanelConfiguration $config) { + + $user = $config->getProfileObject(); + $id = $user->getID(); + + $item = $this->newItem() + ->setHref("/people/manage/{$id}/") + ->setName($this->getDisplayName($config)) + ->setIcon('fa-gears'); + + return array( + $item, + ); + } + +} diff --git a/src/applications/people/query/PhabricatorPeopleQuery.php b/src/applications/people/query/PhabricatorPeopleQuery.php index f1286f0a5a..2932d8c853 100644 --- a/src/applications/people/query/PhabricatorPeopleQuery.php +++ b/src/applications/people/query/PhabricatorPeopleQuery.php @@ -138,15 +138,16 @@ final class PhabricatorPeopleQuery if ($this->needProfile) { $user_list = mpull($users, null, 'getPHID'); $profiles = new PhabricatorUserProfile(); - $profiles = $profiles->loadAllWhere('userPHID IN (%Ls)', + $profiles = $profiles->loadAllWhere( + 'userPHID IN (%Ls)', array_keys($user_list)); $profiles = mpull($profiles, null, 'getUserPHID'); foreach ($user_list as $user_phid => $user) { $profile = idx($profiles, $user_phid); + if (!$profile) { - $profile = new PhabricatorUserProfile(); - $profile->setUserPHID($user_phid); + $profile = PhabricatorUserProfile::initializeNewProfile($user); } $user->attachUserProfile($profile); diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index 18526ac04f..07c5695945 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -451,8 +451,7 @@ final class PhabricatorUser $this->getPHID()); if (!$this->profile) { - $profile_dao->setUserPHID($this->getPHID()); - $this->profile = $profile_dao; + $this->profile = PhabricatorUserProfile::initializeNewProfile($this); } return $this->profile; diff --git a/src/applications/people/storage/PhabricatorUserProfile.php b/src/applications/people/storage/PhabricatorUserProfile.php index 8ebd4f2af3..edfa24d78e 100644 --- a/src/applications/people/storage/PhabricatorUserProfile.php +++ b/src/applications/people/storage/PhabricatorUserProfile.php @@ -6,6 +6,15 @@ final class PhabricatorUserProfile extends PhabricatorUserDAO { protected $title; protected $blurb; protected $profileImagePHID; + protected $icon; + + public static function initializeNewProfile(PhabricatorUser $user) { + $default_icon = PhabricatorPeopleIconSet::getDefaultIconKey(); + + return id(new self()) + ->setUserPHID($user->getPHID()) + ->setIcon($default_icon); + } protected function getConfiguration() { return array( @@ -13,6 +22,7 @@ final class PhabricatorUserProfile extends PhabricatorUserDAO { 'title' => 'text255', 'blurb' => 'text', 'profileImagePHID' => 'phid?', + 'icon' => 'text32', ), self::CONFIG_KEY_SCHEMA => array( 'userPHID' => array( @@ -23,4 +33,14 @@ final class PhabricatorUserProfile extends PhabricatorUserDAO { ) + parent::getConfiguration(); } + public function getDisplayTitle() { + $title = $this->getTitle(); + if (strlen($title)) { + return $title; + } + + $icon_key = $this->getIcon(); + return PhabricatorPeopleIconSet::getIconName($icon_key); + } + } diff --git a/src/applications/phame/application/PhabricatorPhameApplication.php b/src/applications/phame/application/PhabricatorPhameApplication.php index 1a49c95277..637b51a66c 100644 --- a/src/applications/phame/application/PhabricatorPhameApplication.php +++ b/src/applications/phame/application/PhabricatorPhameApplication.php @@ -10,7 +10,7 @@ final class PhabricatorPhameApplication extends PhabricatorApplication { return '/phame/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-star'; } diff --git a/src/applications/phame/controller/PhameHomeController.php b/src/applications/phame/controller/PhameHomeController.php index 4028f98e50..b9c7fc76d8 100644 --- a/src/applications/phame/controller/PhameHomeController.php +++ b/src/applications/phame/controller/PhameHomeController.php @@ -60,7 +60,7 @@ final class PhameHomeController extends PhamePostController { ->setTag('a') ->setText(pht('Actions')) ->setHref('#') - ->setIconFont('fa-bars') + ->setIcon('fa-bars') ->addClass('phui-mobile-menu') ->setDropdownMenu($actions); diff --git a/src/applications/phame/controller/blog/PhameBlogViewController.php b/src/applications/phame/controller/blog/PhameBlogViewController.php index c387152019..60972c57b8 100644 --- a/src/applications/phame/controller/blog/PhameBlogViewController.php +++ b/src/applications/phame/controller/blog/PhameBlogViewController.php @@ -48,7 +48,7 @@ final class PhameBlogViewController extends PhameLiveController { ->setTag('a') ->setText(pht('Actions')) ->setHref('#') - ->setIconFont('fa-bars') + ->setIcon('fa-bars') ->addClass('phui-mobile-menu') ->setDropdownMenu($actions); diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php index 6a0ceace4f..68c9f22082 100644 --- a/src/applications/phame/controller/post/PhamePostViewController.php +++ b/src/applications/phame/controller/post/PhamePostViewController.php @@ -29,7 +29,7 @@ final class PhamePostViewController ->setTag('a') ->setText(pht('Actions')) ->setHref('#') - ->setIconFont('fa-bars') + ->setIcon('fa-bars') ->addClass('phui-mobile-menu') ->setDropdownMenu($actions); diff --git a/src/applications/phame/view/PhameBlogListView.php b/src/applications/phame/view/PhameBlogListView.php index ae936442b0..f2149b8cfb 100644 --- a/src/applications/phame/view/PhameBlogListView.php +++ b/src/applications/phame/view/PhameBlogListView.php @@ -45,7 +45,7 @@ final class PhameBlogListView extends AphrontTagView { $blog->getName()); $icon = id(new PHUIIconView()) - ->setIconFont('fa-plus-square') + ->setIcon('fa-plus-square') ->addClass('phame-blog-list-icon'); $add_new = phutil_tag( diff --git a/src/applications/phame/view/PhameDraftListView.php b/src/applications/phame/view/PhameDraftListView.php index 68bb56cabf..87c5a6d7b5 100644 --- a/src/applications/phame/view/PhameDraftListView.php +++ b/src/applications/phame/view/PhameDraftListView.php @@ -53,7 +53,7 @@ final class PhameDraftListView extends AphrontTagView { $post->getTitle()); $icon = id(new PHUIIconView()) - ->setIconFont('fa-pencil-square-o') + ->setIcon('fa-pencil-square-o') ->addClass('phame-blog-list-icon'); $edit = phutil_tag( diff --git a/src/applications/phame/view/PhameNextPostView.php b/src/applications/phame/view/PhameNextPostView.php index 87f4f7aa1a..beabcd6d72 100644 --- a/src/applications/phame/view/PhameNextPostView.php +++ b/src/applications/phame/view/PhameNextPostView.php @@ -30,7 +30,7 @@ final class PhameNextPostView extends AphrontTagView { require_celerity_resource('phame-css'); $p_icon = id(new PHUIIconView()) - ->setIconFont('fa-angle-left'); + ->setIcon('fa-angle-left'); $previous_icon = phutil_tag( 'div', @@ -69,7 +69,7 @@ final class PhameNextPostView extends AphrontTagView { } $n_icon = id(new PHUIIconView()) - ->setIconFont('fa-angle-right'); + ->setIcon('fa-angle-right'); $next_icon = phutil_tag( 'div', diff --git a/src/applications/phid/PhabricatorObjectHandle.php b/src/applications/phid/PhabricatorObjectHandle.php index 4eb6178338..e49094e311 100644 --- a/src/applications/phid/PhabricatorObjectHandle.php +++ b/src/applications/phid/PhabricatorObjectHandle.php @@ -27,6 +27,7 @@ final class PhabricatorObjectHandle private $complete; private $objectName; private $policyFiltered; + private $subtitle; public function setIcon($icon) { $this->icon = $icon; @@ -44,6 +45,15 @@ final class PhabricatorObjectHandle return $this->getTypeIcon(); } + public function setSubtitle($subtitle) { + $this->subtitle = $subtitle; + return $this; + } + + public function getSubtitle() { + return $this->subtitle; + } + public function setTagColor($color) { static $colors; if (!$colors) { @@ -289,7 +299,7 @@ final class PhabricatorObjectHandle $icon = null; if ($this->getPolicyFiltered()) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-lock lightgreytext'); + ->setIcon('fa-lock lightgreytext'); } $attributes = $attributes + array( diff --git a/src/applications/phid/type/PhabricatorPHIDType.php b/src/applications/phid/type/PhabricatorPHIDType.php index e39ff5f562..99deb84763 100644 --- a/src/applications/phid/type/PhabricatorPHIDType.php +++ b/src/applications/phid/type/PhabricatorPHIDType.php @@ -25,7 +25,7 @@ abstract class PhabricatorPHIDType extends Phobject { $application_class = $this->getPHIDTypeApplicationClass(); if ($application_class) { $application = newv($application_class, array()); - return $application->getFontIcon(); + return $application->getIcon(); } return null; diff --git a/src/applications/phlux/application/PhabricatorPhluxApplication.php b/src/applications/phlux/application/PhabricatorPhluxApplication.php index aabd7c9d1a..cc0e1a750b 100644 --- a/src/applications/phlux/application/PhabricatorPhluxApplication.php +++ b/src/applications/phlux/application/PhabricatorPhluxApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPhluxApplication extends PhabricatorApplication { return pht('Key/Value Configuration Store'); } - public function getFontIcon() { + public function getIcon() { return 'fa-copy'; } diff --git a/src/applications/pholio/application/PhabricatorPholioApplication.php b/src/applications/pholio/application/PhabricatorPholioApplication.php index 16b868b9a1..ceb1e36638 100644 --- a/src/applications/pholio/application/PhabricatorPholioApplication.php +++ b/src/applications/pholio/application/PhabricatorPholioApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPholioApplication extends PhabricatorApplication { return pht('Review Mocks and Design'); } - public function getFontIcon() { + public function getIcon() { return 'fa-camera-retro'; } diff --git a/src/applications/pholio/config/PhabricatorPholioConfigOptions.php b/src/applications/pholio/config/PhabricatorPholioConfigOptions.php index db079a4b2b..30bea98554 100644 --- a/src/applications/pholio/config/PhabricatorPholioConfigOptions.php +++ b/src/applications/pholio/config/PhabricatorPholioConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPholioConfigOptions return pht('Configure Pholio.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-camera-retro'; } diff --git a/src/applications/pholio/query/PholioMockSearchEngine.php b/src/applications/pholio/query/PholioMockSearchEngine.php index 3c9d0b0d6b..2433484d69 100644 --- a/src/applications/pholio/query/PholioMockSearchEngine.php +++ b/src/applications/pholio/query/PholioMockSearchEngine.php @@ -137,7 +137,7 @@ final class PholioMockSearchEngine extends PhabricatorApplicationSearchEngine { ->setHref('/pholio/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/pholio/view/PholioMockImagesView.php b/src/applications/pholio/view/PholioMockImagesView.php index 8430ada3d4..d50dfb3b3a 100644 --- a/src/applications/pholio/view/PholioMockImagesView.php +++ b/src/applications/pholio/view/PholioMockImagesView.php @@ -126,12 +126,12 @@ final class PholioMockImagesView extends AphrontView { $full_icon = array( javelin_tag('span', array('aural' => true), pht('View Raw File')), - id(new PHUIIconView())->setIconFont('fa-file-image-o'), + id(new PHUIIconView())->setIcon('fa-file-image-o'), ); $download_icon = array( javelin_tag('span', array('aural' => true), pht('Download File')), - id(new PHUIIconView())->setIconFont('fa-download'), + id(new PHUIIconView())->setIcon('fa-download'), ); $login_uri = id(new PhutilURI('/login/')) diff --git a/src/applications/pholio/view/PholioTransactionView.php b/src/applications/pholio/view/PholioTransactionView.php index 7fad6bff9a..92624feec6 100644 --- a/src/applications/pholio/view/PholioTransactionView.php +++ b/src/applications/pholio/view/PholioTransactionView.php @@ -73,7 +73,7 @@ final class PholioTransactionView if ($inlines) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-comment bluegrey msr'); + ->setIcon('fa-comment bluegrey msr'); $header = phutil_tag( 'div', array( diff --git a/src/applications/phortune/application/PhabricatorPhortuneApplication.php b/src/applications/phortune/application/PhabricatorPhortuneApplication.php index cf7bc00b9a..470ceb10ab 100644 --- a/src/applications/phortune/application/PhabricatorPhortuneApplication.php +++ b/src/applications/phortune/application/PhabricatorPhortuneApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPhortuneApplication extends PhabricatorApplication { return pht('Accounts and Billing'); } - public function getFontIcon() { + public function getIcon() { return 'fa-diamond'; } diff --git a/src/applications/phortune/controller/PhortuneAccountListController.php b/src/applications/phortune/controller/PhortuneAccountListController.php index 0de082fa01..9b095186cc 100644 --- a/src/applications/phortune/controller/PhortuneAccountListController.php +++ b/src/applications/phortune/controller/PhortuneAccountListController.php @@ -48,9 +48,7 @@ final class PhortuneAccountListController extends PhortuneController { id(new PHUIButtonView()) ->setTag('a') ->setHref($this->getApplicationURI('account/edit/')) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-plus')) + ->setIcon('fa-plus') ->setText(pht('Create Account'))); $payment_box = id(new PHUIObjectBoxView()) @@ -80,9 +78,7 @@ final class PhortuneAccountListController extends PhortuneController { id(new PHUIButtonView()) ->setTag('a') ->setHref($this->getApplicationURI('merchant/')) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-list')) + ->setIcon('fa-list') ->setText(pht('View All Merchants'))); $merchant_box = id(new PHUIObjectBoxView()) diff --git a/src/applications/phortune/controller/PhortuneAccountViewController.php b/src/applications/phortune/controller/PhortuneAccountViewController.php index b5387b935e..001db3bebc 100644 --- a/src/applications/phortune/controller/PhortuneAccountViewController.php +++ b/src/applications/phortune/controller/PhortuneAccountViewController.php @@ -254,9 +254,7 @@ final class PhortuneAccountViewController extends PhortuneController { ->addActionLink( id(new PHUIButtonView()) ->setTag('a') - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-list')) + ->setIcon('fa-list') ->setHref($orders_uri) ->setText(pht('View All Orders'))); @@ -298,9 +296,7 @@ final class PhortuneAccountViewController extends PhortuneController { ->addActionLink( id(new PHUIButtonView()) ->setTag('a') - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-list')) + ->setIcon('fa-list') ->setHref($charges_uri) ->setText(pht('View All Charges'))); @@ -336,7 +332,7 @@ final class PhortuneAccountViewController extends PhortuneController { ->setTag('a') ->setIcon( id(new PHUIIconView()) - ->setIconFont('fa-list')) + ->setIcon('fa-list')) ->setHref($subscriptions_uri) ->setText(pht('View All Subscriptions'))); diff --git a/src/applications/phortune/controller/PhortuneCartViewController.php b/src/applications/phortune/controller/PhortuneCartViewController.php index 67f7c3df01..3beaa657c6 100644 --- a/src/applications/phortune/controller/PhortuneCartViewController.php +++ b/src/applications/phortune/controller/PhortuneCartViewController.php @@ -132,8 +132,7 @@ final class PhortuneCartViewController id(new PHUIButtonView()) ->setTag('a') ->setHref($done_uri) - ->setIcon(id(new PHUIIconView()) - ->setIconFont('fa-check-square green')) + ->setIcon('fa-check-square green') ->setText($cart->getDoneActionName())); } } diff --git a/src/applications/phortune/controller/PhortuneMerchantViewController.php b/src/applications/phortune/controller/PhortuneMerchantViewController.php index 4bedbd9e9c..55bb136dab 100644 --- a/src/applications/phortune/controller/PhortuneMerchantViewController.php +++ b/src/applications/phortune/controller/PhortuneMerchantViewController.php @@ -279,7 +279,7 @@ final class PhortuneMerchantViewController ->setText(pht('Add Payment Provider')) ->setDisabled(!$can_edit) ->setWorkflow(!$can_edit) - ->setIcon(id(new PHUIIconView())->setIconFont('fa-plus')); + ->setIcon('fa-plus'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Payment Providers')) diff --git a/src/applications/phortune/controller/PhortuneSubscriptionViewController.php b/src/applications/phortune/controller/PhortuneSubscriptionViewController.php index 8804499056..8ecc97c301 100644 --- a/src/applications/phortune/controller/PhortuneSubscriptionViewController.php +++ b/src/applications/phortune/controller/PhortuneSubscriptionViewController.php @@ -193,9 +193,7 @@ final class PhortuneSubscriptionViewController extends PhortuneController { ->addActionLink( id(new PHUIButtonView()) ->setTag('a') - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-list')) + ->setIcon('fa-list') ->setHref($invoices_uri) ->setText(pht('View All Invoices'))); diff --git a/src/applications/phortune/view/PhortuneCreditCardForm.php b/src/applications/phortune/view/PhortuneCreditCardForm.php index 6e4e2af38b..afd64075ea 100644 --- a/src/applications/phortune/view/PhortuneCreditCardForm.php +++ b/src/applications/phortune/view/PhortuneCreditCardForm.php @@ -107,7 +107,7 @@ final class PhortuneCreditCardForm extends Phobject { ), array( id(new PHUIIconView()) - ->setIconFont('fa-lock grey'), + ->setIcon('fa-lock grey'), ' ', $assurance, )); diff --git a/src/applications/phpast/application/PhabricatorPHPASTApplication.php b/src/applications/phpast/application/PhabricatorPHPASTApplication.php index 3118ed68c9..c61a6bf115 100644 --- a/src/applications/phpast/application/PhabricatorPHPASTApplication.php +++ b/src/applications/phpast/application/PhabricatorPHPASTApplication.php @@ -10,7 +10,7 @@ final class PhabricatorPHPASTApplication extends PhabricatorApplication { return '/xhpast/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-ambulance'; } diff --git a/src/applications/phragment/application/PhabricatorPhragmentApplication.php b/src/applications/phragment/application/PhabricatorPhragmentApplication.php index 9463835811..c5959f715f 100644 --- a/src/applications/phragment/application/PhabricatorPhragmentApplication.php +++ b/src/applications/phragment/application/PhabricatorPhragmentApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPhragmentApplication extends PhabricatorApplication { return pht('Versioned Artifact Storage'); } - public function getFontIcon() { + public function getIcon() { return 'fa-floppy-o'; } diff --git a/src/applications/phrequent/application/PhabricatorPhrequentApplication.php b/src/applications/phrequent/application/PhabricatorPhrequentApplication.php index bded663ed9..023827c644 100644 --- a/src/applications/phrequent/application/PhabricatorPhrequentApplication.php +++ b/src/applications/phrequent/application/PhabricatorPhrequentApplication.php @@ -18,7 +18,7 @@ final class PhabricatorPhrequentApplication extends PhabricatorApplication { return true; } - public function getFontIcon() { + public function getIcon() { return 'fa-clock-o'; } diff --git a/src/applications/phrequent/config/PhabricatorPhrequentConfigOptions.php b/src/applications/phrequent/config/PhabricatorPhrequentConfigOptions.php index a6113155a9..e1ba0adb54 100644 --- a/src/applications/phrequent/config/PhabricatorPhrequentConfigOptions.php +++ b/src/applications/phrequent/config/PhabricatorPhrequentConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPhrequentConfigOptions return pht('Configure Phrequent.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-clock-o'; } diff --git a/src/applications/phriction/application/PhabricatorPhrictionApplication.php b/src/applications/phriction/application/PhabricatorPhrictionApplication.php index 19967c2e70..7721749c36 100644 --- a/src/applications/phriction/application/PhabricatorPhrictionApplication.php +++ b/src/applications/phriction/application/PhabricatorPhrictionApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPhrictionApplication extends PhabricatorApplication { return '/w/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-book'; } diff --git a/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php b/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php index 7e6080dd7c..9fada90d3a 100644 --- a/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php +++ b/src/applications/phriction/config/PhabricatorPhrictionConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPhrictionConfigOptions return pht('Options related to Phriction (wiki).'); } - public function getFontIcon() { + public function getIcon() { return 'fa-book'; } diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index d7db7f6548..7d98e9ed3b 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -207,7 +207,7 @@ final class PhrictionDocumentController ->setTag('a') ->setText(pht('Actions')) ->setHref('#') - ->setIconFont('fa-bars') + ->setIcon('fa-bars') ->addClass('phui-mobile-menu') ->setDropdownMenu($actions); diff --git a/src/applications/phurl/application/PhabricatorPhurlApplication.php b/src/applications/phurl/application/PhabricatorPhurlApplication.php index 83952f6817..763a85173c 100644 --- a/src/applications/phurl/application/PhabricatorPhurlApplication.php +++ b/src/applications/phurl/application/PhabricatorPhurlApplication.php @@ -18,7 +18,7 @@ final class PhabricatorPhurlApplication extends PhabricatorApplication { return '/phurl/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-compress'; } diff --git a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php index ed8a336c3a..c652cfffdf 100644 --- a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php +++ b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php @@ -99,7 +99,7 @@ final class PhabricatorPhurlURLSearchEngine ->setHref('/phurl/url/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/policy/config/PhabricatorPolicyConfigOptions.php b/src/applications/policy/config/PhabricatorPolicyConfigOptions.php index 1c3698c4cd..eacc32cebe 100644 --- a/src/applications/policy/config/PhabricatorPolicyConfigOptions.php +++ b/src/applications/policy/config/PhabricatorPolicyConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorPolicyConfigOptions return pht('Options relating to object visibility.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-lock'; } diff --git a/src/applications/policy/storage/PhabricatorPolicy.php b/src/applications/policy/storage/PhabricatorPolicy.php index 93afb35dc9..f2bfb8ce48 100644 --- a/src/applications/policy/storage/PhabricatorPolicy.php +++ b/src/applications/policy/storage/PhabricatorPolicy.php @@ -274,7 +274,7 @@ final class PhabricatorPolicy $img = null; if ($icon) { $img = id(new PHUIIconView()) - ->setIconFont($this->getIcon()); + ->setIcon($this->getIcon()); } if ($this->getHref()) { diff --git a/src/applications/ponder/application/PhabricatorPonderApplication.php b/src/applications/ponder/application/PhabricatorPonderApplication.php index 886fddcc05..94a06edffa 100644 --- a/src/applications/ponder/application/PhabricatorPonderApplication.php +++ b/src/applications/ponder/application/PhabricatorPonderApplication.php @@ -14,7 +14,7 @@ final class PhabricatorPonderApplication extends PhabricatorApplication { return pht('Questions and Answers'); } - public function getFontIcon() { + public function getIcon() { return 'fa-university'; } diff --git a/src/applications/ponder/query/PonderQuestionSearchEngine.php b/src/applications/ponder/query/PonderQuestionSearchEngine.php index 7e08a3fdf4..4cba28b93b 100644 --- a/src/applications/ponder/query/PonderQuestionSearchEngine.php +++ b/src/applications/ponder/query/PonderQuestionSearchEngine.php @@ -187,7 +187,7 @@ final class PonderQuestionSearchEngine ->setHref('/ponder/question/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/ponder/view/PonderAnswerView.php b/src/applications/ponder/view/PonderAnswerView.php index 3951aa84a7..c0e90f7eca 100644 --- a/src/applications/ponder/view/PonderAnswerView.php +++ b/src/applications/ponder/view/PonderAnswerView.php @@ -74,7 +74,7 @@ final class PonderAnswerView extends AphrontTagView { ->setTag('a') ->setText(pht('Actions')) ->setHref('#') - ->setIconFont('fa-bars') + ->setIcon('fa-bars') ->setDropdownMenu($actions); $header_name = phutil_tag( @@ -116,7 +116,7 @@ final class PonderAnswerView extends AphrontTagView { $vote_class = 'ponder-footer-action-helpful'; } $icon = id(new PHUIIconView()) - ->setIconFont('fa-thumbs-up msr'); + ->setIcon('fa-thumbs-up msr'); $helpful = phutil_tag( 'span', array( diff --git a/src/applications/ponder/view/PonderFooterView.php b/src/applications/ponder/view/PonderFooterView.php index 26e35ec45a..be33863a9a 100644 --- a/src/applications/ponder/view/PonderFooterView.php +++ b/src/applications/ponder/view/PonderFooterView.php @@ -37,11 +37,11 @@ final class PonderFooterView extends AphrontTagView { if ($this->count == 0) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-comments msr'); + ->setIcon('fa-comments msr'); $text = pht('Add a Comment'); } else { $icon = id(new PHUIIconView()) - ->setIconFont('fa-comments msr'); + ->setIcon('fa-comments msr'); $text = pht('Show %d Comment(s)', new PhutilNumber($this->count)); } diff --git a/src/applications/project/application/PhabricatorProjectApplication.php b/src/applications/project/application/PhabricatorProjectApplication.php index 60e4412273..59904cb06b 100644 --- a/src/applications/project/application/PhabricatorProjectApplication.php +++ b/src/applications/project/application/PhabricatorProjectApplication.php @@ -18,7 +18,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication { return '/project/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-briefcase'; } @@ -86,7 +86,7 @@ final class PhabricatorProjectApplication extends PhabricatorApplication { ), 'update/(?P[1-9]\d*)/(?P[^/]+)/' => 'PhabricatorProjectUpdateController', - 'history/(?P[1-9]\d*)/' => 'PhabricatorProjectHistoryController', + 'manage/(?P[1-9]\d*)/' => 'PhabricatorProjectManageController', '(?Pwatch|unwatch)/(?P[1-9]\d*)/' => 'PhabricatorProjectWatchController', 'silence/(?P[1-9]\d*)/' diff --git a/src/applications/project/config/PhabricatorProjectConfigOptions.php b/src/applications/project/config/PhabricatorProjectConfigOptions.php index 73c013c887..84c24c39e8 100644 --- a/src/applications/project/config/PhabricatorProjectConfigOptions.php +++ b/src/applications/project/config/PhabricatorProjectConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorProjectConfigOptions return pht('Configure Projects.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-briefcase'; } diff --git a/src/applications/project/controller/PhabricatorProjectArchiveController.php b/src/applications/project/controller/PhabricatorProjectArchiveController.php index 505af27ef1..ee974bf8e8 100644 --- a/src/applications/project/controller/PhabricatorProjectArchiveController.php +++ b/src/applications/project/controller/PhabricatorProjectArchiveController.php @@ -20,7 +20,7 @@ final class PhabricatorProjectArchiveController return new Aphront404Response(); } - $edit_uri = $this->getApplicationURI('history/'.$project->getID().'/'); + $edit_uri = $this->getApplicationURI('manage/'.$project->getID().'/'); if ($request->isFormPost()) { if ($project->isArchived()) { diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index 9b7b76e62c..4d83ca6fa3 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -332,37 +332,32 @@ final class PhabricatorProjectBoardViewController ), $project->getName()); - $header = id(new PHUIHeaderView()) - ->setHeader($header_link) - ->setUser($viewer) - ->setNoBackground(true) - ->addActionLink($sort_menu) - ->addActionLink($filter_menu) - ->addActionLink($manage_menu) - ->setPolicyObject($project); - - $header_box = id(new PHUIBoxView()) - ->appendChild($header) - ->addClass('project-board-header'); - $board_box = id(new PHUIBoxView()) ->appendChild($board) ->addClass('project-board-wrapper'); $nav = $this->getProfileMenu(); + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb(pht('Workboard')); + $crumbs->setBorder(true); + + $crumbs->addAction($sort_menu); + $crumbs->addAction($filter_menu); + $crumbs->addAction($manage_menu); + return $this->newPage() ->setTitle(pht('%s Board', $project->getName())) ->setPageObjectPHIDs(array($project->getPHID())) ->setShowFooter(false) ->setNavigation($nav) + ->setCrumbs($crumbs) ->addQuicksandConfig( array( 'boardConfig' => $behavior_config, )) ->appendChild( array( - $header_box, $board_box, )); } @@ -410,7 +405,7 @@ final class PhabricatorProjectBoardViewController $sort_key) { $sort_icon = id(new PHUIIconView()) - ->setIconFont('fa-sort-amount-asc bluegrey'); + ->setIcon('fa-sort-amount-asc bluegrey'); $named = array( PhabricatorProjectColumn::ORDER_NATURAL => pht('Natural'), @@ -443,10 +438,9 @@ final class PhabricatorProjectBoardViewController $sort_menu->addAction($item); } - $sort_button = id(new PHUIButtonView()) - ->setText(pht('Sort: %s', $active_order)) - ->setIcon($sort_icon) - ->setTag('a') + $sort_button = id(new PHUIListItemView()) + ->setName(pht('Sort: %s', $active_order)) + ->setIcon('fa-sort-amount-asc') ->setHref('#') ->addSigil('boards-dropdown-menu') ->setMetadata( @@ -462,9 +456,6 @@ final class PhabricatorProjectBoardViewController PhabricatorApplicationSearchEngine $engine, $query_key) { - $filter_icon = id(new PHUIIconView()) - ->setIconFont('fa-search-plus bluegrey'); - $named = array( 'open' => pht('Open Tasks'), 'all' => pht('All Tasks'), @@ -521,10 +512,9 @@ final class PhabricatorProjectBoardViewController $filter_menu->addAction($item); } - $filter_button = id(new PHUIButtonView()) - ->setText(pht('Filter: %s', $active_filter)) - ->setIcon($filter_icon) - ->setTag('a') + $filter_button = id(new PHUIListItemView()) + ->setName(pht('Filter: %s', $active_filter)) + ->setIcon('fa-search') ->setHref('#') ->addSigil('boards-dropdown-menu') ->setMetadata( @@ -547,9 +537,6 @@ final class PhabricatorProjectBoardViewController $project, PhabricatorPolicyCapability::CAN_EDIT); - $manage_icon = id(new PHUIIconView()) - ->setIconFont('fa-cog bluegrey'); - $manage_items = array(); $manage_items[] = id(new PhabricatorActionView()) @@ -602,10 +589,9 @@ final class PhabricatorProjectBoardViewController $manage_menu->addAction($item); } - $manage_button = id(new PHUIButtonView()) - ->setText(pht('Manage Board')) - ->setIcon($manage_icon) - ->setTag('a') + $manage_button = id(new PHUIListItemView()) + ->setName(pht('Manage Board')) + ->setIcon('fa-cog') ->setHref('#') ->addSigil('boards-dropdown-menu') ->setMetadata( @@ -689,7 +675,7 @@ final class PhabricatorProjectBoardViewController } $column_button = id(new PHUIIconView()) - ->setIconFont('fa-caret-down') + ->setIcon('fa-caret-down') ->setHref('#') ->addSigil('boards-dropdown-menu') ->setMetadata( diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php index b0c013dadc..34a2c1b00e 100644 --- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php +++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php @@ -23,8 +23,8 @@ final class PhabricatorProjectEditPictureController $this->setProject($project); - $edit_uri = $this->getApplicationURI('history/'.$project->getID().'/'); - $view_uri = $this->getApplicationURI('history/'.$project->getID().'/'); + $edit_uri = $this->getApplicationURI('profile/'.$project->getID().'/'); + $view_uri = $this->getApplicationURI('profile/'.$project->getID().'/'); $supported_formats = PhabricatorFile::getTransformableImageFormats(); $e_file = true; @@ -255,7 +255,7 @@ final class PhabricatorProjectEditPictureController ->setForm($upload_form); $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorProject::PANEL_PROFILE); + $nav->selectFilter(PhabricatorProject::PANEL_MANAGE); return $this->newPage() ->setTitle($title) diff --git a/src/applications/project/controller/PhabricatorProjectHistoryController.php b/src/applications/project/controller/PhabricatorProjectManageController.php similarity index 83% rename from src/applications/project/controller/PhabricatorProjectHistoryController.php rename to src/applications/project/controller/PhabricatorProjectManageController.php index aa58e081f4..2721265493 100644 --- a/src/applications/project/controller/PhabricatorProjectHistoryController.php +++ b/src/applications/project/controller/PhabricatorProjectManageController.php @@ -1,6 +1,6 @@ setShouldTerminate(true); $nav = $this->getProfileMenu(); - $nav->selectFilter(PhabricatorProject::PANEL_PROFILE); + $nav->selectFilter(PhabricatorProject::PANEL_MANAGE); $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb(pht('History')); + $crumbs->addTextCrumb(pht('Manage')); return $this->newPage() ->setNavigation($nav) @@ -73,12 +73,6 @@ final class PhabricatorProjectHistoryController $project, PhabricatorPolicyCapability::CAN_EDIT); - $view->addAction( - id(new PhabricatorActionView()) - ->setName(pht('Back to Profile')) - ->setIcon('fa-chevron-left') - ->setHref($project->getURI())); - $view->addAction( id(new PhabricatorActionView()) ->setName(pht('Edit Details')) @@ -87,6 +81,14 @@ final class PhabricatorProjectHistoryController ->setDisabled(!$can_edit) ->setWorkflow(!$can_edit)); + $view->addAction( + id(new PhabricatorActionView()) + ->setName(pht('Edit Menu')) + ->setIcon('fa-th-list') + ->setHref($this->getApplicationURI("{$id}/panel/configure/")) + ->setDisabled(!$can_edit) + ->setWorkflow(!$can_edit)); + $view->addAction( id(new PhabricatorActionView()) ->setName(pht('Edit Picture')) @@ -126,6 +128,16 @@ final class PhabricatorProjectHistoryController ->setUser($viewer) ->setActionList($actions); + $view->addProperty( + pht('Looks Like'), + $viewer->renderHandle($project->getPHID())->setAsTag(true)); + + + $field_list = PhabricatorCustomField::getObjectFields( + $project, + PhabricatorCustomField::ROLE_VIEW); + $field_list->appendFieldsToPropertyList($project, $viewer, $view); + return $view; } diff --git a/src/applications/project/controller/PhabricatorProjectMilestonesController.php b/src/applications/project/controller/PhabricatorProjectMilestonesController.php index 595035bdb7..ebbe5bc2e3 100644 --- a/src/applications/project/controller/PhabricatorProjectMilestonesController.php +++ b/src/applications/project/controller/PhabricatorProjectMilestonesController.php @@ -50,7 +50,7 @@ final class PhabricatorProjectMilestonesController id(new PHUIButtonView()) ->setTag('a') ->setHref("/project/edit/?milestone={$id}") - ->setIconFont('fa-plus') + ->setIcon('fa-plus') ->setDisabled(!$can_create) ->setWorkflow(!$can_create) ->setText($button_text)); diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index 721193c469..c03b82b05d 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -22,7 +22,8 @@ final class PhabricatorProjectProfileController ->setHeader($project->getName()) ->setUser($viewer) ->setPolicyObject($project) - ->setImage($picture); + ->setImage($picture) + ->setProfileHeader(true); if ($project->getStatus() == PhabricatorProjectStatus::STATUS_ACTIVE) { $header->setStatus('fa-check', 'bluegrey', pht('Active')); @@ -30,30 +31,37 @@ final class PhabricatorProjectProfileController $header->setStatus('fa-ban', 'red', pht('Archived')); } - $actions = $this->buildActionListView($project); - $properties = $this->buildPropertyListView($project, $actions); + $can_edit = PhabricatorPolicyFilter::hasCapability( + $viewer, + $project, + PhabricatorPolicyCapability::CAN_EDIT); - $object_box = id(new PHUIObjectBoxView()) - ->setHeader($header) - ->addPropertyList($properties); + if ($can_edit) { + $header->setImageEditURL($this->getApplicationURI("picture/{$id}/")); + } + + $properties = $this->buildPropertyListView($project); + + $watch_action = $this->renderWatchAction($project); + $header->addActionLink($watch_action); $member_list = id(new PhabricatorProjectMemberListView()) ->setUser($viewer) ->setProject($project) ->setLimit(5) + ->setBackground(PHUIBoxView::GREY) ->setUserPHIDs($project->getMemberPHIDs()); $watcher_list = id(new PhabricatorProjectWatcherListView()) ->setUser($viewer) ->setProject($project) ->setLimit(5) + ->setBackground(PHUIBoxView::GREY) ->setUserPHIDs($project->getWatcherPHIDs()); $nav = $this->getProfileMenu(); $nav->selectFilter(PhabricatorProject::PANEL_PROFILE); - $watch_action = $this->renderWatchAction($project); - $stories = id(new PhabricatorFeedQuery()) ->setViewer($viewer) ->setFilterPHIDs( @@ -63,27 +71,34 @@ final class PhabricatorProjectProfileController ->setLimit(50) ->execute(); - $feed = $this->renderStories($stories); + $feed = phutil_tag_div('project-view-feed', $feed); - $feed_header = id(new PHUIHeaderView()) - ->setHeader(pht('Recent Activity')) - ->addActionLink($watch_action); - - $feed = id(new PHUIObjectBoxView()) - ->setHeader($feed_header) - ->appendChild($feed); - - $columns = id(new AphrontMultiColumnView()) - ->setFluidLayout(true) - ->addColumn($feed) - ->addColumn( + $columns = id(new PHUITwoColumnView()) + ->setMainColumn( + array( + $properties, + $feed, + )) + ->setSideColumn( array( $member_list, $watcher_list, )); $crumbs = $this->buildApplicationCrumbs(); + $crumbs->setBorder(true); + + require_celerity_resource('project-view-css'); + $home = phutil_tag( + 'div', + array( + 'class' => 'project-view-home', + ), + array( + $header, + $columns, + )); return $this->newPage() ->setNavigation($nav) @@ -92,50 +107,33 @@ final class PhabricatorProjectProfileController ->setPageObjectPHIDs(array($project->getPHID())) ->appendChild( array( - $object_box, - $columns, + $home, )); } - private function buildActionListView(PhabricatorProject $project) { - $request = $this->getRequest(); - $viewer = $request->getUser(); - - $id = $project->getID(); - - $view = id(new PhabricatorActionListView()) - ->setUser($viewer) - ->setObject($project); - - $view->addAction( - id(new PhabricatorActionView()) - ->setName(pht('Edit Project')) - ->setIcon('fa-pencil') - ->setHref($this->getApplicationURI("history/{$id}/"))); - - return $view; - } - private function buildPropertyListView( - PhabricatorProject $project, - PhabricatorActionListView $actions) { + PhabricatorProject $project) { $request = $this->getRequest(); $viewer = $request->getUser(); $view = id(new PHUIPropertyListView()) ->setUser($viewer) - ->setObject($project) - ->setActionList($actions); - - $view->addProperty( - pht('Looks Like'), - $viewer->renderHandle($project->getPHID())->setAsTag(true)); + ->setObject($project); $field_list = PhabricatorCustomField::getObjectFields( $project, PhabricatorCustomField::ROLE_VIEW); $field_list->appendFieldsToPropertyList($project, $viewer, $view); + if ($view->isEmpty()) { + return null; + } + + $view = id(new PHUIBoxView()) + ->setColor(PHUIBoxView::GREY) + ->appendChild($view) + ->addClass('project-view-properties'); + return $view; } @@ -147,7 +145,7 @@ final class PhabricatorProjectProfileController $builder->setShowHovercards(true); $view = $builder->buildView(); - return phutil_tag_div('profile-feed', $view->render()); + return $view; } private function renderWatchAction(PhabricatorProject $project) { @@ -168,7 +166,7 @@ final class PhabricatorProjectProfileController } $watch_icon = id(new PHUIIconView()) - ->setIconFont($watch_icon); + ->setIcon($watch_icon); return id(new PHUIButtonView()) ->setTag('a') diff --git a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php index e512d12a6e..a88bf7d07c 100644 --- a/src/applications/project/controller/PhabricatorProjectSubprojectsController.php +++ b/src/applications/project/controller/PhabricatorProjectSubprojectsController.php @@ -50,7 +50,7 @@ final class PhabricatorProjectSubprojectsController id(new PHUIButtonView()) ->setTag('a') ->setHref("/project/edit/?parent={$id}") - ->setIconFont('fa-plus') + ->setIcon('fa-plus') ->setDisabled(!$can_create) ->setWorkflow(!$can_create) ->setText($button_text)); diff --git a/src/applications/project/engine/PhabricatorProjectEditEngine.php b/src/applications/project/engine/PhabricatorProjectEditEngine.php index c9861e96a6..95416989df 100644 --- a/src/applications/project/engine/PhabricatorProjectEditEngine.php +++ b/src/applications/project/engine/PhabricatorProjectEditEngine.php @@ -82,7 +82,7 @@ final class PhabricatorProjectEditEngine return $object->getURI(); } else { $id = $object->getID(); - return "/project/history/{$id}/"; + return "/project/manage/{$id}/"; } } diff --git a/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php b/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php index d37178ef7a..612022d380 100644 --- a/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php +++ b/src/applications/project/engine/PhabricatorProjectProfilePanelEngine.php @@ -3,6 +3,10 @@ final class PhabricatorProjectProfilePanelEngine extends PhabricatorProfilePanelEngine { + protected function isPanelEngineConfigurable() { + return true; + } + protected function getPanelURI($path) { $project = $this->getProfileObject(); $id = $project->getID(); @@ -24,6 +28,10 @@ final class PhabricatorProjectProfilePanelEngine ->setBuiltinKey(PhabricatorProject::PANEL_MEMBERS) ->setPanelKey(PhabricatorProjectMembersProfilePanel::PANELKEY); + $panels[] = $this->newPanel() + ->setBuiltinKey(PhabricatorProject::PANEL_MANAGE) + ->setPanelKey(PhabricatorProjectManageProfilePanel::PANELKEY); + return $panels; } diff --git a/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php b/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php index ccb29d86ef..cd481946b2 100644 --- a/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php +++ b/src/applications/project/engineextension/PhabricatorProjectsEditEngineExtension.php @@ -44,13 +44,13 @@ final class PhabricatorProjectsEditEngineExtension $projects_field = id(new PhabricatorProjectsEditField()) ->setKey('projectPHIDs') - ->setLabel(pht('Projects')) + ->setLabel(pht('Tags')) ->setEditTypeKey('projects') - ->setAliases(array('project', 'projects')) + ->setAliases(array('project', 'projects', 'tag', 'tags')) ->setIsCopyable(true) ->setUseEdgeTransactions(true) - ->setCommentActionLabel(pht('Change Projects')) - ->setDescription(pht('Select projects for the object.')) + ->setCommentActionLabel(pht('Change Project Tags')) + ->setDescription(pht('Select project tags for the object.')) ->setTransactionType($edge_type) ->setMetadataValue('edge:type', $project_edge_type) ->setValue($project_phids); @@ -58,14 +58,14 @@ final class PhabricatorProjectsEditEngineExtension $projects_field->setViewer($engine->getViewer()); $edit_add = $projects_field->getConduitEditType('projects.add') - ->setConduitDescription(pht('Add projects.')); + ->setConduitDescription(pht('Add project tags.')); $edit_set = $projects_field->getConduitEditType('projects.set') ->setConduitDescription( - pht('Set projects, overwriting current value.')); + pht('Set project tags, overwriting current value.')); $edit_rem = $projects_field->getConduitEditType('projects.remove') - ->setConduitDescription(pht('Remove projects.')); + ->setConduitDescription(pht('Remove project tags.')); return array( $projects_field, diff --git a/src/applications/project/engineextension/PhabricatorProjectsMembersSearchEngineAttachment.php b/src/applications/project/engineextension/PhabricatorProjectsMembersSearchEngineAttachment.php new file mode 100644 index 0000000000..9418ba2b4f --- /dev/null +++ b/src/applications/project/engineextension/PhabricatorProjectsMembersSearchEngineAttachment.php @@ -0,0 +1,31 @@ +needMembers(true); + } + + public function getAttachmentForObject($object, $data, $spec) { + $members = array(); + foreach ($object->getMemberPHIDs() as $member_phid) { + $members[] = array( + 'phid' => $member_phid, + ); + } + + return array( + 'members' => $members, + ); + } + +} diff --git a/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php b/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php index 37d00e9391..031dad7577 100644 --- a/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php +++ b/src/applications/project/engineextension/PhabricatorProjectsSearchEngineExtension.php @@ -41,10 +41,10 @@ final class PhabricatorProjectsSearchEngineExtension $fields[] = id(new PhabricatorProjectSearchField()) ->setKey('projectPHIDs') ->setConduitKey('projects') - ->setAliases(array('project', 'projects')) - ->setLabel(pht('Projects')) + ->setAliases(array('project', 'projects', 'tag', 'tags')) + ->setLabel(pht('Tags')) ->setDescription( - pht('Search for objects associated with given projects.')); + pht('Search for objects tagged with given projects.')); return $fields; } diff --git a/src/applications/project/engineextension/PhabricatorProjectsWatchersSearchEngineAttachment.php b/src/applications/project/engineextension/PhabricatorProjectsWatchersSearchEngineAttachment.php new file mode 100644 index 0000000000..ad98dfaf1c --- /dev/null +++ b/src/applications/project/engineextension/PhabricatorProjectsWatchersSearchEngineAttachment.php @@ -0,0 +1,31 @@ +needWatchers(true); + } + + public function getAttachmentForObject($object, $data, $spec) { + $watchers = array(); + foreach ($object->getWatcherPHIDs() as $watcher_phid) { + $watchers[] = array( + 'phid' => $watcher_phid, + ); + } + + return array( + 'watchers' => $watchers, + ); + } + +} diff --git a/src/applications/project/icon/PhabricatorProjectIconSet.php b/src/applications/project/icon/PhabricatorProjectIconSet.php index 6744353b7c..7e48cdfd74 100644 --- a/src/applications/project/icon/PhabricatorProjectIconSet.php +++ b/src/applications/project/icon/PhabricatorProjectIconSet.php @@ -336,6 +336,11 @@ final class PhabricatorProjectIconSet return $list; } + public static function getColorName($color_key) { + $map = self::getColorMap(); + return idx($map, $color_key); + } + public static function getDefaultColorMap() { return array( array( diff --git a/src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php b/src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php new file mode 100644 index 0000000000..ae66c4cc3e --- /dev/null +++ b/src/applications/project/profilepanel/PhabricatorProjectManageProfilePanel.php @@ -0,0 +1,69 @@ +getPanelProperty('name'); + + if (strlen($name)) { + return $name; + } + + return $this->getDefaultName(); + } + + public function buildEditEngineFields( + PhabricatorProfilePanelConfiguration $config) { + return array( + id(new PhabricatorTextEditField()) + ->setKey('name') + ->setLabel(pht('Name')) + ->setPlaceholder($this->getDefaultName()) + ->setValue($config->getPanelProperty('name')), + ); + } + + protected function newNavigationMenuItems( + PhabricatorProfilePanelConfiguration $config) { + + $project = $config->getProfileObject(); + + $id = $project->getID(); + + $name = $this->getDisplayName($config); + $icon = 'fa-gears'; + $href = "/project/manage/{$id}/"; + + $item = $this->newItem() + ->setHref($href) + ->setName($name) + ->setIcon($icon); + + return array( + $item, + ); + } + +} diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php index 7d533c8a11..ea91dc9754 100644 --- a/src/applications/project/query/PhabricatorProjectSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php @@ -137,7 +137,7 @@ final class PhabricatorProjectSearchEngine $options[$icon->getKey()] = array( id(new PHUIIconView()) - ->setIconFont($icon->getIcon()), + ->setIcon($icon->getIcon()), ' ', $icon->getLabel(), ); @@ -185,7 +185,7 @@ final class PhabricatorProjectSearchEngine ->setHref('/project/edit/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/project/storage/PhabricatorProject.php b/src/applications/project/storage/PhabricatorProject.php index 97ed2765ef..6cf116688e 100644 --- a/src/applications/project/storage/PhabricatorProject.php +++ b/src/applications/project/storage/PhabricatorProject.php @@ -49,6 +49,7 @@ final class PhabricatorProject extends PhabricatorProjectDAO const PANEL_PROFILE = 'project.profile'; const PANEL_WORKBOARD = 'project.workboard'; const PANEL_MEMBERS = 'project.members'; + const PANEL_MANAGE = 'project.manage'; const PANEL_MILESTONES = 'project.milestones'; const PANEL_SUBPROJECTS = 'project.subprojects'; @@ -627,10 +628,17 @@ final class PhabricatorProject extends PhabricatorProjectDAO ->setKey('icon') ->setType('map') ->setDescription(pht('Information about the project icon.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('color') + ->setType('map') + ->setDescription(pht('Information about the project color.')), ); } public function getFieldValuesForConduit() { + $color_key = $this->getColor(); + $color_name = PhabricatorProjectIconSet::getColorName($color_key); + return array( 'name' => $this->getName(), 'slug' => $this->getPrimarySlug(), @@ -639,11 +647,20 @@ final class PhabricatorProject extends PhabricatorProjectDAO 'name' => $this->getDisplayIconName(), 'icon' => $this->getDisplayIconIcon(), ), + 'color' => array( + 'key' => $color_key, + 'name' => $color_name, + ), ); } public function getConduitSearchAttachments() { - return array(); + return array( + id(new PhabricatorProjectsMembersSearchEngineAttachment()) + ->setAttachmentKey('members'), + id(new PhabricatorProjectsWatchersSearchEngineAttachment()) + ->setAttachmentKey('watchers'), + ); } } diff --git a/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php b/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php index 156f04605f..d7d22f2417 100644 --- a/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php +++ b/src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php @@ -4,11 +4,11 @@ final class PhabricatorProjectNoProjectsDatasource extends PhabricatorTypeaheadDatasource { public function getBrowseTitle() { - return pht('Browse Not In Any Projects'); + return pht('Browse Not Tagged With Any Projects'); } public function getPlaceholderText() { - return pht('Type "not in any projects"...'); + return pht('Type "not tagged with any projects"...'); } public function getDatasourceApplicationClass() { @@ -18,10 +18,11 @@ final class PhabricatorProjectNoProjectsDatasource public function getDatasourceFunctions() { return array( 'null' => array( - 'name' => pht('Not In Any Projects'), - 'summary' => pht('Find results which are not in any projects.'), + 'name' => pht('Not Tagged With Any Projects'), + 'summary' => pht( + 'Find results which are not tagged with any projects.'), 'description' => pht( - "This function matches results which are not associated with any ". + "This function matches results which are not tagged with any ". "projects. It is usually most often used to find objects which ". "might have slipped through the cracks and not been organized ". "properly.\n\n%s", @@ -60,7 +61,7 @@ final class PhabricatorProjectNoProjectsDatasource } private function buildNullResult() { - $name = pht('Not In Any Projects'); + $name = pht('Not Tagged With Any Projects'); return $this->newFunctionResult() ->setUnique(true) diff --git a/src/applications/project/view/PhabricatorProjectListView.php b/src/applications/project/view/PhabricatorProjectListView.php index 87874e3594..3d6044f2b1 100644 --- a/src/applications/project/view/PhabricatorProjectListView.php +++ b/src/applications/project/view/PhabricatorProjectListView.php @@ -29,7 +29,7 @@ final class PhabricatorProjectListView extends AphrontView { $color = $project->getColor(); $icon_icon = id(new PHUIIconView()) - ->setIconFont("{$icon} {$color}"); + ->setIcon("{$icon} {$color}"); $icon_name = $project->getDisplayIconName(); diff --git a/src/applications/project/view/PhabricatorProjectUserListView.php b/src/applications/project/view/PhabricatorProjectUserListView.php index 138d51cbf3..715e28f944 100644 --- a/src/applications/project/view/PhabricatorProjectUserListView.php +++ b/src/applications/project/view/PhabricatorProjectUserListView.php @@ -5,6 +5,7 @@ abstract class PhabricatorProjectUserListView extends AphrontView { private $project; private $userPHIDs; private $limit; + private $background; public function setProject(PhabricatorProject $project) { $this->project = $project; @@ -33,6 +34,11 @@ abstract class PhabricatorProjectUserListView extends AphrontView { return $this->limit; } + public function setBackground($color) { + $this->background = $color; + return $this; + } + abstract protected function canEditList(); abstract protected function getNoDataString(); abstract protected function getRemoveURI($phid); @@ -79,6 +85,13 @@ abstract class PhabricatorProjectUserListView extends AphrontView { ->setHref($handle->getURI()) ->setImageURI($handle->getImageURI()); + $icon = id(new PHUIIconView()) + ->setIcon($handle->getIcon().' lightbluetext'); + + $subtitle = $handle->getSubtitle(); + + $item->addAttribute(array($icon, ' ', $subtitle)); + if ($can_edit && !$limit) { $remove_uri = $this->getRemoveURI($user_phid); @@ -113,14 +126,20 @@ abstract class PhabricatorProjectUserListView extends AphrontView { ->setTag('a') ->setIcon( id(new PHUIIconView()) - ->setIconFont('fa-list-ul')) + ->setIcon('fa-list-ul')) ->setText(pht('View All')) ->setHref("/project/members/{$id}/")); } - return id(new PHUIObjectBoxView()) + $box = id(new PHUIObjectBoxView()) ->setHeader($header) ->setObjectList($list); + + if ($this->background) { + $box->setBackground($this->background); + } + + return $box; } } diff --git a/src/applications/releeph/application/PhabricatorReleephApplication.php b/src/applications/releeph/application/PhabricatorReleephApplication.php index ba19ae4321..ab5a12dc80 100644 --- a/src/applications/releeph/application/PhabricatorReleephApplication.php +++ b/src/applications/releeph/application/PhabricatorReleephApplication.php @@ -14,7 +14,7 @@ final class PhabricatorReleephApplication extends PhabricatorApplication { return '/releeph/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-flag-checkered'; } diff --git a/src/applications/releeph/config/PhabricatorReleephApplicationConfigOptions.php b/src/applications/releeph/config/PhabricatorReleephApplicationConfigOptions.php index 86f78a48fe..08dace52a7 100644 --- a/src/applications/releeph/config/PhabricatorReleephApplicationConfigOptions.php +++ b/src/applications/releeph/config/PhabricatorReleephApplicationConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorReleephApplicationConfigOptions return pht('Options for configuring Releeph, the release branch tool.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-flag-checkered'; } diff --git a/src/applications/repository/config/PhabricatorRepositoryConfigOptions.php b/src/applications/repository/config/PhabricatorRepositoryConfigOptions.php index fa8e38e063..26e0e9d5d1 100644 --- a/src/applications/repository/config/PhabricatorRepositoryConfigOptions.php +++ b/src/applications/repository/config/PhabricatorRepositoryConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorRepositoryConfigOptions return pht('Configure repositories.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-hdd-o'; } diff --git a/src/applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php b/src/applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php new file mode 100644 index 0000000000..45ed2819fb --- /dev/null +++ b/src/applications/repository/phid/PhabricatorRepositoryPullEventPHIDType.php @@ -0,0 +1,39 @@ +withPHIDs($phids); + } + + public function loadHandles( + PhabricatorHandleQuery $query, + array $handles, + array $objects) { + + foreach ($handles as $phid => $handle) { + $event = $objects[$phid]; + + $handle->setName(pht('Pull Event %d', $event->getID())); + } + } + +} diff --git a/src/applications/repository/query/PhabricatorRepositoryPullEventQuery.php b/src/applications/repository/query/PhabricatorRepositoryPullEventQuery.php new file mode 100644 index 0000000000..1063cdb48c --- /dev/null +++ b/src/applications/repository/query/PhabricatorRepositoryPullEventQuery.php @@ -0,0 +1,97 @@ +ids = $ids; + return $this; + } + + public function withPHIDs(array $phids) { + $this->phids = $phids; + return $this; + } + + public function withRepositoryPHIDs(array $repository_phids) { + $this->repositoryPHIDs = $repository_phids; + return $this; + } + + public function withPullerPHIDs(array $puller_phids) { + $this->pullerPHIDs = $puller_phids; + return $this; + } + + public function newResultObject() { + return new PhabricatorRepositoryPullEvent(); + } + + protected function loadPage() { + return $this->loadStandardPage($this->newResultObject()); + } + + protected function willFilterPage(array $events) { + $repository_phids = mpull($events, 'getRepositoryPHID'); + $repositories = id(new PhabricatorRepositoryQuery()) + ->setViewer($this->getViewer()) + ->withPHIDs($repository_phids) + ->execute(); + $repositories = mpull($repositories, null, 'getPHID'); + + foreach ($events as $key => $event) { + $phid = $event->getRepositoryPHID(); + if (empty($repositories[$phid])) { + unset($events[$key]); + continue; + } + $event->attachRepository($repositories[$phid]); + } + + return $events; + } + + protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { + $where = parent::buildWhereClauseParts($conn); + + if ($this->ids !== null) { + $where[] = qsprintf( + $conn, + 'id IN (%Ld)', + $this->ids); + } + + if ($this->phids !== null) { + $where[] = qsprintf( + $conn, + 'phid IN (%Ls)', + $this->phids); + } + + if ($this->repositoryPHIDs !== null) { + $where[] = qsprintf( + $conn, + 'repositoryPHID IN (%Ls)', + $this->repositoryPHIDs); + } + + if ($this->pullerPHIDs !== null) { + $where[] = qsprintf( + $conn, + 'pullerPHID in (%Ls)', + $this->pullerPHIDs); + } + + return $where; + } + + public function getQueryApplicationClass() { + return 'PhabricatorDiffusionApplication'; + } + +} diff --git a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php index 83ec6c92e2..059ae9a76d 100644 --- a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php +++ b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php @@ -254,7 +254,7 @@ final class PhabricatorRepositorySearchEngine ->setHref('/diffusion/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php b/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php new file mode 100644 index 0000000000..d17fded9a8 --- /dev/null +++ b/src/applications/repository/storage/PhabricatorRepositoryPullEvent.php @@ -0,0 +1,87 @@ +setPusherPHID($viewer->getPHID()); + } + + protected function getConfiguration() { + return array( + self::CONFIG_AUX_PHID => true, + self::CONFIG_TIMESTAMPS => false, + self::CONFIG_SERIALIZATION => array( + 'properties' => self::SERIALIZATION_JSON, + ), + self::CONFIG_COLUMN_SCHEMA => array( + 'repositoryPHID' => 'phid?', + 'pullerPHID' => 'phid?', + 'remoteAddress' => 'uint32?', + 'remoteProtocol' => 'text32?', + 'resultType' => 'text32', + 'resultCode' => 'uint32', + ), + self::CONFIG_KEY_SCHEMA => array( + 'key_repository' => array( + 'columns' => array('repositoryPHID'), + ), + 'key_epoch' => array( + 'columns' => array('epoch'), + ), + ), + ) + parent::getConfiguration(); + } + + public function generatePHID() { + return PhabricatorPHID::generateNewPHID( + PhabricatorRepositoryPullEventPHIDType::TYPECONST); + } + + public function attachRepository(PhabricatorRepository $repository) { + $this->repository = $repository; + return $this; + } + + public function getRepository() { + return $this->assertAttached($this->repository); + } + + +/* -( PhabricatorPolicyInterface )----------------------------------------- */ + + + public function getCapabilities() { + return array( + PhabricatorPolicyCapability::CAN_VIEW, + ); + } + + public function getPolicy($capability) { + return $this->getRepository()->getPolicy($capability); + } + + public function hasAutomaticCapability($capability, PhabricatorUser $viewer) { + return $this->getRepository()->hasAutomaticCapability($capability, $viewer); + } + + public function describeAutomaticCapability($capability) { + return pht( + "A repository's pull events are visible to users who can see the ". + "repository."); + } + +} diff --git a/src/applications/search/application/PhabricatorSearchApplication.php b/src/applications/search/application/PhabricatorSearchApplication.php index 5b09e21a9e..bd3f78359e 100644 --- a/src/applications/search/application/PhabricatorSearchApplication.php +++ b/src/applications/search/application/PhabricatorSearchApplication.php @@ -18,7 +18,7 @@ final class PhabricatorSearchApplication extends PhabricatorApplication { return pht('Find stuff in big piles.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-search'; } diff --git a/src/applications/search/config/PhabricatorSearchConfigOptions.php b/src/applications/search/config/PhabricatorSearchConfigOptions.php index 453821bc49..2f2cc4f902 100644 --- a/src/applications/search/config/PhabricatorSearchConfigOptions.php +++ b/src/applications/search/config/PhabricatorSearchConfigOptions.php @@ -11,7 +11,7 @@ final class PhabricatorSearchConfigOptions return pht('Options relating to Search.'); } - public function getFontIcon() { + public function getIcon() { return 'fa-search'; } diff --git a/src/applications/search/engine/PhabricatorProfilePanelEngine.php b/src/applications/search/engine/PhabricatorProfilePanelEngine.php index 3622e43976..09307cd340 100644 --- a/src/applications/search/engine/PhabricatorProfilePanelEngine.php +++ b/src/applications/search/engine/PhabricatorProfilePanelEngine.php @@ -49,9 +49,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { abstract protected function getPanelURI($path); - protected function isPanelEngineConfigurable() { - return PhabricatorEnv::getEnvConfig('phabricator.show-prototypes'); - } + abstract protected function isPanelEngineConfigurable(); public function buildResponse() { $controller = $this->getController(); @@ -371,47 +369,8 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { ->setHideInApplicationMenu(true) ->addClass('phui-profile-menu-spacer'); - if ($this->isPanelEngineConfigurable()) { - $viewer = $this->getViewer(); - $object = $this->getProfileObject(); - - $can_edit = PhabricatorPolicyFilter::hasCapability( - $viewer, - $object, - PhabricatorPolicyCapability::CAN_EDIT); - - $expanded_edit_icon = id(new PHUIIconCircleView()) - ->addClass('phui-list-item-icon') - ->addClass('phui-profile-menu-visible-when-expanded') - ->setIconFont('fa-pencil'); - - $collapsed_edit_icon = id(new PHUIIconCircleView()) - ->addClass('phui-list-item-icon') - ->addClass('phui-profile-menu-visible-when-collapsed') - ->setIconFont('fa-pencil') - ->addSigil('has-tooltip') - ->setMetadata( - array( - 'tip' => pht('Edit Menu'), - 'align' => 'E', - )); - - $items[] = id(new PHUIListItemView()) - ->setName('Edit Menu') - ->setKey('panel.configure') - ->addIcon($expanded_edit_icon) - ->addIcon($collapsed_edit_icon) - ->addClass('phui-profile-menu-footer') - ->addClass('phui-profile-menu-footer-1') - ->setHref($this->getPanelURI('configure/')) - ->setDisabled(!$can_edit) - ->setWorkflow(!$can_edit); - } - $collapse_id = celerity_generate_unique_node_id(); - $viewer = $this->getViewer(); - $collapse_key = PhabricatorUserPreferences::PREFERENCE_PROFILE_MENU_COLLAPSED; @@ -442,7 +401,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { $collapse_icon = id(new PHUIIconCircleView()) ->addClass('phui-list-item-icon') ->addClass('phui-profile-menu-visible-when-expanded') - ->setIconFont('fa-angle-left'); + ->setIcon('fa-chevron-left'); $expand_icon = id(new PHUIIconCircleView()) ->addClass('phui-list-item-icon') @@ -453,7 +412,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { 'tip' => pht('Expand'), 'align' => 'E', )) - ->setIconFont('fa-angle-right'); + ->setIcon('fa-chevron-right'); $items[] = id(new PHUIListItemView()) ->setName('Collapse') @@ -461,7 +420,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { ->addIcon($expand_icon) ->setID($collapse_id) ->addClass('phui-profile-menu-footer') - ->addClass('phui-profile-menu-footer-2') + ->addClass('phui-profile-menu-footer-1') ->setHideInApplicationMenu(true) ->setHref('#'); @@ -639,10 +598,13 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { $hide_text = pht('Delete'); } + $can_disable = $panel->canHidePanel(); + $item->addAction( id(new PHUIListItemView()) ->setHref($hide_uri) ->setWorkflow(true) + ->setDisabled(!$can_disable) ->setName($hide_text) ->setIcon($hide_icon)); } @@ -696,7 +658,7 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { ->setTag('a') ->setText(pht('Configure Menu')) ->setHref('#') - ->setIconFont('fa-gear') + ->setIcon('fa-gear') ->setDropdownMenu($action_view); $header = id(new PHUIHeaderView()) @@ -800,6 +762,14 @@ abstract class PhabricatorProfilePanelEngine extends Phobject { $configuration, PhabricatorPolicyCapability::CAN_EDIT); + if (!$configuration->canHidePanel()) { + return $controller->newDialog() + ->setTitle(pht('Mandatory Panel')) + ->appendParagraph( + pht('This panel is very important, and can not be disabled.')) + ->addCancelButton($this->getConfigureURI()); + } + if ($configuration->getBuiltinKey() === null) { $new_value = null; diff --git a/src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php b/src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php index 73668fdd41..3537520903 100644 --- a/src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php +++ b/src/applications/search/profilepanel/PhabricatorMotivatorProfilePanel.php @@ -68,7 +68,7 @@ final class PhabricatorMotivatorProfilePanel case 'catfacts': default: $fact = array( - id(new PHUIIconView())->setIconFont('fa-paw'), + id(new PHUIIconView())->setIcon('fa-paw'), ' ', $fact, ); diff --git a/src/applications/search/profilepanel/PhabricatorProfilePanel.php b/src/applications/search/profilepanel/PhabricatorProfilePanel.php index 49159dbf8d..8316d13467 100644 --- a/src/applications/search/profilepanel/PhabricatorProfilePanel.php +++ b/src/applications/search/profilepanel/PhabricatorProfilePanel.php @@ -30,6 +30,11 @@ abstract class PhabricatorProfilePanel extends Phobject { return false; } + public function canHidePanel( + PhabricatorProfilePanelConfiguration $config) { + return true; + } + public function canMakeDefault( PhabricatorProfilePanelConfiguration $config) { return false; diff --git a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php index e1502294d3..835e483cff 100644 --- a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php +++ b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php @@ -163,7 +163,7 @@ final class PhabricatorSearchApplicationSearchEngine ->appendControl( id(new AphrontFormTokenizerControl()) ->setName('projectPHIDs') - ->setLabel(pht('In Any Project')) + ->setLabel(pht('Tags')) ->setDatasource(new PhabricatorProjectDatasource()) ->setValue($project_phids)); } diff --git a/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php b/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php index 127ce6b688..faeaeb5207 100644 --- a/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php +++ b/src/applications/search/storage/PhabricatorProfilePanelConfiguration.php @@ -105,6 +105,10 @@ final class PhabricatorProfilePanelConfiguration return $this->getPanel()->canMakeDefault($this); } + public function canHidePanel() { + return $this->getPanel()->canHidePanel($this); + } + public function getSortKey() { $order = $this->getPanelOrder(); if ($order === null) { @@ -120,6 +124,9 @@ final class PhabricatorProfilePanelConfiguration } public function isDisabled() { + if (!$this->canHidePanel()) { + return false; + } return ($this->getVisibility() === self::VISIBILITY_DISABLED); } diff --git a/src/applications/settings/application/PhabricatorSettingsApplication.php b/src/applications/settings/application/PhabricatorSettingsApplication.php index 2608cabd88..d0d6494c12 100644 --- a/src/applications/settings/application/PhabricatorSettingsApplication.php +++ b/src/applications/settings/application/PhabricatorSettingsApplication.php @@ -14,7 +14,7 @@ final class PhabricatorSettingsApplication extends PhabricatorApplication { return pht('User Preferences'); } - public function getFontIcon() { + public function getIcon() { return 'fa-wrench'; } diff --git a/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php b/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php index ff1e39577a..bc7538f6bd 100644 --- a/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorDesktopNotificationsSettingsPanel.php @@ -126,14 +126,12 @@ final class PhabricatorDesktopNotificationsSettingsPanel id(new AphrontFormSubmitControl()) ->setValue(pht('Save Preference'))); - $test_icon = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle'); $test_button = id(new PHUIButtonView()) ->setTag('a') ->setWorkflow(true) ->setText(pht('Send Test Notification')) ->setHref('/notification/test/') - ->setIcon($test_icon); + ->setIcon('fa-exclamation-triangle'); $form_box = id(new PHUIObjectBoxView()) ->setHeader( diff --git a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php index fa2694848d..464214dc73 100644 --- a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php @@ -143,14 +143,11 @@ final class PhabricatorEmailAddressesSettingsPanel $header->setHeader(pht('Email Addresses')); if ($editable) { - $icon = id(new PHUIIconView()) - ->setIconFont('fa-plus'); - $button = new PHUIButtonView(); $button->setText(pht('Add New Address')); $button->setTag('a'); $button->setHref($uri->alter('new', 'true')); - $button->setIcon($icon); + $button->setIcon('fa-plus'); $button->addSigil('workflow'); $header->addActionLink($button); } diff --git a/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php b/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php index c18c4c58d1..06b17fecca 100644 --- a/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorHomePreferencesSettingsPanel.php @@ -140,7 +140,7 @@ final class PhabricatorHomePreferencesSettingsPanel continue; } - $icon = $application->getFontIcon(); + $icon = $application->getIcon(); if (!$icon) { $icon = 'application'; } @@ -182,9 +182,7 @@ final class PhabricatorHomePreferencesSettingsPanel ->setText(pht('Pin Application')) ->setHref($this->getPanelURI().'?add=true') ->setWorkflow(true) - ->setIcon( - id(new PHUIIconView()) - ->setIconFont('fa-thumb-tack'))); + ->setIcon('fa-thumb-tack')); $box = id(new PHUIObjectBoxView()) ->setHeader($header) diff --git a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php index 42d5ac4330..9bcfbba3be 100644 --- a/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorMultiFactorSettingsPanel.php @@ -107,22 +107,18 @@ final class PhabricatorMultiFactorSettingsPanel $help_uri = PhabricatorEnv::getDoclink( 'User Guide: Multi-Factor Authentication'); - $help_icon = id(new PHUIIconView()) - ->setIconFont('fa-info-circle'); $help_button = id(new PHUIButtonView()) ->setText(pht('Help')) ->setHref($help_uri) ->setTag('a') - ->setIcon($help_icon); + ->setIcon('fa-info-circle'); - $create_icon = id(new PHUIIconView()) - ->setIconFont('fa-plus'); $create_button = id(new PHUIButtonView()) ->setText(pht('Add Authentication Factor')) ->setHref($this->getPanelURI('?new=true')) ->setTag('a') ->setWorkflow(true) - ->setIcon($create_icon); + ->setIcon('fa-plus'); $header->setHeader(pht('Authentication Factors')); $header->addActionLink($help_button); diff --git a/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php b/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php index 2fa05914ec..0faf620041 100644 --- a/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorSSHKeysSettingsPanel.php @@ -44,14 +44,12 @@ final class PhabricatorSSHKeysSettingsPanel extends PhabricatorSettingsPanel { $panel = new PHUIObjectBoxView(); $header = new PHUIHeaderView(); - $upload_icon = id(new PHUIIconView()) - ->setIconFont('fa-upload'); $upload_button = id(new PHUIButtonView()) ->setText(pht('Upload Public Key')) ->setHref('/auth/sshkey/upload/?objectPHID='.$user->getPHID()) ->setWorkflow(true) ->setTag('a') - ->setIcon($upload_icon); + ->setIcon('fa-upload'); try { PhabricatorSSHKeyGenerator::assertCanGenerateKeypair(); @@ -60,15 +58,13 @@ final class PhabricatorSSHKeysSettingsPanel extends PhabricatorSettingsPanel { $can_generate = false; } - $generate_icon = id(new PHUIIconView()) - ->setIconFont('fa-lock'); $generate_button = id(new PHUIButtonView()) ->setText(pht('Generate Keypair')) ->setHref('/auth/sshkey/generate/?objectPHID='.$user->getPHID()) ->setTag('a') ->setWorkflow(true) ->setDisabled(!$can_generate) - ->setIcon($generate_icon); + ->setIcon('fa-lock'); $header->setHeader(pht('SSH Public Keys')); $header->addActionLink($generate_button); diff --git a/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php b/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php index 8bb6653471..2d38e76225 100644 --- a/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorSessionsSettingsPanel.php @@ -112,15 +112,12 @@ final class PhabricatorSessionsSettingsPanel extends PhabricatorSettingsPanel { 'action', )); - - $terminate_icon = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle'); $terminate_button = id(new PHUIButtonView()) ->setText(pht('Terminate All Sessions')) ->setHref('/auth/session/terminate/all/') ->setTag('a') ->setWorkflow(true) - ->setIcon($terminate_icon); + ->setIcon('fa-exclamation-triangle'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Active Login Sessions')) @@ -128,14 +125,12 @@ final class PhabricatorSessionsSettingsPanel extends PhabricatorSettingsPanel { $hisec = ($viewer->getSession()->getHighSecurityUntil() - time()); if ($hisec > 0) { - $hisec_icon = id(new PHUIIconView()) - ->setIconFont('fa-lock'); $hisec_button = id(new PHUIButtonView()) ->setText(pht('Leave High Security')) ->setHref('/auth/session/downgrade/') ->setTag('a') ->setWorkflow(true) - ->setIcon($hisec_icon); + ->setIcon('fa-lock'); $header->addActionLink($hisec_button); } diff --git a/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php b/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php index 9c20e1235f..a92026333a 100644 --- a/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorTokensSettingsPanel.php @@ -75,15 +75,12 @@ final class PhabricatorTokensSettingsPanel extends PhabricatorSettingsPanel { 'action', )); - - $terminate_icon = id(new PHUIIconView()) - ->setIconFont('fa-exclamation-triangle'); $terminate_button = id(new PHUIButtonView()) ->setText(pht('Revoke All')) ->setHref('/auth/token/revoke/all/') ->setTag('a') ->setWorkflow(true) - ->setIcon($terminate_icon); + ->setIcon('fa-exclamation-triangle'); $header = id(new PHUIHeaderView()) ->setHeader(pht('Temporary Tokens')) diff --git a/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php b/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php index e7ea30dfed..1e4bd78419 100644 --- a/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php +++ b/src/applications/slowvote/application/PhabricatorSlowvoteApplication.php @@ -6,7 +6,7 @@ final class PhabricatorSlowvoteApplication extends PhabricatorApplication { return '/vote/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-bar-chart'; } diff --git a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php index d38683ee06..fee52a908c 100644 --- a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php +++ b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php @@ -170,7 +170,7 @@ final class PhabricatorSlowvoteSearchEngine ->setHref('/vote/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/spaces/application/PhabricatorSpacesApplication.php b/src/applications/spaces/application/PhabricatorSpacesApplication.php index 66371f1bc2..d542551ae4 100644 --- a/src/applications/spaces/application/PhabricatorSpacesApplication.php +++ b/src/applications/spaces/application/PhabricatorSpacesApplication.php @@ -14,7 +14,7 @@ final class PhabricatorSpacesApplication extends PhabricatorApplication { return pht('Policy Namespaces'); } - public function getFontIcon() { + public function getIcon() { return 'fa-th-large'; } diff --git a/src/applications/spaces/query/PhabricatorSpacesNamespaceSearchEngine.php b/src/applications/spaces/query/PhabricatorSpacesNamespaceSearchEngine.php index 4b469cca1b..3880143a24 100644 --- a/src/applications/spaces/query/PhabricatorSpacesNamespaceSearchEngine.php +++ b/src/applications/spaces/query/PhabricatorSpacesNamespaceSearchEngine.php @@ -105,7 +105,7 @@ final class PhabricatorSpacesNamespaceSearchEngine ->setHref('/spaces/create/') ->setColor(PHUIButtonView::GREEN); - $icon = $this->getApplication()->getFontIcon(); + $icon = $this->getApplication()->getIcon(); $app_name = $this->getApplication()->getName(); $view = id(new PHUIBigInfoView()) ->setIcon($icon) diff --git a/src/applications/tokens/application/PhabricatorTokensApplication.php b/src/applications/tokens/application/PhabricatorTokensApplication.php index 76046e82de..0ef130a282 100644 --- a/src/applications/tokens/application/PhabricatorTokensApplication.php +++ b/src/applications/tokens/application/PhabricatorTokensApplication.php @@ -10,7 +10,7 @@ final class PhabricatorTokensApplication extends PhabricatorApplication { return '/token/'; } - public function getFontIcon() { + public function getIcon() { return 'fa-thumbs-up'; } diff --git a/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php b/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php index 6808ed2af5..553bfa3e10 100644 --- a/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php +++ b/src/applications/transactions/controller/PhabricatorApplicationTransactionValueController.php @@ -105,7 +105,7 @@ final class PhabricatorApplicationTransactionValueController $icon = 'fa-minus-circle red'; } $icon = id(new PHUIIconView()) - ->setIconFont($icon) + ->setIcon($icon) ->setText( ucfirst($rule['action']).' '.$rule_object->getRuleDescription()); diff --git a/src/applications/transactions/editengine/PhabricatorEditEngine.php b/src/applications/transactions/editengine/PhabricatorEditEngine.php index 0fb96e7e19..f8dc0ee175 100644 --- a/src/applications/transactions/editengine/PhabricatorEditEngine.php +++ b/src/applications/transactions/editengine/PhabricatorEditEngine.php @@ -1090,7 +1090,7 @@ abstract class PhabricatorEditEngine ->setTag('a') ->setText(pht('Configure Form')) ->setHref('#') - ->setIconFont('fa-gear') + ->setIcon('fa-gear') ->setDropdownMenu($action_view); return $action_button; @@ -1773,7 +1773,7 @@ abstract class PhabricatorEditEngine public function getIcon() { $application = $this->getApplication(); - return $application->getFontIcon(); + return $application->getIcon(); } public function loadQuickCreateItems() { diff --git a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php index 3a840d73a1..5e9d7c40b3 100644 --- a/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php +++ b/src/applications/transactions/feed/PhabricatorApplicationTransactionFeedStory.php @@ -77,7 +77,7 @@ class PhabricatorApplicationTransactionFeedStory $class = $phid_type->getPHIDTypeApplicationClass(); if ($class) { $application = PhabricatorApplication::getByClass($class); - $icon = $application->getFontIcon(); + $icon = $application->getIcon(); } } diff --git a/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php b/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php index 4ba4ed9b12..70cd4cd1a3 100644 --- a/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php +++ b/src/applications/transactions/query/PhabricatorEditEngineSearchEngine.php @@ -70,7 +70,7 @@ final class PhabricatorEditEngineSearchEngine $query_uri = "/transactions/editengine/{$engine_key}/"; $application = $engine->getApplication(); - $app_icon = $application->getFontIcon(); + $app_icon = $application->getIcon(); $item = id(new PHUIObjectItemView()) ->setHeader($engine->getSummaryHeader()) diff --git a/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php b/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php index 767e392248..b0abe516de 100644 --- a/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php +++ b/src/applications/transactions/view/PhabricatorApplicationEditHTTPParameterHelpView.php @@ -210,8 +210,8 @@ EOTEXT $uri, $uri); - $yes = id(new PHUIIconView())->setIconFont('fa-check-circle green'); - $no = id(new PHUIIconView())->setIconFont('fa-times grey'); + $yes = id(new PHUIIconView())->setIcon('fa-check-circle green'); + $no = id(new PHUIIconView())->setIcon('fa-times grey'); $rows = array(); foreach ($fields as $field) { diff --git a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php index 9ac5b4bdb2..c20999601e 100644 --- a/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php +++ b/src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php @@ -237,7 +237,7 @@ final class PhabricatorTypeaheadModularDatasourceController $function_help = array( id(new PHUIIconView()) - ->setIconFont('fa-book'), + ->setIcon('fa-book'), ' ', $reference_link, ); diff --git a/src/applications/uiexample/application/PhabricatorUIExamplesApplication.php b/src/applications/uiexample/application/PhabricatorUIExamplesApplication.php index 3b3d38ef14..350417ecc6 100644 --- a/src/applications/uiexample/application/PhabricatorUIExamplesApplication.php +++ b/src/applications/uiexample/application/PhabricatorUIExamplesApplication.php @@ -14,7 +14,7 @@ final class PhabricatorUIExamplesApplication extends PhabricatorApplication { return pht('UIExamples'); } - public function getFontIcon() { + public function getIcon() { return 'fa-magnet'; } diff --git a/src/applications/uiexample/examples/PHUIActionPanelExample.php b/src/applications/uiexample/examples/PHUIActionPanelExample.php index c57617a566..9294dcbea6 100644 --- a/src/applications/uiexample/examples/PHUIActionPanelExample.php +++ b/src/applications/uiexample/examples/PHUIActionPanelExample.php @@ -17,7 +17,7 @@ final class PHUIActionPanelExample extends PhabricatorUIExample { /* Action Panels */ $panel1 = id(new PHUIActionPanelView()) - ->setFontIcon('fa-book') + ->setIcon('fa-book') ->setHeader(pht('Read Documentation')) ->setHref('#') ->setSubHeader(pht('Reading is a common way to learn about things.')) @@ -25,7 +25,7 @@ final class PHUIActionPanelExample extends PhabricatorUIExample { $view->addColumn($panel1); $panel2 = id(new PHUIActionPanelView()) - ->setFontIcon('fa-server') + ->setIcon('fa-server') ->setHeader(pht('Launch Instance')) ->setHref('#') ->setSubHeader(pht("Maybe this is what you're likely here for.")) @@ -33,7 +33,7 @@ final class PHUIActionPanelExample extends PhabricatorUIExample { $view->addColumn($panel2); $panel3 = id(new PHUIActionPanelView()) - ->setFontIcon('fa-group') + ->setIcon('fa-group') ->setHeader(pht('Code with Friends')) ->setHref('#') ->setSubHeader(pht('Writing code is much more fun with friends!')) @@ -41,7 +41,7 @@ final class PHUIActionPanelExample extends PhabricatorUIExample { $view->addColumn($panel3); $panel4 = id(new PHUIActionPanelView()) - ->setFontIcon('fa-cloud-download') + ->setIcon('fa-cloud-download') ->setHeader(pht('Download Data')) ->setHref('#') ->setSubHeader(pht('Need a backup of all your kitten memes?')) @@ -53,7 +53,7 @@ final class PHUIActionPanelExample extends PhabricatorUIExample { /* Action Panels */ $panel1 = id(new PHUIActionPanelView()) - ->setFontIcon('fa-credit-card') + ->setIcon('fa-credit-card') ->setHeader(pht('Account Balance')) ->setHref('#') ->setSubHeader(pht('You were last billed $2,245.12 on Dec 12, 2014.')) diff --git a/src/applications/uiexample/examples/PHUIBoxExample.php b/src/applications/uiexample/examples/PHUIBoxExample.php index 0467a71e3b..9634520e89 100644 --- a/src/applications/uiexample/examples/PHUIBoxExample.php +++ b/src/applications/uiexample/examples/PHUIBoxExample.php @@ -61,12 +61,10 @@ final class PHUIBoxExample extends PhabricatorUIExample { ->addMargin(PHUI::MARGIN_LARGE_BOTTOM), ); - $image = id(new PHUIIconView()) - ->setIconFont('fa-heart'); $button = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::SIMPLE) - ->setIcon($image) + ->setIcon('fa-heart') ->setText(pht('Such Wow')) ->addClass(PHUI::MARGIN_SMALL_RIGHT); diff --git a/src/applications/uiexample/examples/PHUIButtonBarExample.php b/src/applications/uiexample/examples/PHUIButtonBarExample.php index e41234e5bd..1501770dcf 100644 --- a/src/applications/uiexample/examples/PHUIButtonBarExample.php +++ b/src/applications/uiexample/examples/PHUIButtonBarExample.php @@ -23,21 +23,17 @@ final class PHUIButtonBarExample extends PhabricatorUIExample { ); $button_bar1 = new PHUIButtonBarView(); foreach ($icons as $text => $icon) { - $image = id(new PHUIIconView()) - ->setIconFont($icon); $button = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::GREY) ->setTitle($text) - ->setIcon($image); + ->setIcon($icon); $button_bar1->addButton($button); } $button_bar2 = new PHUIButtonBarView(); foreach ($icons as $text => $icon) { - $image = id(new PHUIIconView()) - ->setIconFont($icon); $button = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::SIMPLE) @@ -49,14 +45,12 @@ final class PHUIButtonBarExample extends PhabricatorUIExample { $button_bar3 = new PHUIButtonBarView(); foreach ($icons as $text => $icon) { - $image = id(new PHUIIconView()) - ->setIconFont($icon); $button = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::SIMPLE) ->setTitle($text) ->setTooltip($text) - ->setIcon($image); + ->setIcon($icon); $button_bar3->addButton($button); } @@ -64,13 +58,11 @@ final class PHUIButtonBarExample extends PhabricatorUIExample { $button_bar4 = new PHUIButtonBarView(); $button_bar4->setBorderless(true); foreach ($icons as $text => $icon) { - $image = id(new PHUIIconView()) - ->setIconFont($icon); $button = id(new PHUIButtonView()) ->setTag('a') ->setTitle($text) ->setTooltip($text) - ->setIcon($image); + ->setIcon($icon); $button_bar4->addButton($button); } diff --git a/src/applications/uiexample/examples/PHUIButtonExample.php b/src/applications/uiexample/examples/PHUIButtonExample.php index 06cf369ba2..ae699eb7a3 100644 --- a/src/applications/uiexample/examples/PHUIButtonExample.php +++ b/src/applications/uiexample/examples/PHUIButtonExample.php @@ -112,12 +112,10 @@ final class PHUIButtonExample extends PhabricatorUIExample { 'Implode Earth' => 'fa-exclamation-triangle red', ); foreach ($icons as $text => $icon) { - $image = id(new PHUIIconView()) - ->setIconFont($icon); $column[] = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::GREY) - ->setIcon($image) + ->setIcon($icon) ->setText($text) ->addClass(PHUI::MARGIN_SMALL_RIGHT); } @@ -140,12 +138,10 @@ final class PHUIButtonExample extends PhabricatorUIExample { $column = array(); foreach ($colors as $color) { foreach ($icons as $text => $icon) { - $image = id(new PHUIIconView()) - ->setIconFont($icon); $column[] = id(new PHUIButtonView()) ->setTag('a') ->setColor($color) - ->setIcon($image) + ->setIcon($icon) ->setText($text) ->addClass(PHUI::MARGIN_SMALL_RIGHT); } diff --git a/src/applications/uiexample/examples/PHUIFeedStoryExample.php b/src/applications/uiexample/examples/PHUIFeedStoryExample.php index 6731f1ce1f..375c6e42fd 100644 --- a/src/applications/uiexample/examples/PHUIFeedStoryExample.php +++ b/src/applications/uiexample/examples/PHUIFeedStoryExample.php @@ -70,7 +70,7 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample { 'harding (Tom Harding) awarded '. 'M10: Workboards a token.'); $action1 = id(new PHUIIconView()) - ->setIconFont('fa-trophy bluegrey') + ->setIcon('fa-trophy bluegrey') ->setHref('#'); $token = id(new PHUIIconView()) @@ -91,10 +91,10 @@ final class PHUIFeedStoryExample extends PhabricatorUIExample { 'wgharding (Warren Harding) '. 'asked a new question.'); $action1 = id(new PHUIIconView()) - ->setIconFont('fa-chevron-up bluegrey') + ->setIcon('fa-chevron-up bluegrey') ->setHref('#'); $action2 = id(new PHUIIconView()) - ->setIconFont('fa-chevron-down bluegrey') + ->setIcon('fa-chevron-down bluegrey') ->setHref('#'); $story4 = id(new PHUIFeedStoryView()) ->setTitle($text) diff --git a/src/applications/uiexample/examples/PHUIIconExample.php b/src/applications/uiexample/examples/PHUIIconExample.php index 28d957b460..1db4aa202f 100644 --- a/src/applications/uiexample/examples/PHUIIconExample.php +++ b/src/applications/uiexample/examples/PHUIIconExample.php @@ -23,9 +23,9 @@ final class PHUIIconExample extends PhabricatorUIExample { public function renderExample() { - $colors = PHUIIconView::getFontIconColors(); + $colors = PHUIIconView::getIconColors(); $colors = array_merge(array(null), $colors); - $fas = PHUIIconView::getFontIcons(); + $fas = PHUIIconView::getIcons(); $trans = $this->listTransforms(); @@ -33,7 +33,7 @@ final class PHUIIconExample extends PhabricatorUIExample { foreach ($colors as $color) { $cicons[] = id(new PHUIIconView()) ->addClass('phui-example-icon-transform') - ->setIconFont('fa-tag '.$color) + ->setIcon('fa-tag '.$color) ->setText(pht('fa-tag %s', $color)); } $ficons = array(); @@ -41,7 +41,7 @@ final class PHUIIconExample extends PhabricatorUIExample { foreach ($fas as $fa) { $ficons[] = id(new PHUIIconView()) ->addClass('phui-example-icon-name') - ->setIconFont($fa) + ->setIcon($fa) ->setText($fa); } @@ -115,7 +115,7 @@ final class PHUIIconExample extends PhabricatorUIExample { foreach ($circles as $circle) { $circleview[] = id(new PHUIIconCircleView()) - ->setIconFont($circle) + ->setIcon($circle) ->setHref('#') ->addClass('mmr'); } @@ -124,7 +124,7 @@ final class PHUIIconExample extends PhabricatorUIExample { foreach ($circles as $circle) { $circleview[] = id(new PHUIIconCircleView()) - ->setIconFont($circle) + ->setIcon($circle) ->setSize(PHUIIconCircleView::MEDIUM) ->setHref('#') ->addClass('mmr'); diff --git a/src/applications/uiexample/examples/PHUITextExample.php b/src/applications/uiexample/examples/PHUITextExample.php deleted file mode 100644 index 6ab69b22b6..0000000000 --- a/src/applications/uiexample/examples/PHUITextExample.php +++ /dev/null @@ -1,107 +0,0 @@ -setText($color1) - ->addClass(PHUI::TEXT_RED), - id(new PHUITextView()) - ->setText($color2) - ->addClass(PHUI::TEXT_ORANGE), - id(new PHUITextView()) - ->setText($color3) - ->addClass(PHUI::TEXT_YELLOW), - id(new PHUITextView()) - ->setText($color4) - ->addClass(PHUI::TEXT_GREEN), - id(new PHUITextView()) - ->setText($color5) - ->addClass(PHUI::TEXT_BLUE), - id(new PHUITextView()) - ->setText($color6) - ->addClass(PHUI::TEXT_INDIGO), - id(new PHUITextView()) - ->setText($color7) - ->addClass(PHUI::TEXT_VIOLET), - id(new PHUITextView()) - ->setText($color8) - ->addClass(PHUI::TEXT_WHITE), - id(new PHUITextView()) - ->setText($color9) - ->addClass(PHUI::TEXT_BLACK), - ); - - $content2 = - array( - id(new PHUITextView()) - ->setText($text1) - ->addClass(PHUI::TEXT_BOLD), - id(new PHUITextView()) - ->setText($text2) - ->addClass(PHUI::TEXT_UPPERCASE), - id(new PHUITextView()) - ->setText($text3) - ->addClass(PHUI::TEXT_STRIKE), - ); - - $layout1 = id(new PHUIBoxView()) - ->appendChild($content) - ->setBorder(true) - ->addPadding(PHUI::PADDING_MEDIUM); - - $head1 = id(new PHUIHeaderView()) - ->setHeader(pht('Basic Colors')); - - $wrap1 = id(new PHUIBoxView()) - ->appendChild($layout1) - ->addMargin(PHUI::MARGIN_LARGE); - - $layout2 = id(new PHUIBoxView()) - ->appendChild($content2) - ->setBorder(true) - ->addPadding(PHUI::PADDING_MEDIUM); - - $head2 = id(new PHUIHeaderView()) - ->setHeader(pht('Basic Transforms')); - - $wrap2 = id(new PHUIBoxView()) - ->appendChild($layout2) - ->addMargin(PHUI::MARGIN_LARGE); - - return phutil_tag( - 'div', - array(), - array( - $head1, - $wrap1, - $head2, - $wrap2, - )); - } -} diff --git a/src/applications/xhprof/application/PhabricatorXHProfApplication.php b/src/applications/xhprof/application/PhabricatorXHProfApplication.php index ad480a821a..999e0378a5 100644 --- a/src/applications/xhprof/application/PhabricatorXHProfApplication.php +++ b/src/applications/xhprof/application/PhabricatorXHProfApplication.php @@ -14,7 +14,7 @@ final class PhabricatorXHProfApplication extends PhabricatorApplication { return pht('PHP Profiling Tool'); } - public function getFontIcon() { + public function getIcon() { return 'fa-stethoscope'; } diff --git a/src/docs/user/configuration/configuration_locked.diviner b/src/docs/user/configuration/configuration_locked.diviner new file mode 100644 index 0000000000..040b838177 --- /dev/null +++ b/src/docs/user/configuration/configuration_locked.diviner @@ -0,0 +1,101 @@ +@title Configuration Guide: Locked and Hidden Configuration +@group config + +Details about locked and hidden configuration. + + +Overview +======== + +Some configuration options are **Locked** or **Hidden**. If an option has one +of these attributes, it means: + + - **Locked Configuration**: This setting can not be written from the web UI. + - **Hidden Configuration**: This setting can not be read or written from + the web UI. + +This document explains these attributes in more detail. + + +Locked Configuration +==================== + +**Locked Configuration** can not be edited from the web UI. In general, you +can edit it from the CLI instead, with `bin/config`: + +``` +phabricator/ $ ./bin/config set +``` + +A few settings have alternate CLI tools. Refer to the setting page for +details. + +Note that these settings can not be written to the database, even from the +CLI. + +Locked values can not be unlocked: they are locked because of what the setting +does or how the setting operates. Some of the reasons configuration options are +locked include: + + +**Required for bootstrapping**: Some options, like `mysql.host`, must be +available before Phabricator can read configuration from the database. + +If you stored `mysql.host` only in the database, Phabricator would not know how +to connect to the database in order to read the value in the first place. + +These options must be provided in a configuration source which is read earlier +in the bootstrapping process, before Phabricator connects to the database. + + +**Errors could not be fixed from the web UI**: Some options, like +`phabricator.base-uri`, can effectively disable the web UI if they are +configured incorrectly. + +If these options could be configured from the web UI, you could not fix them if +you made a mistake (because the web UI would no longer work, so you could not +load the page to change the value). + +We require these options to be edited from the CLI to make sure the editor has +access to fix any mistakes. + + +**Attackers could gain greater access**: Some options could be modified by an +attacker who has gained access to an administrator account in order to gain +greater access. + +For example, an attacker who could modify `metamta.mail-adapter` (and other +similar options), could potentially reconfigure Phabricator to send mail +through an evil server they controlled, then trigger password resets on other +user accounts to compromise them. + +We require these options to be edited from the CLI to make sure the editor +has full access to the install. + + +Hidden Configuration +==================== + +**Hidden Configuration** is similar to locked configuration, but also can not +be //read// from the web UI. + +In almost all cases, configuration is hidden because it is some sort of secret +key or access token for an external service. These values are hidden from the +web UI to prevent administrators (or attackers who have compromised +administrator accounts) from reading them. + +You can review (and edit) hidden configuration from the CLI: + +``` +phabricator/ $ ./bin/config get +phabricator/ $ ./bin/config set + +``` + + +Next Steps +========== + +Continue by: + + - returning to the @{article: Configuration Guide}. diff --git a/src/docs/user/userguide/arcanist.diviner b/src/docs/user/userguide/arcanist.diviner index f1c4545956..324ff10490 100644 --- a/src/docs/user/userguide/arcanist.diviner +++ b/src/docs/user/userguide/arcanist.diviner @@ -140,23 +140,23 @@ to your `.bashrc`, `.profile` or similar: == Configuration == Some Arcanist commands can be configured. This configuration is read from -several sources: +three sources, in order: - # A customization can force any setting with - @{method@arcanist:ArcanistWorkingCopyIdentity::setRuntimeConfig}. - # User can specify settings for working copy in `arc/config` file located in - VCS directory (e.g. `.git/arc/config`) in JSON format. This file can also be - modified by running `arc set-config --local`. - # Repository can specify its config in `.arcconfig` in JSON format. - # User can specify the settings in `~/.arcrc` (JSON) through the `config` key. - This file can be modified also by `arc set-config --global`. - # Machine can specify the settings with `/etc/arcconfig` (JSON). On Windows, - the file path is `C:\ProgramData\Phabricator\Arcanist\config`. + # A project can specify configuration in an `.arcconfig` file. This file is + JSON, and can be updated using `arc set-config --local` or by editing + it manually. + # User configuration is read from `~/.arcconfig`. This file is JSON, and can + be updated using `arc set-config`. + # Host configuration is read from `/etc/arcconfig` (on Windows, the path + is `C:\ProgramData\Phabricator\Arcanist\config`). -The first place where the setting is defined wins. +Arcanist uses the first definition it encounters as the runtime setting. Existing settings can be printed with `arc get-config`. +Use `arc help set-config` and `arc help get-config` for more information +about reading and writing configuration. + == Next Steps == Continue by: diff --git a/src/docs/user/userguide/profile_menu.diviner b/src/docs/user/userguide/profile_menu.diviner index 51912dd860..bd278b2702 100644 --- a/src/docs/user/userguide/profile_menu.diviner +++ b/src/docs/user/userguide/profile_menu.diviner @@ -40,9 +40,10 @@ You can only edit an object's menu if you can edit the object. For example, you must have permission to edit a project in order to reconfigure the menu for the project. -To edit a menu, click {nav icon="pencil", name="Edit Menu"}. This brings you to -the menu configuration interface which allows you to add and remove items, -reorder the menu, edit existing items, and choose a default item. +To edit a menu, click {nav icon="cogs", name="Manage"} in the menu, then click +{nav icon="th-list", name="Edit Menu"}. This brings you to the menu +configuration interface which allows you to add and remove items, reorder the +menu, edit existing items, and choose a default item. Menus are comprised of a list of items. Some of the items are builtin (for example, projects have builtin "Profile", "Workboard" and "Members" @@ -95,6 +96,11 @@ Builtin items can not be deleted and have a not delete them. You an re-enable a disabled item with the {nav icon="plus', name="Enable"} action. +A few items can not be hidden or deleted. For example, the +{nav icon="cogs", name="Manage"} item must always be available in the menu +because if you hid it by accident there would no longer be a way to access +the configuration interface and fix the mistake. + Removing or hiding an item does not disable the underlying functionality. For example, if you hide the "Members" item for a project, that just removes it from the menu. The project still has members, and users can still navigate diff --git a/src/docs/user/userguide/projects.diviner b/src/docs/user/userguide/projects.diviner index 17e8473131..f563d527f2 100644 --- a/src/docs/user/userguide/projects.diviner +++ b/src/docs/user/userguide/projects.diviner @@ -8,8 +8,48 @@ Overview NOTE: This document is only partially complete. -Phabricator projects are flexible groups of users and objects. +Phabricator projects are flexible, general-purpose groups of objects that you +can use to organize information. Projects have some basic information like +a name and an icon, and may optionally have members. +For example, you can create projects to provide: + + - **Organization**: Create a project to represent a product or initative, + then use it to organize related work. + - **Groups**: Create a project to represent a group of people (like a team), + then add members of the group as project members. + - **Tags**: To create a tag, just create a project without any members. Then + tag anything you want. + - **Access Control Lists**: Add members to a project, then restrict the + visibility of objects to members of that project. See "Understanding + Policies" below to understand how policies and projects interact in + more detail. + +Understanding Policies +====================== + +An important rule to understand about projects is that **adding or removing +projects to an object never affects who can see the object**. + +For example, if you tag a task with a project like {nav Backend}, that does not +change who can see the task. In particular, it does not limit visibility to +only members of the "Backend" project, nor does it allow them to see it if they +otherwise could not. Likewise, removing projects does not affect visibility. + +If you're familiar with other software that works differently, this may be +unexpected, but the rule in Phabrictor is simple: **adding and removing +projects never affects policies.** + +Note that you //can// write policy rules which restrict capabilities to members +of a specific project or set of projects, but you do this by editing an +object's policies and adding rules based on project membership, not by tagging +or untagging the object with projects. + +To manage who can seen an object, use the object's policy controls, +Spaces (see @{article:Spaces User Guide}) and Custom Forms +(see @{article:User Guide: Customizing Forms}). + +For more details about rationale, see "Policies In Depth", below. Joining Projects ================ @@ -93,3 +133,71 @@ to the workboard view more easily. **Hide Unused Items**: If you have a project which you don't expect to have members or won't have a workboard, you can hide these items to streamline the menu. + + +Policies In Depth +================= + +As discussed above, adding and removing projects never affects who can see an +object. This is an explicit product design choice aimed at reducing the +complexity of policy management. + +Phabricator projects are a flexible, general-purpose, freeform tool. This is a +good match for many organizational use cases, but a very poor match for +policies. It is important that policies be predictable and rigid, because the +cost of making a mistake with policies is high (inadvertent disclosure of +private information). + +In Phabricator, each object (like a task) can be tagged with multiple projects. +This is important in a flexible organizational tool, but is a liability in a +policy tool. + +If each project potentially affected visibility, it would become more difficult +to predict the visibility of objects and easier to make mistakes with policies. +There are different, reasonable expectations about how policies might be +affected when tagging objects with projects, but these expectations are in +conflict, and different users have different expectations. For example: + + - if a user adds a project like {nav Backend} to a task, their intent + might be to //open// the task up and share it with the "Backend" team; + - if a user adds a project like {nav Security Vulnerability} to a task, + their intent might be to //close// the task down and restrict it to just + the security team; + - if a user adds a project like {nav Easy Starter Task} to a task, their + intent might be to not affect policies at all; + - if a user adds {nav Secret Inner Council} to a task already tagged with + {nav Security Vulnerability}, their intent might be to //open// the task + to members of //either// project, or //close// the task to just members of + //both// projects; + - if a user adds {nav Backend} to a task already tagged with + {nav Security Vulnerability}, their intent is totally unclear; + - in all cases, users may be adding projects purely to organize objects + without intending to affect policies. + +We can't distinguish between these cases without adding substantial complexity, +and even if we made an attempt to navigate this it would still be very +difficult to predict the effect of tagging an object with multiple +policy-affecting projects. Users would need to learn many rules about how these +policy types interacted to predict the policy effects of adding or removing a +project. + +Because of the implied complexity, we almost certainly could not prevent some +cases where a user intends to take a purely organizational action (like adding +a {nav Needs Documentation} tag) and accidentally opens a private object to a +wide audience. The policy system is intended to make these catastrophically bad +cases very difficult, and allowing projects to affect policies would make these +mistakes much easier to make. + +We believe the only reasonable way we could reduce ambiguity and complexity is +by making project policy actions explicit and rule-based. But we already have a +system for explicit, rule-based management of policies: the policy system. The +policy tools are designed for policy management and aimed at making actions +explicit and mistakes very difficult. + +Many of the use cases where project-based access control seems like it might be +a good fit can be satisfied with Spaces instead (see @{article:Spaces User +Guide}). Spaces are explicit, unambiguous containers for groups of objects with +similar policies. + +Form customization also provides a powerful tool for making many policy +management tasks easier (see @{article:User Guide: Customizing Forms}). diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php index 2c47c744ac..b58b1764a8 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php @@ -154,7 +154,7 @@ final class PHUIDiffInlineCommentDetailView } $ghost_icon = id(new PHUIIconView()) - ->setIconFont($ghosticon) + ->setIcon($ghosticon) ->addSigil('has-tooltip') ->setMetadata( array( @@ -200,14 +200,14 @@ final class PHUIDiffInlineCommentDetailView $up = id(new PHUIButtonView()) ->setTag('a') ->setTooltip(pht('Previous')) - ->setIconFont('fa-chevron-up') + ->setIcon('fa-chevron-up') ->addSigil('differential-inline-prev') ->setMustCapture(true); $down = id(new PHUIButtonView()) ->setTag('a') ->setTooltip(pht('Next')) - ->setIconFont('fa-chevron-down') + ->setIcon('fa-chevron-down') ->addSigil('differential-inline-next') ->setMustCapture(true); @@ -215,7 +215,7 @@ final class PHUIDiffInlineCommentDetailView $hide = id(new PHUIButtonView()) ->setTag('a') ->setTooltip(pht('Hide Comment')) - ->setIconFont('fa-times') + ->setIcon('fa-times') ->addSigil('hide-inline') ->setMustCapture(true); @@ -235,7 +235,7 @@ final class PHUIDiffInlineCommentDetailView $action_buttons[] = id(new PHUIButtonView()) ->setTag('a') - ->setIconFont('fa-reply') + ->setIcon('fa-reply') ->setTooltip(pht('Reply')) ->addSigil('differential-inline-reply') ->setMustCapture(true); @@ -248,14 +248,14 @@ final class PHUIDiffInlineCommentDetailView if ($this->editable && !$this->preview) { $action_buttons[] = id(new PHUIButtonView()) ->setTag('a') - ->setIconFont('fa-pencil') + ->setIcon('fa-pencil') ->setTooltip(pht('Edit')) ->addSigil('differential-inline-edit') ->setMustCapture(true); $action_buttons[] = id(new PHUIButtonView()) ->setTag('a') - ->setIconFont('fa-trash-o') + ->setIcon('fa-trash-o') ->setTooltip(pht('Delete')) ->addSigil('differential-inline-delete') ->setMustCapture(true); @@ -275,7 +275,7 @@ final class PHUIDiffInlineCommentDetailView $action_buttons[] = id(new PHUIButtonView()) ->setTag('a') ->setTooltip(pht('Delete')) - ->setIconFont('fa-trash-o') + ->setIcon('fa-trash-o') ->addSigil('differential-inline-delete') ->setMustCapture(true); } @@ -338,7 +338,7 @@ final class PHUIDiffInlineCommentDetailView )); } else { if ($is_done) { - $icon = id(new PHUIIconView())->setIconFont('fa-check sky msr'); + $icon = id(new PHUIIconView())->setIcon('fa-check sky msr'); $label = pht('Done'); $class = 'button-done'; } else { diff --git a/src/infrastructure/diff/view/PHUIDiffRevealIconView.php b/src/infrastructure/diff/view/PHUIDiffRevealIconView.php index b2c879a8b5..284b72b2be 100644 --- a/src/infrastructure/diff/view/PHUIDiffRevealIconView.php +++ b/src/infrastructure/diff/view/PHUIDiffRevealIconView.php @@ -4,7 +4,7 @@ final class PHUIDiffRevealIconView extends AphrontView { public function render() { $icon = id(new PHUIIconView()) - ->setIconFont('fa-comment') + ->setIcon('fa-comment') ->addSigil('has-tooltip') ->setMetadata( array( diff --git a/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php b/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php index f54b6f3fd7..f032e34017 100644 --- a/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php +++ b/src/infrastructure/diff/view/PHUIDiffTableOfContentsListView.php @@ -23,7 +23,6 @@ final class PHUIDiffTableOfContentsListView extends AphrontView { public function render() { $this->requireResource('differential-core-view-css'); $this->requireResource('differential-table-of-contents-css'); - $this->requireResource('phui-text-css'); Javelin::initBehavior('phabricator-tooltips'); diff --git a/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php b/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php index 41071a69dd..86b924804f 100644 --- a/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php +++ b/src/infrastructure/diff/view/PhabricatorInlineSummaryView.php @@ -31,7 +31,7 @@ final class PhabricatorInlineSummaryView extends AphrontView { } $icon = id(new PHUIIconView()) - ->setIconFont('fa-file-code-o darkbluetext mmr'); + ->setIcon('fa-file-code-o darkbluetext mmr'); $header = phutil_tag( 'th', array( @@ -65,7 +65,7 @@ final class PhabricatorInlineSummaryView extends AphrontView { if ($href) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-share darkbluetext mmr'); + ->setIcon('fa-share darkbluetext mmr'); $lines = phutil_tag( 'a', diff --git a/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php b/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php index 857a0c10bd..458ee5b834 100644 --- a/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php +++ b/src/infrastructure/markup/rule/PhabricatorNavigationRemarkupRule.php @@ -46,7 +46,7 @@ final class PhabricatorNavigationRemarkupRule extends PhutilRemarkupRule { static $icon_names; if (!$icon_names) { - $icon_names = array_fuse(PHUIIconView::getFontIcons()); + $icon_names = array_fuse(PHUIIconView::getIcons()); } $out = array(); diff --git a/src/view/control/AphrontCursorPagerView.php b/src/view/control/AphrontCursorPagerView.php index 74e8ce0e13..3574c07fa9 100644 --- a/src/view/control/AphrontCursorPagerView.php +++ b/src/view/control/AphrontCursorPagerView.php @@ -142,7 +142,7 @@ final class AphrontCursorPagerView extends AphrontView { $first_uri = $this->getFirstPageURI(); if ($first_uri) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-fast-backward'); + ->setIcon('fa-fast-backward'); $links[] = id(new PHUIButtonView()) ->setTag('a') ->setHref($first_uri) @@ -155,7 +155,7 @@ final class AphrontCursorPagerView extends AphrontView { $prev_uri = $this->getPrevPageURI(); if ($prev_uri) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-backward'); + ->setIcon('fa-backward'); $links[] = id(new PHUIButtonView()) ->setTag('a') ->setHref($prev_uri) @@ -168,7 +168,7 @@ final class AphrontCursorPagerView extends AphrontView { $next_uri = $this->getNextPageURI(); if ($next_uri) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-forward'); + ->setIcon('fa-forward'); $links[] = id(new PHUIButtonView()) ->setTag('a') ->setHref($next_uri) diff --git a/src/view/control/AphrontTokenizerTemplateView.php b/src/view/control/AphrontTokenizerTemplateView.php index 74456e84b8..facab93497 100644 --- a/src/view/control/AphrontTokenizerTemplateView.php +++ b/src/view/control/AphrontTokenizerTemplateView.php @@ -79,7 +79,7 @@ final class AphrontTokenizerTemplateView extends AphrontView { $content); $icon = id(new PHUIIconView()) - ->setIconFont('fa-search'); + ->setIcon('fa-search'); $browse = id(new PHUIButtonView()) ->setTag('a') diff --git a/src/view/form/control/AphrontFormDateControl.php b/src/view/form/control/AphrontFormDateControl.php index e08be84dc3..75398d688a 100644 --- a/src/view/form/control/AphrontFormDateControl.php +++ b/src/view/form/control/AphrontFormDateControl.php @@ -217,7 +217,7 @@ final class AphrontFormDateControl extends AphrontFormControl { $date_sel); $cicon = id(new PHUIIconView()) - ->setIconFont('fa-calendar'); + ->setIcon('fa-calendar'); $cal_icon = javelin_tag( 'a', diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index 348dc8171f..71087bfe07 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -242,7 +242,7 @@ final class AphrontFormPolicyControl extends AphrontFormControl { $icons = array(); foreach (igroup($flat_options, 'icon') as $icon => $ignored) { $icons[$icon] = id(new PHUIIconView()) - ->setIconFont($icon); + ->setIcon($icon); } diff --git a/src/view/layout/PhabricatorActionView.php b/src/view/layout/PhabricatorActionView.php index 15ff0a0023..b89c00daf5 100644 --- a/src/view/layout/PhabricatorActionView.php +++ b/src/view/layout/PhabricatorActionView.php @@ -105,7 +105,7 @@ final class PhabricatorActionView extends AphrontView { } $icon = id(new PHUIIconView()) ->addClass('phabricator-action-view-icon') - ->setIconFont($this->icon.$color); + ->setIcon($this->icon.$color); } if ($this->href) { diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index b26ce6297b..e85abb2140 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -747,7 +747,7 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView if ($application) { $application_class = get_class($application); if ($application->getApplicationSearchDocumentTypes()) { - $application_search_icon = $application->getFontIcon(); + $application_search_icon = $application->getIcon(); } } } diff --git a/src/view/page/menu/PhabricatorMainMenuSearchView.php b/src/view/page/menu/PhabricatorMainMenuSearchView.php index 76e03b4072..a5c5653cc3 100644 --- a/src/view/page/menu/PhabricatorMainMenuSearchView.php +++ b/src/view/page/menu/PhabricatorMainMenuSearchView.php @@ -128,7 +128,7 @@ final class PhabricatorMainMenuSearchView extends AphrontView { if ($application) { $application_value = get_class($application); if ($application->getApplicationSearchDocumentTypes()) { - $application_icon = $application->getFontIcon(); + $application_icon = $application->getIcon(); } } @@ -203,7 +203,7 @@ final class PhabricatorMainMenuSearchView extends AphrontView { ->setIcon( id(new PHUIIconView()) ->addSigil('global-search-dropdown-icon') - ->setIconFont($current_icon)) + ->setIcon($current_icon)) ->setDropdown(true); $input = javelin_tag( diff --git a/src/view/phui/PHUI.php b/src/view/phui/PHUI.php index d3510a2315..bf8efbeaaf 100644 --- a/src/view/phui/PHUI.php +++ b/src/view/phui/PHUI.php @@ -42,18 +42,4 @@ final class PHUI extends Phobject { const PADDING_MEDIUM_TOP = 'pmt'; const PADDING_LARGE_TOP = 'plt'; - const TEXT_BOLD = 'phui-text-bold'; - const TEXT_UPPERCASE = 'phui-text-uppercase'; - const TEXT_STRIKE = 'phui-text-strike'; - - const TEXT_RED = 'phui-text-red'; - const TEXT_ORANGE = 'phui-text-orange'; - const TEXT_YELLOW = 'phui-text-yellow'; - const TEXT_GREEN = 'phui-text-green'; - const TEXT_BLUE = 'phui-text-blue'; - const TEXT_INDIGO = 'phui-text-indigo'; - const TEXT_VIOLET = 'phui-text-violet'; - const TEXT_WHITE = 'phui-text-white'; - const TEXT_BLACK = 'phui-text-black'; - } diff --git a/src/view/phui/PHUIActionPanelView.php b/src/view/phui/PHUIActionPanelView.php index bfe44ba13e..f5f74b2807 100644 --- a/src/view/phui/PHUIActionPanelView.php +++ b/src/view/phui/PHUIActionPanelView.php @@ -24,7 +24,7 @@ final class PHUIActionPanelView extends AphrontTagView { return $this; } - public function setFontIcon($image) { + public function setIcon($image) { $this->fontIcon = $image; return $this; } @@ -80,7 +80,7 @@ final class PHUIActionPanelView extends AphrontTagView { $icon = null; if ($this->fontIcon) { $fonticon = id(new PHUIIconView()) - ->setIconFont($this->fontIcon); + ->setIcon($this->fontIcon); $icon = phutil_tag( 'span', array( diff --git a/src/view/phui/PHUIBadgeMiniView.php b/src/view/phui/PHUIBadgeMiniView.php index 92d6fd8b8b..21f455b4d6 100644 --- a/src/view/phui/PHUIBadgeMiniView.php +++ b/src/view/phui/PHUIBadgeMiniView.php @@ -65,7 +65,7 @@ final class PHUIBadgeMiniView extends AphrontTagView { protected function getTagContent() { return id(new PHUIIconView()) - ->setIconFont($this->icon); + ->setIcon($this->icon); } } diff --git a/src/view/phui/PHUIBadgeView.php b/src/view/phui/PHUIBadgeView.php index fb50ff80ec..7e9f310843 100644 --- a/src/view/phui/PHUIBadgeView.php +++ b/src/view/phui/PHUIBadgeView.php @@ -104,7 +104,7 @@ final class PHUIBadgeView extends AphrontTagView { protected function getTagContent() { $icon = id(new PHUIIconView()) - ->setIconFont($this->icon); + ->setIcon($this->icon); $illustration = phutil_tag_div('phui-badge-illustration', $icon); diff --git a/src/view/phui/PHUIBigInfoView.php b/src/view/phui/PHUIBigInfoView.php index 03e1aea196..0f5bcecfbd 100644 --- a/src/view/phui/PHUIBigInfoView.php +++ b/src/view/phui/PHUIBigInfoView.php @@ -44,7 +44,7 @@ final class PHUIBigInfoView extends AphrontTagView { require_celerity_resource('phui-big-info-view-css'); $icon = id(new PHUIIconView()) - ->setIconFont($this->icon) + ->setIcon($this->icon) ->addClass('phui-big-info-icon'); $icon = phutil_tag( diff --git a/src/view/phui/PHUIButtonView.php b/src/view/phui/PHUIButtonView.php index 26a26a5ac4..9b9d4f0293 100644 --- a/src/view/phui/PHUIButtonView.php +++ b/src/view/phui/PHUIButtonView.php @@ -21,7 +21,6 @@ final class PHUIButtonView extends AphrontTagView { private $tag = 'button'; private $dropdown; private $icon; - private $iconFont; private $iconFirst; private $href = null; private $title = null; @@ -88,19 +87,16 @@ final class PHUIButtonView extends AphrontTagView { return $this; } - public function setIcon(PHUIIconView $icon, $first = true) { + public function setIcon($icon, $first = true) { + if (!($icon instanceof PHUIIconView)) { + $icon = id(new PHUIIconView()) + ->setIcon($icon); + } $this->icon = $icon; $this->iconFirst = $first; return $this; } - public function setIconFont($icon) { - $icon = id(new PHUIIconView()) - ->setIconFont($icon); - $this->setIcon($icon); - return $this; - } - protected function getTagName() { return $this->tag; } diff --git a/src/view/phui/PHUICrumbView.php b/src/view/phui/PHUICrumbView.php index 915dfbf41f..5039e17606 100644 --- a/src/view/phui/PHUICrumbView.php +++ b/src/view/phui/PHUICrumbView.php @@ -70,7 +70,7 @@ final class PHUICrumbView extends AphrontView { if ($this->icon) { $classes[] = 'phui-crumb-has-icon'; $icon = id(new PHUIIconView()) - ->setIconFont($this->icon); + ->setIcon($this->icon); } $name = phutil_tag( @@ -83,7 +83,7 @@ final class PHUICrumbView extends AphrontView { $divider = null; if (!$this->isLastCrumb) { $divider = id(new PHUIIconView()) - ->setIconFont('fa-angle-right') + ->setIcon('fa-angle-right') ->addClass('phui-crumb-divider') ->addClass('phui-crumb-view'); } else { diff --git a/src/view/phui/PHUICrumbsView.php b/src/view/phui/PHUICrumbsView.php index f8f25b389c..c85c0055d1 100644 --- a/src/view/phui/PHUICrumbsView.php +++ b/src/view/phui/PHUICrumbsView.php @@ -60,7 +60,7 @@ final class PHUICrumbsView extends AphrontView { } $icon = id(new PHUIIconView()) - ->setIconFont($icon_name); + ->setIcon($icon_name); } $name = phutil_tag( diff --git a/src/view/phui/PHUIDocumentViewPro.php b/src/view/phui/PHUIDocumentViewPro.php index dbab3ab54c..d60cd78d44 100644 --- a/src/view/phui/PHUIDocumentViewPro.php +++ b/src/view/phui/PHUIDocumentViewPro.php @@ -78,7 +78,7 @@ final class PHUIDocumentViewPro extends AphrontTagView { $toc_id = celerity_generate_unique_node_id(); $toc[] = id(new PHUIButtonView()) ->setTag('a') - ->setIconFont('fa-align-left') + ->setIcon('fa-align-left') ->setColor(PHUIButtonView::SIMPLE) ->addClass('phui-document-toc') ->addSigil('jx-toggle-class') diff --git a/src/view/phui/PHUIFeedStoryView.php b/src/view/phui/PHUIFeedStoryView.php index 3c6080aa34..40b7c76290 100644 --- a/src/view/phui/PHUIFeedStoryView.php +++ b/src/view/phui/PHUIFeedStoryView.php @@ -193,7 +193,7 @@ final class PHUIFeedStoryView extends AphrontView { $icon = null; if ($this->appIcon) { $icon = id(new PHUIIconView()) - ->setIconFont($this->appIcon); + ->setIcon($this->appIcon); } $action_list = array(); diff --git a/src/view/phui/PHUIHeaderView.php b/src/view/phui/PHUIHeaderView.php index 45b176f9a4..48fedd11ae 100644 --- a/src/view/phui/PHUIHeaderView.php +++ b/src/view/phui/PHUIHeaderView.php @@ -8,10 +8,12 @@ final class PHUIHeaderView extends AphrontTagView { private $tags = array(); private $image; private $imageURL = null; + private $imageEditURL = null; private $subheader; private $headerIcon; private $noBackground; private $bleedHeader; + private $profileHeader; private $tall; private $properties = array(); private $actionLinks = array(); @@ -56,6 +58,11 @@ final class PHUIHeaderView extends AphrontTagView { return $this; } + public function setImageEditURL($url) { + $this->imageEditURL = $url; + return $this; + } + public function setSubheader($subheader) { $this->subheader = $subheader; return $this; @@ -66,6 +73,11 @@ final class PHUIHeaderView extends AphrontTagView { return $this; } + public function setProfileHeader($bighead) { + $this->profileHeader = $bighead; + return $this; + } + public function setHeaderIcon($icon) { $this->headerIcon = $icon; return $this; @@ -105,7 +117,7 @@ final class PHUIHeaderView extends AphrontTagView { } $img = id(new PHUIIconView()) - ->setIconFont($icon); + ->setIcon($icon); $tag = phutil_tag( 'span', @@ -153,6 +165,10 @@ final class PHUIHeaderView extends AphrontTagView { $classes[] = 'phui-bleed-header'; } + if ($this->profileHeader) { + $classes[] = 'phui-profile-header'; + } + if ($this->properties || $this->policyObject || $this->subheader || $this->tall) { $classes[] = 'phui-header-tall'; @@ -164,16 +180,45 @@ final class PHUIHeaderView extends AphrontTagView { } protected function getTagContent() { + $image = null; if ($this->image) { + $image_href = null; + if ($this->imageURL) { + $image_href = $this->imageURL; + } else if ($this->imageEditURL) { + $image_href = $this->imageEditURL; + } + $image = phutil_tag( - ($this->imageURL ? 'a' : 'span'), + 'span', array( - 'href' => $this->imageURL, 'class' => 'phui-header-image', 'style' => 'background-image: url('.$this->image.')', - ), - ' '); + )); + + if ($image_href) { + $edit_view = null; + if ($this->imageEditURL) { + $edit_view = phutil_tag( + 'span', + array( + 'class' => 'phui-header-image-edit', + ), + pht('Edit')); + } + + $image = phutil_tag( + 'a', + array( + 'href' => $image_href, + 'class' => 'phui-header-image-href', + ), + array( + $image, + $edit_view, + )); + } } $viewer = $this->getUser(); @@ -190,7 +235,7 @@ final class PHUIHeaderView extends AphrontTagView { if ($this->actionLinks) { $actions = array(); foreach ($this->actionLinks as $button) { - $button->setColor(PHUIButtonView::SIMPLE); + $button->setColor(PHUIButtonView::GREY); $button->addClass(PHUI::MARGIN_SMALL_LEFT); $button->addClass('phui-header-action-link'); $actions[] = $button; @@ -242,7 +287,7 @@ final class PHUIHeaderView extends AphrontTagView { if ($this->headerIcon) { $icon = id(new PHUIIconView()) - ->setIconFont($this->headerIcon); + ->setIcon($this->headerIcon); $left[] = $icon; } $left[] = phutil_tag( @@ -416,7 +461,7 @@ final class PHUIHeaderView extends AphrontTagView { } $icon = id(new PHUIIconView()) - ->setIconFont($policy->getIcon().' bluegrey'); + ->setIcon($policy->getIcon().' bluegrey'); $link = javelin_tag( 'a', diff --git a/src/view/phui/PHUIIconCircleView.php b/src/view/phui/PHUIIconCircleView.php index 1269c4e28c..05612c26f2 100644 --- a/src/view/phui/PHUIIconCircleView.php +++ b/src/view/phui/PHUIIconCircleView.php @@ -15,7 +15,7 @@ final class PHUIIconCircleView extends AphrontTagView { return $this; } - public function setIconFont($icon) { + public function setIcon($icon) { $this->icon = $icon; return $this; } @@ -60,7 +60,7 @@ final class PHUIIconCircleView extends AphrontTagView { protected function getTagContent() { return id(new PHUIIconView()) - ->setIconFont($this->icon) + ->setIcon($this->icon) ->addClass($this->color); } diff --git a/src/view/phui/PHUIIconView.php b/src/view/phui/PHUIIconView.php index c383aff30b..adfd33187d 100644 --- a/src/view/phui/PHUIIconView.php +++ b/src/view/phui/PHUIIconView.php @@ -48,7 +48,7 @@ final class PHUIIconView extends AphrontTagView { return $this; } - public function setIconFont($icon, $color = null) { + public function setIcon($icon, $color = null) { $this->iconFont = $icon; $this->iconColor = $color; return $this; @@ -105,7 +105,7 @@ final class PHUIIconView extends AphrontTagView { return idx(phutil_json_decode($data), 'sprites'); } - public static function getFontIcons() { + public static function getIcons() { return array( 'fa-glass', 'fa-music', @@ -747,7 +747,7 @@ final class PHUIIconView extends AphrontTagView { ); } - public static function getFontIconColors() { + public static function getIconColors() { return array( 'bluegrey', 'white', diff --git a/src/view/phui/PHUIListItemView.php b/src/view/phui/PHUIListItemView.php index f0bb46fb87..33c511c9c0 100644 --- a/src/view/phui/PHUIListItemView.php +++ b/src/view/phui/PHUIListItemView.php @@ -269,7 +269,7 @@ final class PHUIListItemView extends AphrontTagView { $icon = id(new PHUIIconView()) ->addClass('phui-list-item-icon') - ->setIconFont($icon_name); + ->setIcon($icon_name); } if ($this->profileImage) { diff --git a/src/view/phui/PHUIObjectBoxView.php b/src/view/phui/PHUIObjectBoxView.php index 49c55769b4..32440a09cf 100644 --- a/src/view/phui/PHUIObjectBoxView.php +++ b/src/view/phui/PHUIObjectBoxView.php @@ -4,6 +4,7 @@ final class PHUIObjectBoxView extends AphrontView { private $headerText; private $color; + private $background; private $formErrors = null; private $formSaved = false; private $infoView; @@ -106,6 +107,11 @@ final class PHUIObjectBoxView extends AphrontView { return $this; } + public function setBackground($color) { + $this->background = $color; + return $this; + } + public function setFormErrors(array $errors, $title = null) { if ($errors) { $this->formErrors = id(new PHUIInfoView()) @@ -258,7 +264,7 @@ final class PHUIObjectBoxView extends AphrontView { if ($this->actionListID) { $icon_id = celerity_generate_unique_node_id(); $icon = id(new PHUIIconView()) - ->setIconFont('fa-bars'); + ->setIcon('fa-bars'); $meta = array( 'map' => array( $this->actionListID => 'phabricator-action-list-toggle', @@ -387,6 +393,10 @@ final class PHUIObjectBoxView extends AphrontView { $content->addClass('phui-object-box-'.$this->color); } + if ($this->background) { + $content->setColor($this->background); + } + if ($this->collapsed) { $content->addClass('phui-object-box-collapsed'); } diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php index 5da85777b0..b3c4368c22 100644 --- a/src/view/phui/PHUIObjectItemView.php +++ b/src/view/phui/PHUIObjectItemView.php @@ -169,13 +169,13 @@ final class PHUIObjectItemView extends AphrontTagView { $fi = 'fa-refresh ph-spin sky'; break; } - $this->setFontIcon($fi); + $this->setIcon($fi); return $this; } - public function setFontIcon($icon) { + public function setIcon($icon) { $this->fontIcon = id(new PHUIIconView()) - ->setIconFont($icon); + ->setIcon($icon); return $this; } @@ -401,7 +401,7 @@ final class PHUIObjectItemView extends AphrontTagView { foreach ($this->icons as $spec) { $icon = $spec['icon']; $icon = id(new PHUIIconView()) - ->setIconFont($icon) + ->setIcon($icon) ->addClass('phui-object-item-icon-image'); if (isset($spec['attributes']['tip'])) { @@ -725,7 +725,7 @@ final class PHUIObjectItemView extends AphrontTagView { Javelin::initBehavior('phabricator-tooltips'); $icon = id(new PHUIIconView()) - ->setIconFont($icon); + ->setIcon($icon); $options = array( 'class' => 'phui-object-item-status-icon', diff --git a/src/view/phui/PHUIPinboardItemView.php b/src/view/phui/PHUIPinboardItemView.php index 93e2277040..1fafefc3d6 100644 --- a/src/view/phui/PHUIPinboardItemView.php +++ b/src/view/phui/PHUIPinboardItemView.php @@ -95,7 +95,7 @@ final class PHUIPinboardItemView extends AphrontView { $icon_list = array(); foreach ($this->iconBlock as $block) { $icon = id(new PHUIIconView()) - ->setIconFont($block[0].' lightgreytext') + ->setIcon($block[0].' lightgreytext') ->addClass('phui-pinboard-icon'); $count = phutil_tag('span', array(), $block[1]); diff --git a/src/view/phui/PHUIPropertyListView.php b/src/view/phui/PHUIPropertyListView.php index b505bde09f..0d60ed25b0 100644 --- a/src/view/phui/PHUIPropertyListView.php +++ b/src/view/phui/PHUIPropertyListView.php @@ -115,6 +115,16 @@ final class PHUIPropertyListView extends AphrontView { $this->invokedWillRenderEvent = true; } + public function isEmpty() { + $this->invokeWillRenderEvent(); + + if ($this->parts) { + return false; + } + + return true; + } + public function render() { $this->invokeWillRenderEvent(); @@ -248,7 +258,7 @@ final class PHUIPropertyListView extends AphrontView { $name = $part['name']; if ($part['icon']) { $icon = id(new PHUIIconView()) - ->setIconFont($part['icon'].' bluegrey'); + ->setIcon($part['icon'].' bluegrey'); $name = phutil_tag( 'span', array( diff --git a/src/view/phui/PHUIStatusItemView.php b/src/view/phui/PHUIStatusItemView.php index b268360eef..dae7e7d472 100644 --- a/src/view/phui/PHUIStatusItemView.php +++ b/src/view/phui/PHUIStatusItemView.php @@ -70,7 +70,7 @@ final class PHUIStatusItemView extends AphrontTagView { $icon = null; if ($this->icon) { $icon = id(new PHUIIconView()) - ->setIconFont($this->icon.' '.$this->iconColor); + ->setIcon($this->icon.' '.$this->iconColor); if ($this->iconLabel) { Javelin::initBehavior('phabricator-tooltips'); diff --git a/src/view/phui/PHUITagView.php b/src/view/phui/PHUITagView.php index 439feb77c5..8b6e6aa8d6 100644 --- a/src/view/phui/PHUITagView.php +++ b/src/view/phui/PHUITagView.php @@ -166,7 +166,7 @@ final class PHUITagView extends AphrontTagView { if ($this->icon) { $icon = id(new PHUIIconView()) - ->setIconFont($this->icon); + ->setIcon($this->icon); } else { $icon = null; } diff --git a/src/view/phui/PHUITextView.php b/src/view/phui/PHUITextView.php deleted file mode 100644 index e075e1f205..0000000000 --- a/src/view/phui/PHUITextView.php +++ /dev/null @@ -1,20 +0,0 @@ -appendChild($text); - return $this; - } - - protected function getTagName() { - return 'span'; - } - - protected function getTagAttributes() { - require_celerity_resource('phui-text-css'); - return array(); - } -} diff --git a/src/view/phui/PHUITimelineEventView.php b/src/view/phui/PHUITimelineEventView.php index f9f1d4d3b4..ecd9329860 100644 --- a/src/view/phui/PHUITimelineEventView.php +++ b/src/view/phui/PHUITimelineEventView.php @@ -236,7 +236,7 @@ final class PHUITimelineEventView extends AphrontView { } $icon = id(new PHUIIconView()) - ->setIconFont($this->icon.' white') + ->setIcon($this->icon.' white') ->addClass('phui-timeline-icon'); $icon = phutil_tag( @@ -297,7 +297,7 @@ final class PHUITimelineEventView extends AphrontView { if ($items || $has_menu) { $icon = id(new PHUIIconView()) - ->setIconFont('fa-caret-down'); + ->setIcon('fa-caret-down'); $aural = javelin_tag( 'span', array( diff --git a/src/view/phui/PHUIWorkpanelView.php b/src/view/phui/PHUIWorkpanelView.php index 97221428d4..96978de952 100644 --- a/src/view/phui/PHUIWorkpanelView.php +++ b/src/view/phui/PHUIWorkpanelView.php @@ -58,8 +58,6 @@ final class PHUIWorkpanelView extends AphrontTagView { protected function getTagContent() { require_celerity_resource('phui-workpanel-view-css'); - $classes = array(); - $classes[] = 'phui-workpanel-view-inner'; $footer = ''; if ($this->footerAction) { $footer_tag = $this->footerAction; @@ -94,16 +92,15 @@ final class PHUIWorkpanelView extends AphrontTagView { ), $this->cards); - $view = phutil_tag( - 'div', - array( - 'class' => implode(' ', $classes), - ), - array( - $header, - $body, - $footer, - )); + $view = id(new PHUIBoxView()) + ->setColor(PHUIBoxView::GREY) + ->addClass('phui-workpanel-view-inner') + ->appendChild( + array( + $header, + $body, + $footer, + )); return $view; } diff --git a/src/view/phui/calendar/PHUICalendarDayView.php b/src/view/phui/calendar/PHUICalendarDayView.php index dd8e5f3fb2..34299e39c3 100644 --- a/src/view/phui/calendar/PHUICalendarDayView.php +++ b/src/view/phui/calendar/PHUICalendarDayView.php @@ -340,7 +340,7 @@ final class PHUICalendarDayView extends AphrontView { $button_bar = new PHUIButtonBarView(); $left_icon = id(new PHUIIconView()) - ->setIconFont('fa-chevron-left bluegrey'); + ->setIcon('fa-chevron-left bluegrey'); $left = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::GREY) @@ -349,7 +349,7 @@ final class PHUICalendarDayView extends AphrontView { ->setIcon($left_icon); $right_icon = id(new PHUIIconView()) - ->setIconFont('fa-chevron-right bluegrey'); + ->setIcon('fa-chevron-right bluegrey'); $right = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::GREY) diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php index 4de84ce3fd..9f9bc86a80 100644 --- a/src/view/phui/calendar/PHUICalendarListView.php +++ b/src/view/phui/calendar/PHUICalendarListView.php @@ -60,7 +60,7 @@ final class PHUICalendarListView extends AphrontTagView { } $dot = id(new PHUIIconView()) - ->setIconFont($event->getIcon(), $icon_color) + ->setIcon($event->getIcon(), $icon_color) ->addClass('phui-calendar-list-item-icon'); $title = phutil_tag( diff --git a/src/view/phui/calendar/PHUICalendarMonthView.php b/src/view/phui/calendar/PHUICalendarMonthView.php index 0308f542e5..5efa4c1059 100644 --- a/src/view/phui/calendar/PHUICalendarMonthView.php +++ b/src/view/phui/calendar/PHUICalendarMonthView.php @@ -396,7 +396,7 @@ final class PHUICalendarMonthView extends AphrontView { $button_bar = new PHUIButtonBarView(); $left_icon = id(new PHUIIconView()) - ->setIconFont('fa-chevron-left bluegrey'); + ->setIcon('fa-chevron-left bluegrey'); $left = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::GREY) @@ -405,7 +405,7 @@ final class PHUICalendarMonthView extends AphrontView { ->setIcon($left_icon); $right_icon = id(new PHUIIconView()) - ->setIconFont('fa-chevron-right bluegrey'); + ->setIcon('fa-chevron-right bluegrey'); $right = id(new PHUIButtonView()) ->setTag('a') ->setColor(PHUIButtonView::GREY) diff --git a/webroot/rsrc/css/application/base/phui-theme.css b/webroot/rsrc/css/application/base/phui-theme.css index 03ccb8f38e..815f0e0027 100644 --- a/webroot/rsrc/css/application/base/phui-theme.css +++ b/webroot/rsrc/css/application/base/phui-theme.css @@ -2,7 +2,7 @@ * @provides phui-theme-css */ -/*--- Base Colors ------------------------------------------------------------*/ +/*--- Header Colors ----------------------------------------------------------*/ .phui-theme-blindigo .phabricator-main-menu-background { background: #41506e; @@ -13,7 +13,7 @@ } .phui-theme-indigo .phabricator-main-menu-background { - background: #4a2b85; + background: #2C1D4A; } .phui-theme-red .phabricator-main-menu-background { @@ -21,91 +21,48 @@ } .phui-theme-blue .phabricator-main-menu-background { - background: #004377; + background: #003965; } .phui-theme-green .phabricator-main-menu-background { background: #124A1B; } -/*--- Light Colors -----------------------------------------------------------*/ +/*--- Profile Nav Colors -----------------------------------------------------*/ -.phui-theme-light button.phabricator-main-menu-search-dropdown .caret:before { - color: {$lightbluetext}; + +.phui-theme-blindigo .phui-profile-menu .phabricator-side-menu, +.phui-theme-blindigo .phabricator-side-menu .phui-profile-menu-footer-1 { + background: #525867; } -.phui-theme-light .phabricator-main-menu-search - button.phabricator-main-menu-search-dropdown .phui-icon-view { - color: {$lightbluetext}; - text-shadow: {$whitetextshadow}; +.phui-theme-dark .phui-profile-menu .phabricator-side-menu, +.phui-theme-dark .phabricator-side-menu .phui-profile-menu-footer-1 { + background: #30333A; } -.phui-theme-light .alert-notifications .phui-icon-view { - color: {$lightbluetext}; - text-shadow: {$whitetextshadow}; +.phui-theme-indigo .phui-profile-menu .phabricator-side-menu, +.phui-theme-indigo .phabricator-side-menu .phui-profile-menu-footer-1 { + background: #423658; } -.phui-theme-light .phabricator-application-menu - .phui-list-item-icon.phui-font-fa { - color: {$lightbluetext}; - text-shadow: {$whitetextshadow}; +.phui-theme-red .phui-profile-menu .phabricator-side-menu, +.phui-theme-red .phabricator-side-menu .phui-profile-menu-footer-1 { + background: #420C0C; } -.device-desktop.phui-theme-light .phabricator-main-menu-search - button.phabricator-main-menu-search-dropdown:hover .phui-icon-view { - color: {$sky}; +.phui-theme-blue .phui-profile-menu .phabricator-side-menu, +.phui-theme-blue .phabricator-side-menu .phui-profile-menu-footer-1 { + background: #062842; } -.device-desktop.phui-theme-light .phabricator-application-menu - .core-menu-item.phui-list-item-view:hover - .phui-list-item-icon.phui-font-fa { - color: {$sky}; +.phui-theme-green .phui-profile-menu .phabricator-side-menu, +.phui-theme-green .phabricator-side-menu .phui-profile-menu-footer-1 { + background: #122916; } -.phui-theme-light .phabricator-menu-button-icon.phui-icon-view { - color: {$bluetext}; - text-shadow: {$whitetextshadow}; -} -.phui-theme-light .sprite-main-header { - background-image: none; -} - -.device-desktop.phui-theme-light .phabricator-main-menu-brand:hover { - background-color: rgba(55,55,55,.08); - cursor: hand; -} - -/*--- Messages / Notifications -----------------------------------------------*/ - -.device-desktop.phui-theme-light .alert-notifications:hover .phui-icon-view { - color: {$sky}; -} - -.phui-theme-light .alert-unread .phabricator-main-menu-alert-icon, -.phui-theme-light .message-unread .phabricator-main-menu-message-icon { - color: {$sky}; -} - -.phui-theme-light .phabricator-main-menu-alert-count, -.phui-theme-light .phabricator-main-menu-message-count, -.phui-theme-light .phui-icon-view.menu-icon-selected { - color: {$sky}; -} - -/*--- Durable Column ---------------------------------------------------------*/ - -.phui-theme-light .conpherence-durable-column-header-text, -.phui-theme-light .conpherence-durable-column-header-text .phui-icon-view { - color: {$bluetext}; -} - -.phui-theme-light .conpherence-durable-column-header { - border-left: 1px solid {$lightblueborder}; - border-right: 1px solid {$lightblueborder}; -} - -/*--- Dark "Classic" ---------------------------------------------------------*/ +/*--- Dark "Classic Phabricator" ---------------------------------------------*/ .phui-theme-dark { background-color: {$page.background.dark}; @@ -113,15 +70,8 @@ .phui-theme-dark .phui-box-border { border-color: {$lightblueborder}; - border-bottom-color: {$blueborder}; } -/*--- Blindigo "Phacility" ---------------------------------------------------*/ - -.phui-theme-blindigo { - background-color: #F1F1F4; -} - -.phui-theme-blindigo .phui-workpanel-view .phui-header-shell { - background-color: #F1F1F4; +.phui-theme-dark .phui-box-grey { + background-color: {$page.background.dark}; } diff --git a/webroot/rsrc/css/application/project/project-view.css b/webroot/rsrc/css/application/project/project-view.css new file mode 100644 index 0000000000..453942ecc4 --- /dev/null +++ b/webroot/rsrc/css/application/project/project-view.css @@ -0,0 +1,65 @@ +/** + * @provides project-view-css + */ + +.project-view-home { + background: #fff; + padding-bottom: 64px; +} + +.phui-box.phui-box-grey.project-view-properties { + margin: 0 16px 0 16px; + padding: 4px 12px; +} + +.device-phone .phui-box.phui-box-grey.project-view-properties { + margin: 0 12px 0 12px; +} + +.project-view-properties .phui-property-list-key { + width: auto; + margin-left: 4px; +} + +.project-view-properties .phui-property-list-section-header { + border: none; + padding: 12px 4px 0; +} + +.project-view-feed .phui-object-box.phui-box-border { + border: none; + padding: 8px; +} + +.project-view-feed .phui-header-shell { + padding: 8px 4px; +} + +.project-view-feed .phui-header-header { + font-size: {$biggerfontsize}; + margin-left: 4px; +} + +.project-view-home .phui-box-grey { + padding: 0; +} + +.project-view-home .phui-box-grey .phui-header-shell { + padding: 8px 8px 8px 12px; +} + +.project-view-home .phui-box-grey .phui-header-header { + font-size: {$biggerfontsize}; +} + +.project-view-home .phui-box-grey .phui-object-item-list-view { + padding: 8px; +} + +.device-desktop .phui-two-column-view.project-view-badges .phui-side-column { + width: 364px; +} + +.profile-no-badges { + padding: 24px 0; +} diff --git a/webroot/rsrc/css/core/core.css b/webroot/rsrc/css/core/core.css index 87e6a98cce..af6732260b 100644 --- a/webroot/rsrc/css/core/core.css +++ b/webroot/rsrc/css/core/core.css @@ -47,7 +47,7 @@ body { direction: ltr; text-align: left; unicode-bidi: embed; - background: {$page.background.light}; + background: {$page.background}; /* By default, the iPhone zooms all text on the page by some percentage when you rotate from portrait mode to landscape mode. Disable this, since it diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css index bec9c3e29e..3b9e51641f 100644 --- a/webroot/rsrc/css/core/remarkup.css +++ b/webroot/rsrc/css/core/remarkup.css @@ -13,12 +13,12 @@ .PhabricatorMonospaced, .phabricator-remarkup .remarkup-code-block .remarkup-code { - font: 10px/13px "Menlo", "Consolas", "Monaco", monospace; + font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; } .platform-windows .PhabricatorMonospaced, .platform-windows .phabricator-remarkup .remarkup-code-block .remarkup-code { - font: 11px/13px "Menlo", "Consolas", "Monaco", monospace; + font: 12px/15px "Menlo", "Consolas", "Monaco", monospace; } .phabricator-remarkup .remarkup-code-block { @@ -27,28 +27,33 @@ } .phabricator-remarkup .remarkup-code-header { - padding: 2px 8px; + padding: 6px 12px; font-size: 13px; font-weight: bold; - background: {$sh-yellowbackground}; + background: rgba(71,87,120,0.08); display: inline-block; + border-top-left-radius: 3px; + border-top-right-radius: 3px; } .phabricator-remarkup .code-block-counterexample .remarkup-code-header { background-color: {$sh-redbackground}; } +.phabricator-remarkup .remarkup-code-block .remarkup-code-header + pre { + border-top-left-radius: 0; +} + .phabricator-remarkup .remarkup-code-block pre { - background: #FEF9ED; - border: 1px solid {$sh-lightyellowborder}; + background: rgba(71,87,120,0.08); display: block; color: #000; overflow: auto; - padding: 8px; + padding: 12px; + border-radius: 3px; } .phabricator-remarkup pre.remarkup-counterexample { - border: 1px solid {$sh-lightredborder}; background-color: {$sh-redbackground}; } @@ -66,6 +71,10 @@ color: {$anchor}; } +.phabricator-remarkup .remarkup-header tt.remarkup-monospaced { + font-weight: normal; +} + .phabricator-remarkup ul.remarkup-list { list-style: disc; margin: 12px 0 12px 30px; diff --git a/webroot/rsrc/css/phui/phui-box.css b/webroot/rsrc/css/phui/phui-box.css index e31c4bcae4..16be92ad48 100644 --- a/webroot/rsrc/css/phui/phui-box.css +++ b/webroot/rsrc/css/phui/phui-box.css @@ -13,11 +13,37 @@ } .phui-box-grey { - background-color: rgba(71,87,120,0.1); + background-color: {$page.background}; border-radius: 3px; + border: none; } .phui-box-blue { background-color: {$bluebackground}; border-radius: 3px; + border: none; +} + +.phui-box-blue .phui-object-item, +.phui-box-grey .phui-object-item { + background: transparent; +} + +.phui-box-blue .phui-object-item-link, +.phui-box-grey .phui-object-item-link { + color: {$darkbluetext}; +} + +.phui-box-blue .phui-header-shell, +.phui-box-grey .phui-header-shell { + border-bottom: 2px solid #fff; +} + +.phui-object-box.phui-box-blue div.phui-info-severity-nodata, +.phui-object-box.phui-box-grey div.phui-info-severity-nodata { + background: transparent; + padding: 12px 4px; + text-align: center; + border: none; + color: {$greytext}; } diff --git a/webroot/rsrc/css/phui/phui-button.css b/webroot/rsrc/css/phui/phui-button.css index 49b1133f77..958deb7f67 100644 --- a/webroot/rsrc/css/phui/phui-button.css +++ b/webroot/rsrc/css/phui/phui-button.css @@ -59,8 +59,8 @@ button.grey, input[type="submit"].grey, a.grey, a.grey:visited { - background-color: {$lightgreybackground}; - border-color: {$lightgreyborder}; + background-color: rgba(71, 87, 120, 0.06); + border-color: rgba(71, 87, 120, 0.12); color: {$darkgreytext}; } @@ -101,27 +101,33 @@ a.button:hover, button:hover { text-decoration: none; background-color: {$sky}; + transition: 0.1s; } a.button.grey:hover, button.grey:hover { - background-color: #fff; + background-color: rgba(71, 87, 120, 0.12); + border-color: rgba(71, 87, 120, 0.2); + transition: 0.1s; } a.button.green:hover, button.green:hover { background-color: #0DAD48; + transition: 0.1s; } a.button.simple:hover, button.simple:hover { background-color: {$blue}; color: #fff; + transition: 0.1s; } a.button.simple:hover .phui-icon-view, button.simple:hover .phui-icon-view { color: #fff; + transition: 0.1s; } a.button.simple .phui-icon-view { diff --git a/webroot/rsrc/css/phui/phui-document.css b/webroot/rsrc/css/phui/phui-document.css index 3ceb445639..fd1f057b88 100644 --- a/webroot/rsrc/css/phui/phui-document.css +++ b/webroot/rsrc/css/phui/phui-document.css @@ -151,11 +151,11 @@ body .phui-document-view .phui-header-shell.phui-bleed-header { .phui-document-view .PhabricatorMonospaced, .phui-document-view .phabricator-remarkup .remarkup-code-block .remarkup-code { - font: 11px/16px "Menlo", "Consolas", "Monaco", monospace; + font: 12px/18px "Menlo", "Consolas", "Monaco", monospace; } .platform-windows .phui-document-view .PhabricatorMonospaced, .platform-windows .phui-document-view .phabricator-remarkup .remarkup-code-block .remarkup-code { - font: 12px/16px "Menlo", "Consolas", "Monaco", monospace; + font: 13px/18px "Menlo", "Consolas", "Monaco", monospace; } diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index 2c58f2fbe8..63852820df 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -128,9 +128,34 @@ body .phui-header-shell.phui-bleed-header display: inline-block; background-repeat: no-repeat; background-size: 100%; - box-shadow: {$borderinset}; width: 50px; height: 50px; + border-radius: 3px; +} + +.phui-header-image-href { + position: relative; + display: block; +} + +.phui-header-image-edit { + display: none; +} + +.device-desktop .phui-header-image-href:hover .phui-header-image-edit { + display: block; + position: absolute; + left: 0; + background: rgba(0,0,0,0.4); + color: #fff; + font-weight: normal; + bottom: 4px; + padding: 4px 8px; + font-size: 12px; +} + +.device-desktop .phui-header-image-edit:hover { + text-decoration: underline; } .phui-header-subheader { @@ -253,3 +278,40 @@ body .phui-header-shell.phui-bleed-header .phui-header-subheader .phui-badge-flex-view:after { display: inline; } + +/*** Profile Header ***********************************************************/ + +.phui-profile-header { + padding: 24px 20px 20px 24px; +} + +.device-phone .phui-profile-header { + padding: 12px; +} + +.phui-profile-header.phui-header-shell { + margin: 0; + border: none; +} + +.phui-profile-header .phui-header-image { + height: 80px; + width: 80px; +} + +.phui-profile-header .phui-header-col1 { + width: 96px; +} + +.phui-profile-header .phui-header-subheader { + margin-top: 12px; +} + +.phui-profile-header.phui-header-shell .phui-header-header { + font-family: 'Aleo', {$fontfamily}; + font-size: 24px; +} + +.phui-profile-header .phui-header-col3 { + vertical-align: top; +} diff --git a/webroot/rsrc/css/phui/phui-object-item-list-view.css b/webroot/rsrc/css/phui/phui-object-item-list-view.css index 1122b0f7ff..b1e718cc6a 100644 --- a/webroot/rsrc/css/phui/phui-object-item-list-view.css +++ b/webroot/rsrc/css/phui/phui-object-item-list-view.css @@ -735,8 +735,9 @@ ul.phui-object-item-list-view .phui-object-item-selected .phui-object-item-image { width: 40px; height: 40px; + border-radius: 3px; background-size: 100%; - margin: 6px; + margin: 8px 6px; position: absolute; } diff --git a/webroot/rsrc/css/phui/phui-profile-menu.css b/webroot/rsrc/css/phui/phui-profile-menu.css index 8c765b56f2..889d98a075 100644 --- a/webroot/rsrc/css/phui/phui-profile-menu.css +++ b/webroot/rsrc/css/phui/phui-profile-menu.css @@ -18,7 +18,6 @@ vertical-align: top; width: {$menu.profile.width}; max-width: {$menu.profile.width}; - transition: .2s; margin-top: 0; overflow: hidden; } @@ -34,7 +33,7 @@ } .phui-profile-menu .phabricator-side-menu { - background: {$menu.profile.background}; + background: #525867; box-shadow: inset -2px 0 2px rgba(0, 0, 0, 0.150); width: 240px; } @@ -108,9 +107,8 @@ .device-desktop .phui-profile-menu .phabricator-side-menu .phui-list-item-href:hover { - background-color: {$menu.profile.background.hover}; + background-color: rgba(0,0,0,0.15); color: {$menu.profile.text.selected}; - transition: 0.2s; } .phui-profile-menu .phabricator-side-menu @@ -120,14 +118,17 @@ .phui-list-item-href:hover .phui-list-item-icon { color: {$menu.profile.text.selected}; - transition: 0.2s; } .phui-profile-menu .phabricator-side-menu .phui-list-item-selected .phui-list-item-href { - background-color: {$menu.profile.background.selected}; + background-color: rgba(0,0,0,0.3); color: {$menu.profile.text.selected}; - transition: 0.2s; +} + +.phui-profile-menu .phabricator-side-menu .phui-list-item-selected + .phui-list-item-href:hover { + background-color: rgba(0,0,0,0.45); } .phui-profile-menu .phabricator-side-menu .phui-divider { @@ -169,7 +170,7 @@ .phui-profile-menu .phui-profile-menu-collapsed .phabricator-side-menu .phui-profile-menu-footer .phui-list-item-href { - padding: 20px 0 20px; + padding: 20px 0 24px; } .phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer @@ -194,46 +195,108 @@ .phui-icon-circle, .phui-profile-menu .phui-list-item-selected.phui-profile-menu-footer .phui-icon-circle { - border-color: #fff; + border-color: {$menu.profile.text.selected}; } .phui-profile-menu .phui-profile-menu-footer .phui-list-item-href:hover .phui-icon-circle .phui-icon-view, .phui-profile-menu .phui-list-item-selected.phui-profile-menu-footer .phui-icon-circle .phui-icon-view { - color: #fff; + color: {$menu.profile.text.selected}; } .phui-profile-menu .phui-profile-menu-footer .phui-icon-circle.phui-list-item-icon { - font-size: 11px; + font-size: 12px; } -div.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-1 { - bottom: 40px; - position: fixed; - background-color: {$menu.profile.background}; -} - -div.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-2 { +.phui-profile-menu .phabricator-side-menu .phui-profile-menu-footer-1 { bottom: 0; position: fixed; - background-color: {$menu.profile.background}; } -.phui-profile-menu .phui-profile-menu-footer-1, -.phui-profile-menu .phui-profile-menu-footer-2 { +.phui-profile-menu .phui-profile-menu-footer-1 { width: {$menu.profile.width}; - transition: .2s; } -.phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-1, -.phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-2 { +.phui-profile-menu .phui-profile-menu-collapsed .phui-profile-menu-footer-1 { width: {$menu.profile.width.collapsed}; - transition: .2s; } .phui-profile-menu .phabricator-side-menu .phui-list-item-selected.phui-profile-menu-footer .phui-list-item-href { - background: transparent; + background: transparent; +} + +.phui-profile-menu .phui-profile-menu-collapsing + .phabricator-nav-local { + animation: profile-menu-collapse 0.2s; +} + +.phui-profile-menu .phui-profile-menu-expanding + .phabricator-nav-local { + animation: profile-menu-expand 0.2s; +} + +.phui-profile-menu .phui-profile-menu-collapsing + .phabricator-side-menu .phui-list-item-href { + animation: profile-menu-blink 0.2s; +} + +.phui-profile-menu .phui-profile-menu-expanding + .phabricator-side-menu .phui-list-item-href { + animation: profile-menu-blink 0.2s; +} + +@keyframes profile-menu-blink { + 0% { + opacity: 1.0; + } + 25% { + opacity: 0.0; + } + 75% { + opacity: 0.0; + } + 100% { + opacity: 1.0; + } +} + +@keyframes profile-menu-collapse { + 0% { + width: {$menu.profile.width}; + max-width: {$menu.profile.width}; + } + 33% { + width: {$menu.profile.width}; + max-width: {$menu.profile.width}; + } + 66% { + width: {$menu.profile.width.collapsed}; + max-width: {$menu.profile.width.collapsed}; + } + 100% { + width: {$menu.profile.width.collapsed}; + max-width: {$menu.profile.width.collapsed}; + } +} + +@keyframes profile-menu-expand { + 0% { + width: {$menu.profile.width.collapsed}; + max-width: {$menu.profile.width.collapsed}; + } + 33% { + width: {$menu.profile.width.collapsed}; + max-width: {$menu.profile.width.collapsed}; + } + 66% { + width: {$menu.profile.width}; + max-width: {$menu.profile.width}; + } + 100% { + width: {$menu.profile.width}; + max-width: {$menu.profile.width}; + } } diff --git a/webroot/rsrc/css/phui/phui-text.css b/webroot/rsrc/css/phui/phui-text.css deleted file mode 100644 index 79b87d8e2a..0000000000 --- a/webroot/rsrc/css/phui/phui-text.css +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @provides phui-text-css - */ - - -/* Styles */ -.phui-text-bold { - font-weight: bold; -} - -.phui-text-uppercase { - text-transform: uppercase; -} - -.phui-text-strike { - text-decoration: line-through; -} - - -/* Colors */ -.phui-text-red { - color: {$red}; -} - -.phui-text-orange { - color: {$orange}; -} - -.phui-text-yellow { - color: {$yellow}; -} - -.phui-text-green { - color: {$green} -} - -.phui-text-blue { - color: {$blue}; -} - -.phui-text-indigo { - color: {$indigo}; -} - -.phui-text-violet { - color: {$violet}; -} - -.phui-text-white { - color: #fff; -} - -.phui-text-black { - color: #333; -} diff --git a/webroot/rsrc/css/phui/phui-two-column-view.css b/webroot/rsrc/css/phui/phui-two-column-view.css index 7b6bc7e49b..21c4c36393 100644 --- a/webroot/rsrc/css/phui/phui-two-column-view.css +++ b/webroot/rsrc/css/phui/phui-two-column-view.css @@ -28,7 +28,7 @@ } .device-desktop .phui-two-column-view - .phui-side-column .phui-object-box:first-child { + .phui-side-column .phui-object-box { margin: 0 16px 16px 0; } diff --git a/webroot/rsrc/css/phui/phui-workboard-view.css b/webroot/rsrc/css/phui/workboards/phui-workboard.css similarity index 54% rename from webroot/rsrc/css/phui/phui-workboard-view.css rename to webroot/rsrc/css/phui/workboards/phui-workboard.css index 5d4ed5dd1c..54b4907861 100644 --- a/webroot/rsrc/css/phui/phui-workboard-view.css +++ b/webroot/rsrc/css/phui/workboards/phui-workboard.css @@ -6,17 +6,23 @@ width: 100%; } +.device-phone .phui-workboard-view { + width: auto; +} + .device-desktop .phui-workboard-view-shadow { overflow-x: auto; position: absolute; - top: 96px; + top: 79px; bottom: 0; left: 0; right: 0; + background: #fff; + padding: 16px; } .device-desktop .page-has-warning .phui-workboard-view-shadow { - top: 132px; + top: 113px; } .device-desktop.with-durable-column .phui-workboard-view-shadow { @@ -38,12 +44,12 @@ } .device-desktop .project-board-wrapper .phui-workboard-view-shadow { - left: 253px; + left: {$menu.profile.width}; } .device-desktop .phui-profile-menu-collapsed .project-board-wrapper .phui-workboard-view-shadow { - left: 101px; + left: {$menu.profile.width.collapsed}; } .device-desktop .phui-workboard-view .aphront-multi-column-fixed @@ -51,43 +57,6 @@ margin-left: 0; } -.device-tablet .project-board-wrapper { - margin-left: 8px; - margin-right: 8px; -} - -.project-board-header { - background-color: #fff; - border-bottom: 1px solid {$lightblueborder}; - padding: 12px; - position: relative; -} - -.device .project-board-header { - padding: 0; -} - -.project-board-header .phui-header-shell { - padding: 0; - border-bottom: 1px solid {$blueborder}; -} - -.device .project-board-header .phui-header-shell { - padding: 8px; -} - -.project-board-header .phui-header-header { - font-size: 18px; -} - -.project-board-header .phui-header-subheader { - display: inline-block; - margin: 0; - padding: 0 8px; -} - -.device-phone .project-board-header .phui-header-subheader { - display: block; - margin: 8px 0 2px 0; - padding: 0; +.device .project-board-wrapper { + margin: 16px; } diff --git a/webroot/rsrc/css/phui/workboards/phui-workcard.css b/webroot/rsrc/css/phui/workboards/phui-workcard.css new file mode 100644 index 0000000000..95930b0da1 --- /dev/null +++ b/webroot/rsrc/css/phui/workboards/phui-workcard.css @@ -0,0 +1,126 @@ +/** + * @provides phui-workcard-view-css + */ + +.phui-workboard-view .phui-object-item { + background-color: #fff; + border-radius: 3px; + margin-bottom: 6px; +} + +.phui-workboard-view .phui-object-item-name { + padding-bottom: 4px; +} + +.phui-workboard-view .phui-object-item-content { + margin-top: 0; +} + +.phui-workboard-view .phui-object-item-frame { + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; +} + +.phui-workboard-view .phui-object-item .phui-object-item-objname { + -webkit-touch-callout: text; + -webkit-user-select: text; + -khtml-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.phui-workboard-view .phui-object-item-link { + white-space: normal; + font-weight: normal; + color: #000; + margin-left: 2px; +} + +.device-desktop .phui-workboard-view .phui-object-item-with-1-actions + .phui-object-item-content-box { + margin-right: 0; + overflow: hidden; +} + +.phui-workboard-view .phui-object-item-objname { + vertical-align: top; +} + +.phui-workpanel-view .phui-object-item-grippable .phui-object-item-frame { + padding-left: 0; +} + +.phui-workpanel-view .phui-object-item-grip { + display: none; +} + +.device-desktop .phui-workpanel-view .phui-list-item-icon { + display: none; +} + +.phui-workpanel-view .phui-object-item .phui-list-item-href { + height: 26px; +} + +.device-desktop .phui-workpanel-view .phui-object-item:hover + .phui-list-item-href { + background: #fff; + opacity: .7; +} + +.device-desktop .phui-workpanel-view .phui-object-item + .phui-list-item-href:hover { + background: {$sh-bluebackground}; + opacity: 1; +} + +.phui-workpanel-view .phui-object-item:hover .phui-list-item-icon { + display: block; +} + + + + +/* - Draggable Colors --------------------------------------------------------*/ + +.phui-workboard-view .phui-object-item.drag-dragging { + box-shadow: {$dropshadow}; + background-color: {$sh-greybackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-red { + background-color: {$sh-redbackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-orange { + background-color: {$sh-orangebackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-yellow { + background-color: {$sh-yellowbackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-green { + background-color: {$sh-greenbackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-blue { + background-color: {$sh-bluebackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-indigo { + background-color: {$sh-indigobackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-violet { + background-color: {$sh-violetbackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-pink { + background-color: {$sh-pinkbackground}; +} + +.phui-workboard-view .drag-dragging.phui-object-item-bar-color-sky { + background-color: {$sh-bluebackground}; +} diff --git a/webroot/rsrc/css/phui/phui-workpanel-view.css b/webroot/rsrc/css/phui/workboards/phui-workpanel.css similarity index 61% rename from webroot/rsrc/css/phui/phui-workpanel-view.css rename to webroot/rsrc/css/phui/workboards/phui-workpanel.css index 9b8943ceeb..978a3c4863 100644 --- a/webroot/rsrc/css/phui/phui-workpanel-view.css +++ b/webroot/rsrc/css/phui/workboards/phui-workpanel.css @@ -1,12 +1,11 @@ /** * @provides phui-workpanel-view-css + * @requires phui-workcard-view-css */ .phui-workpanel-view .phui-header-shell { - padding: 16px 0 8px; - border-color: {$lightgreyborder}; - width: 300px; - background-color: transparent; + padding: 8px; + width: 284px; } .phui-workpanel-view .phui-header-shell .phui-header-header { @@ -22,9 +21,8 @@ color: {$lightgreytext}; } -.device-phone .phui-workboard-view { +.device .phui-workpanel-view .phui-header-shell { width: auto; - margin: 0 8px; } .phui-workboard-view { @@ -36,25 +34,6 @@ user-select: none; } -.phui-workboard-view .phui-object-item .phui-object-item-objname { - -webkit-touch-callout: text; - -webkit-user-select: text; - -khtml-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; -} - -.phui-workboard-view .phui-object-item-link { - white-space: normal; - display: inline; - -webkit-font-smoothing: antialiased; -} - -.phui-workboard-view .phui-object-item-objname { - vertical-align: top; -} - .phui-workpanel-view .phui-workpanel-header-action { float: right; width: 24px; @@ -62,7 +41,11 @@ } .phui-workpanel-view .phui-workpanel-body { - padding-top: 8px; + padding: 8px 8px 4px 8px; +} + +.device-phone .phui-workpanel-view .phui-workpanel-body { + padding: 8px 0; } .phui-workpanel-view .phui-workpanel-footer-action a { @@ -75,18 +58,7 @@ border-radius: 3px; } -.phui-workpanel-view .phui-list-item-icon { - height: 14px; - width: 14px; - display: inline-block; -} - -.phui-workpanel-view .phui-list-item-name { - padding-left: 5px; - display: inline-block; -} - -.aphront-multi-column-fixed .phui-workpanel-view { +.device-desktop .aphront-multi-column-fixed .phui-workpanel-view { width: 300px; } @@ -130,21 +102,3 @@ .phui-workpanel-view.project-panel-over-limit .phui-header-shell { border-color: {$red}; } - -/* - Workpanel Cards ----------------------------------------------------------- - - Slight display changes for how cards work in tight spaces - -*/ - -.phui-workpanel-view .phui-object-item-grippable .phui-object-item-frame { - padding-left: 0; -} - -.phui-workpanel-view .phui-object-item-grip { - display: none; -} - -.phui-workpanel-view .phui-object-item-attribute a { - color: {$bluetext}; -} diff --git a/webroot/rsrc/externals/javelin/core/Event.js b/webroot/rsrc/externals/javelin/core/Event.js index 9ce02c5811..d4e04be7e2 100644 --- a/webroot/rsrc/externals/javelin/core/Event.js +++ b/webroot/rsrc/externals/javelin/core/Event.js @@ -326,7 +326,16 @@ JX.install('Event', { /** * @task info */ - nodeDistances : {} + nodeDistances : {}, + + /** + * True if this is a cursor event that was caused by a touch interaction + * rather than a mouse device interaction. + * + * @type bool + * @taks info + */ + isTouchEvent: false }, /** @@ -339,7 +348,13 @@ JX.install('Event', { if (__DEV__) { JX.Event.prototype.toString = function() { var path = '['+this.getPath().join(', ')+']'; - return 'Event<'+this.getType()+', '+path+', '+this.getTarget()+'>'; + + var type = this.getType(); + if (this.getIsTouchEvent()) { + type = type + '/touch'; + } + + return 'Event<'+type+', '+path+', '+this.getTarget()+'>'; }; } } diff --git a/webroot/rsrc/externals/javelin/core/Stratcom.js b/webroot/rsrc/externals/javelin/core/Stratcom.js index e7319843d1..4bfb11d4fd 100644 --- a/webroot/rsrc/externals/javelin/core/Stratcom.js +++ b/webroot/rsrc/externals/javelin/core/Stratcom.js @@ -41,6 +41,7 @@ JX.install('Stratcom', { _auto : '*', _data : {}, _execContext : [], + _touchState: null, /** * Node metadata is stored in a series of blocks to prevent collisions @@ -330,6 +331,45 @@ JX.install('Stratcom', { etype = 'blur'; } + // Map of touch events and whether they are unique per touch. + var touch_map = { + touchstart: true, + touchend: true, + mousedown: true, + mouseup: true, + click: true, + + // These can conceivably fire multiple times per touch, so if we see + // them more than once that doesn't tell us that we're handling a new + // event. + mouseover: false, + mouseout: false, + mousemove: false, + touchmove: false + }; + + // If this is a 'touchstart', we're handling touch events. + if (etype == 'touchstart') { + this._touchState = {}; + } + + // If this is a unique touch event that we haven't seen before, remember + // it as part of the current touch state. On the other hand, if we've + // already seen it, we can deduce that we must be handling a new cursor + // event that is unrelated to the last touch we saw, and conclude that + // we are no longer processing a touch event. + if (touch_map[etype] && this._touchState) { + if (!this._touchState[etype]) { + this._touchState[etype] = true; + } else { + this._touchState = null; + } + } + + // This event is a touch event if we're carrying some touch state. + var is_touch = (etype in touch_map) && + (this._touchState !== null); + var proxy = new JX.Event() .setRawEvent(event) .setData(event.customData) @@ -337,9 +377,11 @@ JX.install('Stratcom', { .setTarget(target) .setNodes(nodes) .setNodeDistances(distances) + .setIsTouchEvent(is_touch) .setPath(path.reverse()); - // Don't touch this for debugging purposes + // You can uncomment this to print out all events flowing through + // Stratcom, which tends to make debugging easier. //JX.log('~> '+proxy.toString()); return this._dispatchProxy(proxy); diff --git a/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js b/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js index aac66d66b7..032b8cec68 100644 --- a/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js +++ b/webroot/rsrc/js/application/differential/behavior-edit-inline-comments.js @@ -22,6 +22,26 @@ JX.behavior('differential-edit-inline-comments', function(config) { var editor = null; + function updateReticleForComment(e) { + root = e.getNode('differential-changeset'); + if (!root) { + return; + } + + var data = e.getNodeData('differential-inline-comment'); + var change = e.getNodeData('differential-changeset'); + + var id_part = data.on_right ? change.right : change.left; + var new_part = data.isNewFile ? 'N' : 'O'; + var prefix = 'C' + id_part + new_part + 'L'; + + origin = JX.$(prefix + data.number); + target = JX.$(prefix + (parseInt(data.number, 10) + + parseInt(data.length, 10))); + + updateReticle(); + } + function updateReticle() { JX.DOM.getContentFrame().appendChild(reticle); @@ -176,6 +196,10 @@ JX.behavior('differential-edit-inline-comments', function(config) { ['mouseover', 'mouseout'], ['differential-changeset', 'tag:th'], function(e) { + if (e.getIsTouchEvent()) { + return; + } + if (editor) { // Don't update the reticle if we're editing a comment, since this // would be distracting and we want to keep the lines corresponding @@ -274,24 +298,14 @@ JX.behavior('differential-edit-inline-comments', function(config) { ['mouseover', 'mouseout'], 'differential-inline-comment', function(e) { + if (e.getIsTouchEvent()) { + return; + } + if (e.getType() == 'mouseout') { hideReticle(); } else { - root = e.getNode('differential-changeset'); - if (root) { - var data = e.getNodeData('differential-inline-comment'); - var change = e.getNodeData('differential-changeset'); - - var id_part = data.on_right ? change.right : change.left; - var new_part = data.isNewFile ? 'N' : 'O'; - var prefix = 'C' + id_part + new_part + 'L'; - - origin = JX.$(prefix + data.number); - target = JX.$(prefix + (parseInt(data.number, 10) + - parseInt(data.length, 10))); - - updateReticle(); - } + updateReticleForComment(e); } }); @@ -303,6 +317,12 @@ JX.behavior('differential-edit-inline-comments', function(config) { } var node = e.getNode('differential-inline-comment'); + + // If we're on a touch device, we didn't highlight the affected lines + // earlier because we can't use hover events to mutate the document. + // Highlight them now. + updateReticleForComment(e); + handle_inline_action(node, op); }; diff --git a/webroot/rsrc/js/core/behavior-device.js b/webroot/rsrc/js/core/behavior-device.js index f0f00896dc..bc6d6732d2 100644 --- a/webroot/rsrc/js/core/behavior-device.js +++ b/webroot/rsrc/js/core/behavior-device.js @@ -26,6 +26,19 @@ JX.install('Device', { var v = JX.Vector.getViewport(); var self = JX.Device; + // Even when we emit a '' tag which tells + // devices to fit the conent to the screen width, we'll sometimes measure + // a viewport dimension which is larger than the available screen width, + // particularly if we check too early. + + // If the device provides a screen width and the screen width is smaller + // than the viewport width, use the screen width. + + var screen_width = (window.screen && window.screen.availWidth); + if (screen_width) { + v.x = Math.min(v.x, screen_width); + } + var device = 'desktop'; if (v.x <= self._tabletBreakpoint) { device = 'tablet'; @@ -49,6 +62,11 @@ JX.install('Device', { JX.Stratcom.invoke('phabricator-device-change', null, device); }, + isDesktop: function() { + var self = JX.Device; + return (self.getDevice() == 'desktop'); + }, + getDevice : function() { var self = JX.Device; if (self._device === null) { diff --git a/webroot/rsrc/js/phui/behavior-phui-profile-menu.js b/webroot/rsrc/js/phui/behavior-phui-profile-menu.js index 28d01ec122..f6bb9031f0 100644 --- a/webroot/rsrc/js/phui/behavior-phui-profile-menu.js +++ b/webroot/rsrc/js/phui/behavior-phui-profile-menu.js @@ -24,8 +24,22 @@ JX.behavior('phui-profile-menu', function(config) { JX.DOM.listen(collapse_node, 'click', null, function(e) { is_collapsed = !is_collapsed; - JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsed', is_collapsed); - JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanded', !is_collapsed); + + JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsing', is_collapsed); + JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanding', !is_collapsed); + + var duration = 0.2; + + setTimeout(function() { + JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsed', is_collapsed); + JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanded', !is_collapsed); + }, (duration / 2) * 1000); + + setTimeout(function() { + JX.DOM.alterClass(menu_node, 'phui-profile-menu-collapsing', false); + JX.DOM.alterClass(menu_node, 'phui-profile-menu-expanding', false); + }, duration * 1000); + if (config.settingsURI) { new JX.Request(config.settingsURI) diff --git a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js index 3bc5cf0166..801fa36ffb 100644 --- a/webroot/rsrc/js/phuix/PHUIXAutocomplete.js +++ b/webroot/rsrc/js/phuix/PHUIXAutocomplete.js @@ -333,7 +333,7 @@ JX.install('PHUIXAutocomplete', { _getCancelCharacters: function() { // The "." character does not cancel because of projects named // "node.js" or "blog.mycompany.com". - return ['#', '@', ',', '!', '?']; + return ['#', '@', ',', '!', '?', '{', '}']; }, _getTerminators: function() {