diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 869f20199f..53295dbae9 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => '6875302f', 'conpherence.pkg.js' => '6249a1cf', - 'core.pkg.css' => '52a77c4d', + 'core.pkg.css' => '35645dec', 'core.pkg.js' => '1fa7c0c5', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '90b30783', @@ -96,7 +96,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' => 'fbd45f96', - 'rsrc/css/application/project/project-card-view.css' => '77219296', + 'rsrc/css/application/project/project-card-view.css' => '1be8c87b', 'rsrc/css/application/project/project-view.css' => '792c9057', 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', @@ -108,7 +108,7 @@ return array( 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 'rsrc/css/application/uiexample/example.css' => '528b19de', 'rsrc/css/core/core.css' => '9f4cb463', - 'rsrc/css/core/remarkup.css' => '4a2de2bb', + 'rsrc/css/core/remarkup.css' => '2d793c5b', 'rsrc/css/core/syntax.css' => '769d3498', 'rsrc/css/core/z-index.css' => '5e72c4e0', 'rsrc/css/diviner/diviner-shared.css' => '896f1d43', @@ -128,26 +128,26 @@ return array( 'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6', 'rsrc/css/phui/object-item/phui-oi-list-view.css' => '5c383524', 'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea', - 'rsrc/css/phui/phui-action-list.css' => 'f980c059', + 'rsrc/css/phui/phui-action-list.css' => 'c01858f4', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-badge.css' => '22c0cf4f', 'rsrc/css/phui/phui-basic-nav-view.css' => 'a0705f53', 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 'rsrc/css/phui/phui-box.css' => '269cbc99', - 'rsrc/css/phui/phui-button.css' => '7eaff361', + 'rsrc/css/phui/phui-button.css' => '14bfba79', 'rsrc/css/phui/phui-chart.css' => '6bf6f78e', 'rsrc/css/phui/phui-cms.css' => '504b4b23', 'rsrc/css/phui/phui-comment-form.css' => '48fbd65d', 'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad', - 'rsrc/css/phui/phui-crumbs-view.css' => 'b743f73e', + 'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb', 'rsrc/css/phui/phui-curtain-view.css' => '947bf1a4', 'rsrc/css/phui/phui-document-pro.css' => 'f56738ed', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', 'rsrc/css/phui/phui-document.css' => 'c32e8dec', 'rsrc/css/phui/phui-feed-story.css' => '44a9c8e9', - 'rsrc/css/phui/phui-fontkit.css' => '0b2da2d5', + 'rsrc/css/phui/phui-fontkit.css' => 'b78a0059', 'rsrc/css/phui/phui-form-view.css' => 'adca31ce', - 'rsrc/css/phui/phui-form.css' => '5815af7b', + 'rsrc/css/phui/phui-form.css' => 'b62c01d8', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 'rsrc/css/phui/phui-header-view.css' => 'fef6a54e', 'rsrc/css/phui/phui-hovercard.css' => 'ae091fc5', @@ -780,7 +780,7 @@ return array( 'path-typeahead' => 'f7fc67ec', 'people-picture-menu-item-css' => 'a06f7f34', 'people-profile-css' => '4df76faf', - 'phabricator-action-list-view-css' => 'f980c059', + 'phabricator-action-list-view-css' => 'c01858f4', 'phabricator-busy' => '59a7976a', 'phabricator-chatlog-css' => 'd295b020', 'phabricator-content-source-view-css' => '4b8b05d4', @@ -805,7 +805,7 @@ return array( 'phabricator-object-selector-css' => '85ee8ce6', 'phabricator-phtize' => 'd254d646', 'phabricator-prefab' => '8d40ae75', - 'phabricator-remarkup-css' => '4a2de2bb', + 'phabricator-remarkup-css' => '2d793c5b', 'phabricator-search-results-css' => '64ad079a', 'phabricator-shaped-request' => '7cbe244b', 'phabricator-slowvote-css' => 'a94b7230', @@ -841,7 +841,7 @@ return array( 'phui-basic-nav-view-css' => 'a0705f53', 'phui-big-info-view-css' => 'bd903741', 'phui-box-css' => '269cbc99', - 'phui-button-css' => '7eaff361', + 'phui-button-css' => '14bfba79', 'phui-calendar-css' => '477acfaa', 'phui-calendar-day-css' => '572b1893', 'phui-calendar-list-css' => '576be600', @@ -850,15 +850,15 @@ return array( 'phui-cms-css' => '504b4b23', 'phui-comment-form-css' => '48fbd65d', 'phui-comment-panel-css' => 'f50152ad', - 'phui-crumbs-view-css' => 'b743f73e', + 'phui-crumbs-view-css' => '6ece3bbb', 'phui-curtain-view-css' => '947bf1a4', 'phui-document-summary-view-css' => '9ca48bdf', 'phui-document-view-css' => 'c32e8dec', 'phui-document-view-pro-css' => 'f56738ed', 'phui-feed-story-css' => '44a9c8e9', 'phui-font-icon-base-css' => '870a7360', - 'phui-fontkit-css' => '0b2da2d5', - 'phui-form-css' => '5815af7b', + 'phui-fontkit-css' => 'b78a0059', + 'phui-form-css' => 'b62c01d8', 'phui-form-view-css' => 'adca31ce', 'phui-head-thing-view-css' => 'fd311e5f', 'phui-header-view-css' => 'fef6a54e', @@ -905,7 +905,7 @@ return array( 'policy-edit-css' => '815c66f7', 'policy-transaction-detail-css' => '82100a43', 'ponder-view-css' => 'fbd45f96', - 'project-card-view-css' => '77219296', + 'project-card-view-css' => '1be8c87b', 'project-view-css' => '792c9057', 'releeph-core' => '9b3c5733', 'releeph-preview-branch' => 'b7a6f4a5', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 600f30601c..544b4f2b39 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2018,6 +2018,7 @@ phutil_register_library_map(array( 'PhabricatorBadgesAward' => 'applications/badges/storage/PhabricatorBadgesAward.php', 'PhabricatorBadgesAwardController' => 'applications/badges/controller/PhabricatorBadgesAwardController.php', 'PhabricatorBadgesAwardQuery' => 'applications/badges/query/PhabricatorBadgesAwardQuery.php', + 'PhabricatorBadgesAwardTestDataGenerator' => 'applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php', 'PhabricatorBadgesBadge' => 'applications/badges/storage/PhabricatorBadgesBadge.php', 'PhabricatorBadgesBadgeAwardTransaction' => 'applications/badges/xaction/PhabricatorBadgesBadgeAwardTransaction.php', 'PhabricatorBadgesBadgeDescriptionTransaction' => 'applications/badges/xaction/PhabricatorBadgesBadgeDescriptionTransaction.php', @@ -3340,6 +3341,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleApplication' => 'applications/people/application/PhabricatorPeopleApplication.php', 'PhabricatorPeopleApproveController' => 'applications/people/controller/PhabricatorPeopleApproveController.php', 'PhabricatorPeopleBadgesProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php', + 'PhabricatorPeopleCommitsProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php', 'PhabricatorPeopleController' => 'applications/people/controller/PhabricatorPeopleController.php', 'PhabricatorPeopleCreateController' => 'applications/people/controller/PhabricatorPeopleCreateController.php', 'PhabricatorPeopleCreateGuidanceContext' => 'applications/people/guidance/PhabricatorPeopleCreateGuidanceContext.php', @@ -3365,16 +3367,19 @@ phutil_register_library_map(array( 'PhabricatorPeopleOwnerDatasource' => 'applications/people/typeahead/PhabricatorPeopleOwnerDatasource.php', 'PhabricatorPeoplePictureProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeoplePictureProfileMenuItem.php', 'PhabricatorPeopleProfileBadgesController' => 'applications/people/controller/PhabricatorPeopleProfileBadgesController.php', + 'PhabricatorPeopleProfileCommitsController' => 'applications/people/controller/PhabricatorPeopleProfileCommitsController.php', 'PhabricatorPeopleProfileController' => 'applications/people/controller/PhabricatorPeopleProfileController.php', 'PhabricatorPeopleProfileEditController' => 'applications/people/controller/PhabricatorPeopleProfileEditController.php', 'PhabricatorPeopleProfileImageWorkflow' => 'applications/people/management/PhabricatorPeopleProfileImageWorkflow.php', 'PhabricatorPeopleProfileManageController' => 'applications/people/controller/PhabricatorPeopleProfileManageController.php', 'PhabricatorPeopleProfileMenuEngine' => 'applications/people/engine/PhabricatorPeopleProfileMenuEngine.php', 'PhabricatorPeopleProfilePictureController' => 'applications/people/controller/PhabricatorPeopleProfilePictureController.php', + 'PhabricatorPeopleProfileTasksController' => 'applications/people/controller/PhabricatorPeopleProfileTasksController.php', 'PhabricatorPeopleProfileViewController' => 'applications/people/controller/PhabricatorPeopleProfileViewController.php', 'PhabricatorPeopleQuery' => 'applications/people/query/PhabricatorPeopleQuery.php', 'PhabricatorPeopleRenameController' => 'applications/people/controller/PhabricatorPeopleRenameController.php', 'PhabricatorPeopleSearchEngine' => 'applications/people/query/PhabricatorPeopleSearchEngine.php', + 'PhabricatorPeopleTasksProfileMenuItem' => 'applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php', 'PhabricatorPeopleTestDataGenerator' => 'applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php', 'PhabricatorPeopleTransactionQuery' => 'applications/people/query/PhabricatorPeopleTransactionQuery.php', 'PhabricatorPeopleUserFunctionDatasource' => 'applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php', @@ -3441,6 +3446,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyAwareQuery' => 'infrastructure/query/policy/PhabricatorPolicyAwareQuery.php', 'PhabricatorPolicyAwareTestQuery' => 'applications/policy/__tests__/PhabricatorPolicyAwareTestQuery.php', 'PhabricatorPolicyCanEditCapability' => 'applications/policy/capability/PhabricatorPolicyCanEditCapability.php', + 'PhabricatorPolicyCanInteractCapability' => 'applications/policy/capability/PhabricatorPolicyCanInteractCapability.php', 'PhabricatorPolicyCanJoinCapability' => 'applications/policy/capability/PhabricatorPolicyCanJoinCapability.php', 'PhabricatorPolicyCanViewCapability' => 'applications/policy/capability/PhabricatorPolicyCanViewCapability.php', 'PhabricatorPolicyCapability' => 'applications/policy/capability/PhabricatorPolicyCapability.php', @@ -6995,6 +7001,7 @@ phutil_register_library_map(array( ), 'PhabricatorBadgesAwardController' => 'PhabricatorBadgesController', 'PhabricatorBadgesAwardQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', + 'PhabricatorBadgesAwardTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorBadgesBadge' => array( 'PhabricatorBadgesDAO', 'PhabricatorPolicyInterface', @@ -8528,6 +8535,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleApplication' => 'PhabricatorApplication', 'PhabricatorPeopleApproveController' => 'PhabricatorPeopleController', 'PhabricatorPeopleBadgesProfileMenuItem' => 'PhabricatorProfileMenuItem', + 'PhabricatorPeopleCommitsProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorPeopleController' => 'PhabricatorController', 'PhabricatorPeopleCreateController' => 'PhabricatorPeopleController', 'PhabricatorPeopleCreateGuidanceContext' => 'PhabricatorGuidanceContext', @@ -8553,16 +8561,19 @@ phutil_register_library_map(array( 'PhabricatorPeopleOwnerDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorPeoplePictureProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorPeopleProfileBadgesController' => 'PhabricatorPeopleProfileController', + 'PhabricatorPeopleProfileCommitsController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileController' => 'PhabricatorPeopleController', 'PhabricatorPeopleProfileEditController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileImageWorkflow' => 'PhabricatorPeopleManagementWorkflow', 'PhabricatorPeopleProfileManageController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileMenuEngine' => 'PhabricatorProfileMenuEngine', 'PhabricatorPeopleProfilePictureController' => 'PhabricatorPeopleProfileController', + 'PhabricatorPeopleProfileTasksController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleProfileViewController' => 'PhabricatorPeopleProfileController', 'PhabricatorPeopleQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorPeopleRenameController' => 'PhabricatorPeopleController', 'PhabricatorPeopleSearchEngine' => 'PhabricatorApplicationSearchEngine', + 'PhabricatorPeopleTasksProfileMenuItem' => 'PhabricatorProfileMenuItem', 'PhabricatorPeopleTestDataGenerator' => 'PhabricatorTestDataGenerator', 'PhabricatorPeopleTransactionQuery' => 'PhabricatorApplicationTransactionQuery', 'PhabricatorPeopleUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource', @@ -8646,6 +8657,7 @@ phutil_register_library_map(array( 'PhabricatorPolicyAwareQuery' => 'PhabricatorOffsetPagedQuery', 'PhabricatorPolicyAwareTestQuery' => 'PhabricatorPolicyAwareQuery', 'PhabricatorPolicyCanEditCapability' => 'PhabricatorPolicyCapability', + 'PhabricatorPolicyCanInteractCapability' => 'PhabricatorPolicyCapability', 'PhabricatorPolicyCanJoinCapability' => 'PhabricatorPolicyCapability', 'PhabricatorPolicyCanViewCapability' => 'PhabricatorPolicyCapability', 'PhabricatorPolicyCapability' => 'Phobject', diff --git a/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php b/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php index 42be0c2ba3..2ad0c92d32 100644 --- a/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php +++ b/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php @@ -4,7 +4,7 @@ final class PhabricatorBadgesEditConduitAPIMethod extends PhabricatorEditEngineAPIMethod { public function getAPIMethodName() { - return 'badges.edit'; + return 'badge.edit'; } public function newEditEngine() { diff --git a/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php b/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php index 5d9fc9c5aa..e71ee9aa71 100644 --- a/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php +++ b/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php @@ -4,7 +4,7 @@ final class PhabricatorBadgesSearchConduitAPIMethod extends PhabricatorSearchEngineAPIMethod { public function getAPIMethodName() { - return 'badges.search'; + return 'badge.search'; } public function newSearchEngine() { diff --git a/src/applications/badges/editor/PhabricatorBadgesEditEngine.php b/src/applications/badges/editor/PhabricatorBadgesEditEngine.php index 596e70cd13..e7a441343c 100644 --- a/src/applications/badges/editor/PhabricatorBadgesEditEngine.php +++ b/src/applications/badges/editor/PhabricatorBadgesEditEngine.php @@ -124,6 +124,23 @@ final class PhabricatorBadgesEditEngine ->setTransactionType( PhabricatorBadgesBadgeDescriptionTransaction::TRANSACTIONTYPE) ->setValue($object->getDescription()), + id(new PhabricatorUsersEditField()) + ->setKey('award') + ->setIsConduitOnly(true) + ->setDescription(pht('New badge award recipients.')) + ->setConduitTypeDescription(pht('New badge award recipients.')) + ->setTransactionType( + PhabricatorBadgesBadgeAwardTransaction::TRANSACTIONTYPE) + ->setLabel(pht('Award Recipients')), + id(new PhabricatorUsersEditField()) + ->setKey('revoke') + ->setIsConduitOnly(true) + ->setDescription(pht('Revoke badge award recipients.')) + ->setConduitTypeDescription(pht('Revoke badge award recipients.')) + ->setTransactionType( + PhabricatorBadgesBadgeRevokeTransaction::TRANSACTIONTYPE) + ->setLabel(pht('Revoke Recipients')), + ); } diff --git a/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php b/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php new file mode 100644 index 0000000000..f64a42db83 --- /dev/null +++ b/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php @@ -0,0 +1,36 @@ +loadRandomUser(); + $recipient = $this->loadRandomUser(); + $badge_phid = $this->loadRandomPHID(new PhabricatorBadgesBadge()); + + $xactions = array(); + + $xactions[] = array( + 'type' => 'award', + 'value' => array($recipient->getPHID()), + ); + + $params = array( + 'transactions' => $xactions, + 'objectIdentifier' => $badge_phid, + ); + + $result = id(new ConduitCall('badge.edit', $params)) + ->setUser($author) + ->execute(); + + return $result['object']['phid']; + } + +} diff --git a/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php b/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php index 9b29ecb4f8..8d496c18a1 100644 --- a/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php +++ b/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php @@ -12,7 +12,7 @@ final class PhabricatorBadgesBadgeTestDataGenerator public function generateObject() { $author = $this->loadRandomUser(); - list($name, $description) = $this->newLoot(); + list($name, $description, $quality, $icon) = $this->newLoot(); $xactions = array(); @@ -26,11 +26,21 @@ final class PhabricatorBadgesBadgeTestDataGenerator 'value' => $description, ); + $xactions[] = array( + 'type' => 'quality', + 'value' => (string)$quality, + ); + + $xactions[] = array( + 'type' => 'icon', + 'value' => $icon, + ); + $params = array( 'transactions' => $xactions, ); - $result = id(new ConduitCall('badges.edit', $params)) + $result = id(new ConduitCall('badge.edit', $params)) ->setUser($author) ->execute(); @@ -58,7 +68,17 @@ final class PhabricatorBadgesBadgeTestDataGenerator $drop = preg_replace($effect_pattern, '', $drop); - return array($drop, $description); + $quality_map = PhabricatorBadgesQuality::getQualityMap(); + shuffle($quality_map); + $quality = head($quality_map); + $rarity = $quality['rarity']; + + $icon_map = id(new PhabricatorBadgesIconSet())->getIcons(); + shuffle($icon_map); + $icon_map = head($icon_map); + $icon = $icon_map->getKey(); + + return array($drop, $description, $rarity, $icon); } public function rollDropValue($matches) { diff --git a/src/applications/badges/query/PhabricatorBadgesSearchEngine.php b/src/applications/badges/query/PhabricatorBadgesSearchEngine.php index 4db0cdd979..6e84c30bc9 100644 --- a/src/applications/badges/query/PhabricatorBadgesSearchEngine.php +++ b/src/applications/badges/query/PhabricatorBadgesSearchEngine.php @@ -24,6 +24,7 @@ final class PhabricatorBadgesSearchEngine id(new PhabricatorSearchCheckboxesField()) ->setKey('qualities') ->setLabel(pht('Quality')) + ->setEnableForConduit(false) ->setOptions(PhabricatorBadgesQuality::getDropdownQualityMap()), id(new PhabricatorSearchCheckboxesField()) ->setKey('statuses') diff --git a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php index 4f45357956..2459c8c559 100644 --- a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php +++ b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php @@ -24,6 +24,10 @@ final class DiffusionRepositoryEditEngine return true; } + public function getQuickCreateOrderVector() { + return id(new PhutilSortVector())->addInt(300); + } + public function getEngineName() { return pht('Repositories'); } diff --git a/src/applications/maniphest/editor/ManiphestEditEngine.php b/src/applications/maniphest/editor/ManiphestEditEngine.php index 0433e8200a..ad0171592c 100644 --- a/src/applications/maniphest/editor/ManiphestEditEngine.php +++ b/src/applications/maniphest/editor/ManiphestEditEngine.php @@ -25,6 +25,10 @@ final class ManiphestEditEngine return true; } + public function getQuickCreateOrderVector() { + return id(new PhutilSortVector())->addInt(100); + } + protected function newEditableObject() { return ManiphestTask::initializeNewTask($this->getViewer()); } diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php index 36d0a21b07..f03bc277ac 100644 --- a/src/applications/maniphest/storage/ManiphestTask.php +++ b/src/applications/maniphest/storage/ManiphestTask.php @@ -361,7 +361,7 @@ final class ManiphestTask extends ManiphestDAO if ($this->isLocked()) { return PhabricatorPolicies::POLICY_NOONE; } else { - return PhabricatorPolicies::POLICY_USER; + return $this->getViewPolicy(); } case PhabricatorPolicyCapability::CAN_EDIT: return $this->getEditPolicy(); diff --git a/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php b/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php index ca1af3a18b..9f4e91ca22 100644 --- a/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php +++ b/src/applications/metamta/management/PhabricatorMailManagementSendTestWorkflow.php @@ -93,7 +93,16 @@ final class PhabricatorMailManagementSendTestWorkflow ->execute(); $users = mpull($users, null, 'getUsername'); + $raw_tos = array(); foreach ($tos as $key => $username) { + // If the recipient has an "@" in any noninitial position, treat this as + // a raw email address. + if (preg_match('/.@/', $username)) { + $raw_tos[] = $username; + unset($tos[$key]); + continue; + } + if (empty($users[$username])) { throw new PhutilArgumentUsageException( pht("No such user '%s' exists.", $username)); @@ -122,13 +131,20 @@ final class PhabricatorMailManagementSendTestWorkflow $body = file_get_contents('php://stdin'); $mail = id(new PhabricatorMetaMTAMail()) - ->addTos($tos) ->addCCs($ccs) ->setSubject($subject) ->setBody($body) ->setIsBulk($is_bulk) ->setMailTags($tags); + if ($tos) { + $mail->addTos($tos); + } + + if ($raw_tos) { + $mail->addRawTos($raw_tos); + } + if ($args->getArg('html')) { $mail->setBody( pht( diff --git a/src/applications/people/application/PhabricatorPeopleApplication.php b/src/applications/people/application/PhabricatorPeopleApplication.php index d295319b71..f2bb70e423 100644 --- a/src/applications/people/application/PhabricatorPeopleApplication.php +++ b/src/applications/people/application/PhabricatorPeopleApplication.php @@ -66,6 +66,10 @@ final class PhabricatorPeopleApplication extends PhabricatorApplication { 'PhabricatorPeopleProfileEditController', 'badges/(?P[1-9]\d*)/' => 'PhabricatorPeopleProfileBadgesController', + 'tasks/(?P[1-9]\d*)/' => + 'PhabricatorPeopleProfileTasksController', + 'commits/(?P[1-9]\d*)/' => + 'PhabricatorPeopleProfileCommitsController', 'picture/(?P[1-9]\d*)/' => 'PhabricatorPeopleProfilePictureController', 'manage/(?P[1-9]\d*)/' => diff --git a/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php b/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php index b3f944a3ed..e2a535cdd4 100644 --- a/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php +++ b/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php @@ -24,8 +24,43 @@ final class PhabricatorUserProfileImageCacheType public function newValueForUsers($key, array $users) { $viewer = $this->getViewer(); - $file_phids = mpull($users, 'getProfileImagePHID'); - $file_phids = array_filter($file_phids); + $file_phids = array(); + $generate_users = array(); + foreach ($users as $user) { + $user_phid = $user->getPHID(); + $custom_phid = $user->getProfileImagePHID(); + $default_phid = $user->getDefaultProfileImagePHID(); + $version = $user->getDefaultProfileImageVersion(); + + if ($custom_phid) { + $file_phids[$user_phid] = $custom_phid; + continue; + } + if ($default_phid) { + if ($version == PhabricatorFilesComposeAvatarBuiltinFile::VERSION) { + $file_phids[$user_phid] = $default_phid; + continue; + } + } + $generate_users[] = $user; + } + + // Generate Files for anyone without a default + foreach ($generate_users as $generate_user) { + $generate_user_phid = $generate_user->getPHID(); + $generate_username = $generate_user->getUsername(); + $generate_version = PhabricatorFilesComposeAvatarBuiltinFile::VERSION; + $generate_file = id(new PhabricatorFilesComposeAvatarBuiltinFile()) + ->getUserProfileImageFile($generate_username); + + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); + $generate_user->setDefaultProfileImagePHID($generate_file->getPHID()); + $generate_user->setDefaultProfileImageVersion($generate_version); + $generate_user->save(); + unset($unguarded); + + $file_phids[$generate_user_phid] = $generate_file->getPHID(); + } if ($file_phids) { $files = id(new PhabricatorFileQuery()) @@ -40,8 +75,11 @@ final class PhabricatorUserProfileImageCacheType $results = array(); foreach ($users as $user) { $image_phid = $user->getProfileImagePHID(); + $default_phid = $user->getDefaultProfileImagePHID(); if (isset($files[$image_phid])) { $image_uri = $files[$image_phid]->getBestURI(); + } else if (isset($files[$default_phid])) { + $image_uri = $files[$default_phid]->getBestURI(); } else { $image_uri = PhabricatorUser::getDefaultProfileImageURI(); } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileBadgesController.php b/src/applications/people/controller/PhabricatorPeopleProfileBadgesController.php index 73e5459cda..93b1f91ea8 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileBadgesController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileBadgesController.php @@ -105,6 +105,7 @@ final class PhabricatorPeopleProfileBadgesController $award = idx($awards, $badge->getPHID(), null); $awarder_phid = $award->getAwarderPHID(); $awarder_handle = $viewer->renderHandle($awarder_phid); + $awarded_date = phabricator_date($award->getDateCreated(), $viewer); $awarder_info = pht( 'Awarded by %s', @@ -116,7 +117,8 @@ final class PhabricatorPeopleProfileBadgesController ->setSubhead($badge->getFlavor()) ->setQuality($badge->getQuality()) ->setHref($badge->getViewURI()) - ->addByLine($awarder_info); + ->addByLine($awarder_info) + ->addByLine($awarded_date); $flex->addItem($item); } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileCommitsController.php b/src/applications/people/controller/PhabricatorPeopleProfileCommitsController.php new file mode 100644 index 0000000000..f2adf4b23d --- /dev/null +++ b/src/applications/people/controller/PhabricatorPeopleProfileCommitsController.php @@ -0,0 +1,85 @@ +getViewer(); + $id = $request->getURIData('id'); + + $user = id(new PhabricatorPeopleQuery()) + ->setViewer($viewer) + ->withIDs(array($id)) + ->needProfile(true) + ->needProfileImage(true) + ->needAvailability(true) + ->requireCapabilities( + array( + PhabricatorPolicyCapability::CAN_VIEW, + )) + ->executeOne(); + if (!$user) { + return new Aphront404Response(); + } + + $class = 'PhabricatorDiffusionApplication'; + if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { + return new Aphront404Response(); + } + + $this->setUser($user); + $title = array(pht('Recent Commits'), $user->getUsername()); + $header = $this->buildProfileHeader(); + $commits = $this->buildCommitsView($user); + + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb(pht('Recent Commits')); + $crumbs->setBorder(true); + + $nav = $this->getProfileMenu(); + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_COMMITS); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->addClass('project-view-home') + ->addClass('project-view-people-home') + ->setFooter(array( + $commits, + )); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->setNavigation($nav) + ->appendChild($view); + } + + private function buildCommitsView(PhabricatorUser $user) { + $viewer = $this->getViewer(); + + $commits = id(new DiffusionCommitQuery()) + ->setViewer($viewer) + ->withAuthorPHIDs(array($user->getPHID())) + ->needAuditRequests(true) + ->needCommitData(true) + ->needDrafts(true) + ->requireCapabilities( + array( + PhabricatorPolicyCapability::CAN_VIEW, + )) + ->setLimit(100) + ->execute(); + + $list = id(new PhabricatorAuditListView()) + ->setViewer($viewer) + ->setCommits($commits) + ->setNoDataString(pht('No recent commits.')); + + $view = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Recent Commits')) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) + ->appendChild($list); + + return $view; + } +} diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php index 1532003122..cff833aa51 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php @@ -30,22 +30,12 @@ final class PhabricatorPeopleProfilePictureController $e_file = true; $errors = array(); - // Verify install has GD extension, otherwise default to avatar.png - $gd = function_exists('imagecreatefromstring'); - if ($request->isFormPost()) { $phid = $request->getStr('phid'); $is_default = false; if ($phid == PhabricatorPHIDConstants::PHID_VOID) { - // Compose the builtin unique image - if ($gd) { - $file = id(new PhabricatorFilesComposeAvatarBuiltinFile()) - ->getUserProfileImageFile($name); - } else { - $phid = null; - $is_default = true; - } - + $phid = null; + $is_default = true; } else if ($phid) { $file = id(new PhabricatorFileQuery()) ->setViewer($viewer) @@ -96,13 +86,15 @@ final class PhabricatorPeopleProfilePictureController $form = id(new PHUIFormLayoutView()) ->setUser($viewer); - if ($gd) { - $unique_default = id(new PhabricatorFilesComposeAvatarBuiltinFile()) - ->getUniqueProfileImage($name); - $default_image = PhabricatorFile::loadBuiltin( - $viewer, $unique_default['icon']); - } else { - $unique_default = null; + $default_image = $user->getDefaultProfileImagePHID(); + if ($default_image) { + $default_image = id(new PhabricatorFileQuery()) + ->setViewer($viewer) + ->withPHIDs(array($default_image)) + ->executeOne(); + } + + if (!$default_image) { $default_image = PhabricatorFile::loadBuiltin($viewer, 'profile.png'); } @@ -181,21 +173,9 @@ final class PhabricatorPeopleProfilePictureController } } - $default_style = array(); - if ($unique_default) { - $border_color = implode(', ', $unique_default['border']); - $default_style = array( - 'background-color: '.$unique_default['color'].';', - 'border: 4px solid rgba('.$border_color.');', - 'height: 42px;', - 'width: 42px', - ); - } - $images[PhabricatorPHIDConstants::PHID_VOID] = array( 'uri' => $default_image->getBestURI(), 'tip' => pht('Default Picture'), - 'style' => implode(' ', $default_style), ); require_celerity_resource('people-profile-css'); @@ -223,7 +203,6 @@ final class PhabricatorPeopleProfilePictureController 'height' => 50, 'width' => 50, 'src' => $spec['uri'], - 'style' => $style, ))); $button = array( diff --git a/src/applications/people/controller/PhabricatorPeopleProfileTasksController.php b/src/applications/people/controller/PhabricatorPeopleProfileTasksController.php new file mode 100644 index 0000000000..52c88d89fa --- /dev/null +++ b/src/applications/people/controller/PhabricatorPeopleProfileTasksController.php @@ -0,0 +1,85 @@ +getViewer(); + $id = $request->getURIData('id'); + + $user = id(new PhabricatorPeopleQuery()) + ->setViewer($viewer) + ->withIDs(array($id)) + ->needProfile(true) + ->needProfileImage(true) + ->needAvailability(true) + ->requireCapabilities( + array( + PhabricatorPolicyCapability::CAN_VIEW, + )) + ->executeOne(); + if (!$user) { + return new Aphront404Response(); + } + + $class = 'PhabricatorManiphestApplication'; + if (!PhabricatorApplication::isClassInstalledForViewer($class, $viewer)) { + return new Aphront404Response(); + } + + $this->setUser($user); + $title = array(pht('Assigned Tasks'), $user->getUsername()); + $header = $this->buildProfileHeader(); + $tasks = $this->buildTasksView($user); + + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb(pht('Assigned Tasks')); + $crumbs->setBorder(true); + + $nav = $this->getProfileMenu(); + $nav->selectFilter(PhabricatorPeopleProfileMenuEngine::ITEM_TASKS); + + $view = id(new PHUITwoColumnView()) + ->setHeader($header) + ->addClass('project-view-home') + ->addClass('project-view-people-home') + ->setFooter(array( + $tasks, + )); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->setNavigation($nav) + ->appendChild($view); + } + + private function buildTasksView(PhabricatorUser $user) { + $viewer = $this->getViewer(); + + $open = ManiphestTaskStatus::getOpenStatusConstants(); + + $tasks = id(new ManiphestTaskQuery()) + ->setViewer($viewer) + ->withOwners(array($user->getPHID())) + ->withStatuses($open) + ->needProjectPHIDs(true) + ->setLimit(100) + ->execute(); + + $handles = ManiphestTaskListView::loadTaskHandles($viewer, $tasks); + + $list = id(new ManiphestTaskListView()) + ->setUser($viewer) + ->setHandles($handles) + ->setTasks($tasks) + ->setNoDataString(pht('No open, assigned tasks.')); + + $view = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Assigned Tasks')) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) + ->appendChild($list); + + return $view; + } +} diff --git a/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php b/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php index 9e4bbba874..e5f25eb4a0 100644 --- a/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php +++ b/src/applications/people/engine/PhabricatorPeopleProfileMenuEngine.php @@ -7,6 +7,8 @@ final class PhabricatorPeopleProfileMenuEngine const ITEM_MANAGE = 'people.manage'; const ITEM_PICTURE = 'people.picture'; const ITEM_BADGES = 'people.badges'; + const ITEM_TASKS = 'people.tasks'; + const ITEM_COMMITS = 'people.commits'; protected function isMenuEngineConfigurable() { return false; @@ -45,48 +47,18 @@ final class PhabricatorPeopleProfileMenuEngine 'PhabricatorManiphestApplication', $viewer); if ($have_maniphest) { - $uri = urisprintf( - '/maniphest/?statuses=open()&assigned=%s#R', - $object->getPHID()); - $items[] = $this->newItem() - ->setBuiltinKey('tasks') - ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY) - ->setMenuItemProperty('icon', 'maniphest') - ->setMenuItemProperty('name', pht('Open Tasks')) - ->setMenuItemProperty('uri', $uri); - } - - $have_differential = PhabricatorApplication::isClassInstalledForViewer( - 'PhabricatorDifferentialApplication', - $viewer); - if ($have_differential) { - $uri = urisprintf( - '/differential/?authors=%s#R', - $object->getPHID()); - - $items[] = $this->newItem() - ->setBuiltinKey('revisions') - ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY) - ->setMenuItemProperty('icon', 'differential') - ->setMenuItemProperty('name', pht('Revisions')) - ->setMenuItemProperty('uri', $uri); + ->setBuiltinKey(self::ITEM_TASKS) + ->setMenuItemKey(PhabricatorPeopleTasksProfileMenuItem::MENUITEMKEY); } $have_diffusion = PhabricatorApplication::isClassInstalledForViewer( 'PhabricatorDiffusionApplication', $viewer); if ($have_diffusion) { - $uri = urisprintf( - '/diffusion/commit/?authors=%s#R', - $object->getPHID()); - $items[] = $this->newItem() - ->setBuiltinKey('commits') - ->setMenuItemKey(PhabricatorLinkProfileMenuItem::MENUITEMKEY) - ->setMenuItemProperty('icon', 'diffusion') - ->setMenuItemProperty('name', pht('Commits')) - ->setMenuItemProperty('uri', $uri); + ->setBuiltinKey(self::ITEM_COMMITS) + ->setMenuItemKey(PhabricatorPeopleCommitsProfileMenuItem::MENUITEMKEY); } $items[] = $this->newItem() diff --git a/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php b/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php index 1e594017ff..358756cecd 100644 --- a/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php +++ b/src/applications/people/management/PhabricatorPeopleProfileImageWorkflow.php @@ -55,8 +55,14 @@ final class PhabricatorPeopleProfileImageWorkflow foreach ($iterator as $user) { $username = $user->getUsername(); $default_phid = $user->getDefaultProfileImagePHID(); + $gen_version = $user->getDefaultProfileImageVersion(); - if ($default_phid == null || $is_force) { + $generate = false; + if ($gen_version != $version) { + $generate = true; + } + + if ($default_phid == null || $is_force || $generate) { $file = id(new PhabricatorFilesComposeAvatarBuiltinFile()) ->getUserProfileImageFile($username); $user->setDefaultProfileImagePHID($file->getPHID()); diff --git a/src/applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php b/src/applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php new file mode 100644 index 0000000000..f1d8be1828 --- /dev/null +++ b/src/applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php @@ -0,0 +1,59 @@ +getMenuItemProperty('name'); + + if (strlen($name)) { + return $name; + } + + return $this->getDefaultName(); + } + + public function buildEditEngineFields( + PhabricatorProfileMenuItemConfiguration $config) { + return array( + id(new PhabricatorTextEditField()) + ->setKey('name') + ->setLabel(pht('Name')) + ->setPlaceholder($this->getDefaultName()) + ->setValue($config->getMenuItemProperty('name')), + ); + } + + protected function newNavigationMenuItems( + PhabricatorProfileMenuItemConfiguration $config) { + + $user = $config->getProfileObject(); + $id = $user->getID(); + + $item = $this->newItem() + ->setHref("/people/commits/{$id}/") + ->setName($this->getDisplayName($config)) + ->setIcon('fa-code'); + + return array( + $item, + ); + } + +} diff --git a/src/applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php b/src/applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php new file mode 100644 index 0000000000..c2a5036521 --- /dev/null +++ b/src/applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php @@ -0,0 +1,59 @@ +getMenuItemProperty('name'); + + if (strlen($name)) { + return $name; + } + + return $this->getDefaultName(); + } + + public function buildEditEngineFields( + PhabricatorProfileMenuItemConfiguration $config) { + return array( + id(new PhabricatorTextEditField()) + ->setKey('name') + ->setLabel(pht('Name')) + ->setPlaceholder($this->getDefaultName()) + ->setValue($config->getMenuItemProperty('name')), + ); + } + + protected function newNavigationMenuItems( + PhabricatorProfileMenuItemConfiguration $config) { + + $user = $config->getProfileObject(); + $id = $user->getID(); + + $item = $this->newItem() + ->setHref("/people/tasks/{$id}/") + ->setName($this->getDisplayName($config)) + ->setIcon('fa-anchor'); + + return array( + $item, + ); + } + +} diff --git a/src/applications/people/storage/PhabricatorUserProfile.php b/src/applications/people/storage/PhabricatorUserProfile.php index edfa24d78e..da447410f5 100644 --- a/src/applications/people/storage/PhabricatorUserProfile.php +++ b/src/applications/people/storage/PhabricatorUserProfile.php @@ -13,7 +13,9 @@ final class PhabricatorUserProfile extends PhabricatorUserDAO { return id(new self()) ->setUserPHID($user->getPHID()) - ->setIcon($default_icon); + ->setIcon($default_icon) + ->setTitle('') + ->setBlurb(''); } protected function getConfiguration() { diff --git a/src/applications/people/view/PhabricatorUserCardView.php b/src/applications/people/view/PhabricatorUserCardView.php index 4c45549b77..5b6d34b90c 100644 --- a/src/applications/people/view/PhabricatorUserCardView.php +++ b/src/applications/people/view/PhabricatorUserCardView.php @@ -31,6 +31,7 @@ final class PhabricatorUserCardView extends AphrontTagView { protected function getTagAttributes() { $classes = array(); $classes[] = 'project-card-view'; + $classes[] = 'people-card-view'; if ($this->profile->getIsDisabled()) { $classes[] = 'project-card-disabled'; @@ -120,6 +121,7 @@ final class PhabricatorUserCardView extends AphrontTagView { 'a', array( 'href' => $href, + 'class' => 'project-card-image-href', ), $image); diff --git a/src/applications/phrequent/query/PhrequentSearchEngine.php b/src/applications/phrequent/query/PhrequentSearchEngine.php index 46f7ae769c..d137c40b64 100644 --- a/src/applications/phrequent/query/PhrequentSearchEngine.php +++ b/src/applications/phrequent/query/PhrequentSearchEngine.php @@ -10,11 +10,6 @@ final class PhrequentSearchEngine extends PhabricatorApplicationSearchEngine { return 'PhabricatorPhrequentApplication'; } - public function canUseInPanelContext() { - return false; - } - - public function getPageSize(PhabricatorSavedQuery $saved) { return $saved->getParameter('limit', 1000); } diff --git a/src/applications/policy/capability/PhabricatorPolicyCanInteractCapability.php b/src/applications/policy/capability/PhabricatorPolicyCanInteractCapability.php new file mode 100644 index 0000000000..207fe811c5 --- /dev/null +++ b/src/applications/policy/capability/PhabricatorPolicyCanInteractCapability.php @@ -0,0 +1,20 @@ +setHeader($header) - ->setBackground(PHUIObjectBoxView::GREY) + ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setObjectList($milestone_list); } diff --git a/src/applications/project/engine/PhabricatorProjectEditEngine.php b/src/applications/project/engine/PhabricatorProjectEditEngine.php index 7a0c11be0e..286e9bab0f 100644 --- a/src/applications/project/engine/PhabricatorProjectEditEngine.php +++ b/src/applications/project/engine/PhabricatorProjectEditEngine.php @@ -30,6 +30,10 @@ final class PhabricatorProjectEditEngine return true; } + public function getQuickCreateOrderVector() { + return id(new PhutilSortVector())->addInt(200); + } + public function getEngineName() { return pht('Projects'); } diff --git a/src/applications/search/field/PhabricatorSearchField.php b/src/applications/search/field/PhabricatorSearchField.php index 099fbdcc51..1a038ec665 100644 --- a/src/applications/search/field/PhabricatorSearchField.php +++ b/src/applications/search/field/PhabricatorSearchField.php @@ -19,6 +19,8 @@ abstract class PhabricatorSearchField extends Phobject { private $description; private $isHidden; + private $enableForConduit = true; + /* -( Configuring Fields )------------------------------------------------- */ @@ -333,6 +335,10 @@ abstract class PhabricatorSearchField extends Phobject { * @task conduit */ final public function getConduitParameterType() { + if (!$this->getEnableForConduit()) { + return false; + } + $type = $this->newConduitParameterType(); if ($type) { @@ -367,6 +373,15 @@ abstract class PhabricatorSearchField extends Phobject { $this->getConduitKey()); } + final public function setEnableForConduit($enable) { + $this->enableForConduit = $enable; + return $this; + } + + final public function getEnableForConduit() { + return $this->enableForConduit; + } + /* -( Utility Methods )----------------------------------------------------- */ diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php index 2d4c5e6f95..0847edd666 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php @@ -238,11 +238,15 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView { 'class' => 'phui-timeline-wedge', ), ''); + + $badge_view = $this->renderBadgeView(); + $comment_box = id(new PHUIObjectBoxView()) ->setFlush(true) ->addClass('phui-comment-form-view') ->addSigil('phui-comment-form') ->appendChild($image) + ->appendChild($badge_view) ->appendChild($wedge) ->appendChild($comment); @@ -512,4 +516,47 @@ class PhabricatorApplicationTransactionCommentView extends AphrontView { return $options; } + private function renderBadgeView() { + $user = $this->getUser(); + $can_use_badges = PhabricatorApplication::isClassInstalledForViewer( + 'PhabricatorBadgesApplication', + $user); + if (!$can_use_badges) { + return null; + } + + $awards = id(new PhabricatorBadgesAwardQuery()) + ->setViewer($this->getUser()) + ->withRecipientPHIDs(array($user->getPHID())) + ->setLimit(2) + ->execute(); + + $badge_view = null; + if ($awards) { + $badges = mpull($awards, 'getBadge'); + $badge_list = array(); + foreach ($badges as $badge) { + $badge_view = id(new PHUIBadgeMiniView()) + ->setIcon($badge->getIcon()) + ->setQuality($badge->getQuality()) + ->setHeader($badge->getName()) + ->setTipDirection('E') + ->setHref('/badges/view/'.$badge->getID()); + + $badge_list[] = $badge_view; + } + $flex = new PHUIBadgeBoxView(); + $flex->addItems($badge_list); + $flex->setCollapsed(true); + $badge_view = phutil_tag( + 'div', + array( + 'class' => 'phui-timeline-badges', + ), + $flex); + } + + return $badge_view; + } + } diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index 6448b2b8b2..2ce13491af 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -153,12 +153,8 @@ final class AphrontFormPolicyControl extends AphrontFormControl { } } - $policy_short_name = id(new PhutilUTF8StringTruncator()) - ->setMaximumGlyphs(28) - ->truncateString($policy->getName()); - $options[$policy->getType()][$policy->getPHID()] = array( - 'name' => $policy_short_name, + 'name' => $policy->getName(), 'full' => $policy->getName(), 'icon' => $policy->getIcon(), 'sort' => phutil_utf8_strtolower($policy->getName()), diff --git a/src/view/phui/PHUICrumbView.php b/src/view/phui/PHUICrumbView.php index 392a354123..68c43be4e3 100644 --- a/src/view/phui/PHUICrumbView.php +++ b/src/view/phui/PHUICrumbView.php @@ -75,7 +75,7 @@ final class PHUICrumbView extends AphrontView { // Surround the crumb name with spaces so that double clicking it only // selects the crumb itself. - $name = array(' ', $this->name, ' '); + $name = array(' ', $this->name); $name = phutil_tag( 'span', @@ -84,6 +84,10 @@ final class PHUICrumbView extends AphrontView { ), $name); + // Because of text-overflow and safari, put the second space on the + // outside of the element. + $name = array($name, ' '); + $divider = null; if (!$this->isLastCrumb) { $divider = id(new PHUIIconView()) diff --git a/webroot/rsrc/css/application/project/project-card-view.css b/webroot/rsrc/css/application/project/project-card-view.css index 0ad25c5420..7d1e9ce746 100644 --- a/webroot/rsrc/css/application/project/project-card-view.css +++ b/webroot/rsrc/css/application/project/project-card-view.css @@ -43,6 +43,10 @@ border-radius: 3px; } +.project-card-view .project-card-image-href { + display: inline-block; +} + .project-card-view .project-card-item div { display: inline; } @@ -103,6 +107,14 @@ margin-top: 8px; } +.people-card-view .phui-header-subheader .phui-tag-core { + text-overflow: ellipsis; + white-space: nowrap; + max-width: 232px; + overflow: hidden; + display: inline-block; +} + .project-card-view .phui-header-header .phui-tag-view .phui-tag-core { padding: 0; } diff --git a/webroot/rsrc/css/core/remarkup.css b/webroot/rsrc/css/core/remarkup.css index 0317eea718..03479398b3 100644 --- a/webroot/rsrc/css/core/remarkup.css +++ b/webroot/rsrc/css/core/remarkup.css @@ -272,6 +272,7 @@ video.phabricator-media { .phabricator-remarkup .phriction-link-missing { color: {$red}; + text-decoration: underline; } .phabricator-remarkup .phriction-link-lock { diff --git a/webroot/rsrc/css/phui/phui-action-list.css b/webroot/rsrc/css/phui/phui-action-list.css index 874af5ee42..4569438d5a 100644 --- a/webroot/rsrc/css/phui/phui-action-list.css +++ b/webroot/rsrc/css/phui/phui-action-list.css @@ -69,6 +69,7 @@ color: {$darkbluetext}; text-overflow: ellipsis; overflow: hidden; + white-space: nowrap; } .action-has-icon button.phabricator-action-view-item, @@ -164,3 +165,31 @@ margin-top: 8px; border-top: 1px solid {$thinblueborder}; } + +/******* Sub Menu *************************************************************/ + +.phabricator-action-view-submenu .caret-right { + position: absolute; + top: 8px; + right: 8px; + border-left-color: {$alphablue}; +} + +.phabricator-action-view-submenu .caret { + position: absolute; + top: 10px; + right: 8px; + border-top: 7px solid {$lightgreytext}; +} + +.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open + .phabricator-action-view-item { + background-color: rgba({$alphablue}, 0.07); + color: {$sky}; + border-radius: 3px; +} + +.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open + .phabricator-action-view-item .phui-icon-view { + color: {$sky}; +} diff --git a/webroot/rsrc/css/phui/phui-button.css b/webroot/rsrc/css/phui/phui-button.css index d801cdb513..21bf741225 100644 --- a/webroot/rsrc/css/phui/phui-button.css +++ b/webroot/rsrc/css/phui/phui-button.css @@ -235,6 +235,19 @@ a.policy-control .caret { float: right; } +a.policy-control .phui-button-text { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + display: block; +} + +.device-phone a.button.policy-control { + display: block; + float: none; + width: auto; +} + .caret { display: inline-block; width: 0; @@ -283,32 +296,6 @@ a.policy-control .caret { border-top-color: #000; } -.phabricator-action-view-submenu .caret-right { - float: right; - margin-top: 4px; - margin-right: 6px; - border-left-color: {$alphablue}; -} - -.phabricator-action-view-submenu .caret { - float: right; - margin-top: 5px; - margin-right: 4px; - border-top: 7px solid {$lightgreytext}; -} - -.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open - .phabricator-action-view-item { - background-color: rgba({$alphablue}, 0.07); - color: {$sky}; - border-radius: 3px; -} - -.phabricator-action-list-view .phabricator-action-view-submenu.phui-submenu-open - .phabricator-action-view-item .phui-icon-view { - color: {$sky}; -} - /* Icons */ .button.has-icon { position: relative; diff --git a/webroot/rsrc/css/phui/phui-crumbs-view.css b/webroot/rsrc/css/phui/phui-crumbs-view.css index d2d0744819..6155e9b2b8 100644 --- a/webroot/rsrc/css/phui/phui-crumbs-view.css +++ b/webroot/rsrc/css/phui/phui-crumbs-view.css @@ -48,6 +48,10 @@ .phui-crumb-view { float: left; padding: 8px 0; + max-width: 240px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .device-phone .phui-crumb-view.phabricator-last-crumb .phui-crumb-name, diff --git a/webroot/rsrc/css/phui/phui-fontkit.css b/webroot/rsrc/css/phui/phui-fontkit.css index ec711612ad..7bca35d277 100644 --- a/webroot/rsrc/css/phui/phui-fontkit.css +++ b/webroot/rsrc/css/phui/phui-fontkit.css @@ -34,3 +34,7 @@ padding: 0 24px 8px 0; margin: 32px 0 4px; } + +.phui-document-view .phabricator-remarkup .remarkup-header strong { + color: #586BE9; +} diff --git a/webroot/rsrc/css/phui/phui-form.css b/webroot/rsrc/css/phui/phui-form.css index bfe5111018..810ad32c2c 100644 --- a/webroot/rsrc/css/phui/phui-form.css +++ b/webroot/rsrc/css/phui/phui-form.css @@ -157,9 +157,20 @@ textarea[disabled], } .aphront-space-select-control-knob { - margin: 2px 8px 2px 0; + margin: 0 8px 0 0; + float: left; +} + +.aphront-form-control-policy .policy-control { + float: left; + margin-right: 8px; } .device .aphront-space-select-control-knob { margin-bottom: 8px; + float: none; +} + +.device .aphront-form-control-policy .policy-control { + margin: 0; }