diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 802fe48b7f..78ec532eef 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,12 +7,12 @@ */ return array( 'names' => array( - 'conpherence.pkg.css' => '80a3fcb3', - 'conpherence.pkg.js' => '89b4837e', - 'core.pkg.css' => 'f7b03076', - 'core.pkg.js' => '1d376fa9', + 'conpherence.pkg.css' => 'b1547973', + 'conpherence.pkg.js' => '11f3e07e', + 'core.pkg.css' => 'cfc3eabe', + 'core.pkg.js' => '975d6a27', 'darkconsole.pkg.js' => 'e7393ebb', - 'differential.pkg.css' => '3fb7f532', + 'differential.pkg.css' => 'e1d704ce', 'differential.pkg.js' => '634399e9', 'diffusion.pkg.css' => '91c5d3a6', 'diffusion.pkg.js' => '84c8f8fd', @@ -23,7 +23,7 @@ return array( 'rsrc/css/aphront/dialog-view.css' => '593d3f67', 'rsrc/css/aphront/lightbox-attachment.css' => '7acac05d', 'rsrc/css/aphront/list-filter-view.css' => '5d6f0526', - 'rsrc/css/aphront/multi-column.css' => 'fd18389d', + 'rsrc/css/aphront/multi-column.css' => '84cc6640', 'rsrc/css/aphront/notification.css' => '3f6c89c9', 'rsrc/css/aphront/panel-view.css' => '8427b78d', 'rsrc/css/aphront/phabricator-nav-view.css' => 'b29426e9', @@ -38,7 +38,7 @@ return array( 'rsrc/css/application/base/notification-menu.css' => 'b3ab500d', 'rsrc/css/application/base/phabricator-application-launch-view.css' => '95351601', 'rsrc/css/application/base/phui-theme.css' => '027ba77e', - 'rsrc/css/application/base/standard-page-view.css' => '3026770e', + 'rsrc/css/application/base/standard-page-view.css' => '79176f5a', 'rsrc/css/application/chatlog/chatlog.css' => 'd295b020', 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', 'rsrc/css/application/config/config-options.css' => '0ede4c9b', @@ -46,10 +46,10 @@ return array( 'rsrc/css/application/config/config-template.css' => '8f18fa41', 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', - 'rsrc/css/application/conpherence/durable-column.css' => '194ac487', + 'rsrc/css/application/conpherence/durable-column.css' => 'af11a2a7', 'rsrc/css/application/conpherence/header-pane.css' => '517de9fe', 'rsrc/css/application/conpherence/menu.css' => '78c7b811', - 'rsrc/css/application/conpherence/message-pane.css' => '8d13ac4d', + 'rsrc/css/application/conpherence/message-pane.css' => '0d7dff02', 'rsrc/css/application/conpherence/notification.css' => '6cdcc253', 'rsrc/css/application/conpherence/participant-pane.css' => '7bba0b56', 'rsrc/css/application/conpherence/transaction.css' => '46253e19', @@ -138,7 +138,7 @@ return array( 'rsrc/css/phui/phui-document.css' => 'c32e8dec', 'rsrc/css/phui/phui-feed-story.css' => 'aa49845d', 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', - 'rsrc/css/phui/phui-form-view.css' => '76b4a46c', + 'rsrc/css/phui/phui-form-view.css' => '9e22b190', 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 'rsrc/css/phui/phui-header-view.css' => '06385974', @@ -164,7 +164,7 @@ return array( 'rsrc/css/phui/phui-timeline-view.css' => 'bc523970', 'rsrc/css/phui/phui-two-column-view.css' => 'fcfbe347', 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', - 'rsrc/css/phui/workboards/phui-workboard.css' => 'bda3ef58', + 'rsrc/css/phui/workboards/phui-workboard.css' => 'e09eb53a', 'rsrc/css/phui/workboards/phui-workcard.css' => '0c62d7c5', 'rsrc/css/phui/workboards/phui-workpanel.css' => '92197373', 'rsrc/css/sprite-login.css' => '6dbbbd97', @@ -438,10 +438,10 @@ return array( 'rsrc/js/application/config/behavior-reorder-fields.js' => 'b6993408', 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', - 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'd3506890', + 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e287689f', 'rsrc/js/application/conpherence/behavior-menu.js' => '9eb55204', 'rsrc/js/application/conpherence/behavior-participant-pane.js' => '8604caa8', - 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', + 'rsrc/js/application/conpherence/behavior-pontificate.js' => 'f2e58483', 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', 'rsrc/js/application/conpherence/behavior-toggle-widget.js' => '9bdbbab0', 'rsrc/js/application/countdown/timer.js' => 'e4cc26b3', @@ -495,7 +495,7 @@ return array( 'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '5e9f347c', 'rsrc/js/application/projects/WorkboardBoard.js' => 'fe7cb52a', 'rsrc/js/application/projects/WorkboardCard.js' => 'c587b80f', - 'rsrc/js/application/projects/WorkboardColumn.js' => 'bae58312', + 'rsrc/js/application/projects/WorkboardColumn.js' => '21df4ff5', 'rsrc/js/application/projects/WorkboardController.js' => '55baf5ed', 'rsrc/js/application/projects/behavior-project-boards.js' => '14a1faae', 'rsrc/js/application/projects/behavior-project-create.js' => '065227cc', @@ -605,7 +605,7 @@ return array( 'aphront-dark-console-css' => 'f54bf286', 'aphront-dialog-view-css' => '593d3f67', 'aphront-list-filter-view-css' => '5d6f0526', - 'aphront-multi-column-view-css' => 'fd18389d', + 'aphront-multi-column-view-css' => '84cc6640', 'aphront-panel-view-css' => '8427b78d', 'aphront-table-view-css' => '3225137a', 'aphront-tokenizer-control-css' => '056da01b', @@ -618,10 +618,10 @@ return array( 'conduit-api-css' => '7bc725c4', 'config-options-css' => '0ede4c9b', 'config-page-css' => '8798e14f', - 'conpherence-durable-column-view' => '194ac487', + 'conpherence-durable-column-view' => 'af11a2a7', 'conpherence-header-pane-css' => '517de9fe', 'conpherence-menu-css' => '78c7b811', - 'conpherence-message-pane-css' => '8d13ac4d', + 'conpherence-message-pane-css' => '0d7dff02', 'conpherence-notification-css' => '6cdcc253', 'conpherence-participant-pane-css' => '7bba0b56', 'conpherence-thread-manager' => '01774ab2', @@ -670,7 +670,7 @@ return array( 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', 'javelin-behavior-conpherence-menu' => '9eb55204', 'javelin-behavior-conpherence-participant-pane' => '8604caa8', - 'javelin-behavior-conpherence-pontificate' => '21ba5861', + 'javelin-behavior-conpherence-pontificate' => 'f2e58483', 'javelin-behavior-countdown-timer' => 'e4cc26b3', 'javelin-behavior-dark-console' => 'f411b6ae', 'javelin-behavior-dashboard-async-panel' => '469c0d9e', @@ -699,7 +699,7 @@ return array( 'javelin-behavior-diffusion-pull-lastmodified' => 'f01586dc', 'javelin-behavior-doorkeeper-tag' => 'e5822781', 'javelin-behavior-drydock-live-operation-status' => '901935ef', - 'javelin-behavior-durable-column' => 'd3506890', + 'javelin-behavior-durable-column' => 'e287689f', 'javelin-behavior-editengine-reorder-configs' => 'd7a74243', 'javelin-behavior-editengine-reorder-fields' => 'b59e1e96', 'javelin-behavior-error-log' => '6882e80a', @@ -825,7 +825,7 @@ return array( 'javelin-websocket' => 'e292eaf4', 'javelin-workboard-board' => 'fe7cb52a', 'javelin-workboard-card' => 'c587b80f', - 'javelin-workboard-column' => 'bae58312', + 'javelin-workboard-column' => '21df4ff5', 'javelin-workboard-controller' => '55baf5ed', 'javelin-workflow' => '1e911d0f', 'lightbox-attachment-css' => '7acac05d', @@ -869,7 +869,7 @@ return array( 'phabricator-shaped-request' => '7cbe244b', 'phabricator-slowvote-css' => 'a94b7230', 'phabricator-source-code-view-css' => 'cbeef983', - 'phabricator-standard-page-view' => '3026770e', + 'phabricator-standard-page-view' => '79176f5a', 'phabricator-textareautils' => '320810c8', 'phabricator-title' => 'df5e11d2', 'phabricator-tooltip' => '6323f942', @@ -915,7 +915,7 @@ return array( 'phui-font-icon-base-css' => '870a7360', 'phui-fontkit-css' => '9cda225e', 'phui-form-css' => 'aac1d51d', - 'phui-form-view-css' => '76b4a46c', + 'phui-form-view-css' => '9e22b190', 'phui-head-thing-view-css' => 'fd311e5f', 'phui-header-view-css' => '06385974', 'phui-hovercard' => '1bd28176', @@ -943,7 +943,7 @@ return array( 'phui-timeline-view-css' => 'bc523970', 'phui-two-column-view-css' => 'fcfbe347', 'phui-workboard-color-css' => 'ac6fe6a7', - 'phui-workboard-view-css' => 'bda3ef58', + 'phui-workboard-view-css' => 'e09eb53a', 'phui-workcard-view-css' => '0c62d7c5', 'phui-workpanel-view-css' => '92197373', 'phuix-action-list-view' => 'b5c256b8', @@ -1154,13 +1154,9 @@ return array( 'javelin-uri', 'javelin-routable', ), - '21ba5861' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-util', - 'javelin-workflow', - 'javelin-stratcom', - 'conpherence-thread-manager', + '21df4ff5' => array( + 'javelin-install', + 'javelin-workboard-card', ), '2290aeef' => array( 'javelin-install', @@ -1922,10 +1918,6 @@ return array( 'javelin-uri', 'phabricator-notification', ), - 'bae58312' => array( - 'javelin-install', - 'javelin-workboard-card', - ), 'bb1dd507' => array( 'javelin-behavior', 'javelin-stratcom', @@ -2042,16 +2034,6 @@ return array( 'd254d646' => array( 'javelin-util', ), - 'd3506890' => array( - 'javelin-behavior', - 'javelin-dom', - 'javelin-stratcom', - 'javelin-behavior-device', - 'javelin-scrollbar', - 'javelin-quicksand', - 'phabricator-keyboard-shortcut', - 'conpherence-thread-manager', - ), 'd4505101' => array( 'javelin-stratcom', 'javelin-install', @@ -2127,6 +2109,16 @@ return array( 'javelin-stratcom', 'javelin-dom', ), + 'e287689f' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-stratcom', + 'javelin-behavior-device', + 'javelin-scrollbar', + 'javelin-quicksand', + 'phabricator-keyboard-shortcut', + 'conpherence-thread-manager', + ), 'e292eaf4' => array( 'javelin-install', ), @@ -2208,6 +2200,14 @@ return array( 'f03e17be' => array( 'phui-theme-css', ), + 'f2e58483' => array( + 'javelin-behavior', + 'javelin-dom', + 'javelin-util', + 'javelin-workflow', + 'javelin-stratcom', + 'conpherence-thread-manager', + ), 'f411b6ae' => array( 'javelin-behavior', 'javelin-stratcom', @@ -2332,6 +2332,7 @@ return array( 'aphront-tokenizer-control-css', 'aphront-typeahead-control-css', 'aphront-list-filter-view-css', + 'application-search-view-css', 'phabricator-remarkup-css', 'syntax-highlighting-css', 'syntax-default-css', @@ -2344,7 +2345,6 @@ return array( 'phabricator-notification-menu-css', 'lightbox-attachment-css', 'phui-header-view-css', - 'phabricator-filetree-view-css', 'phabricator-nav-view-css', 'phui-basic-nav-view-css', 'phui-crumbs-view-css', @@ -2479,6 +2479,7 @@ return array( 'phabricator-content-source-view-css', 'inline-comment-summary-css', 'phui-inline-comment-view-css', + 'phabricator-filetree-view-css', ), 'differential.pkg.js' => array( 'phabricator-drag-and-drop-file-upload', diff --git a/resources/celerity/packages.php b/resources/celerity/packages.php index 6e553a8c6e..a3a2a6132a 100644 --- a/resources/celerity/packages.php +++ b/resources/celerity/packages.php @@ -98,6 +98,7 @@ return array( 'aphront-tokenizer-control-css', 'aphront-typeahead-control-css', 'aphront-list-filter-view-css', + 'application-search-view-css', 'phabricator-remarkup-css', 'syntax-highlighting-css', @@ -112,7 +113,6 @@ return array( 'phabricator-notification-menu-css', 'lightbox-attachment-css', 'phui-header-view-css', - 'phabricator-filetree-view-css', 'phabricator-nav-view-css', 'phui-basic-nav-view-css', 'phui-crumbs-view-css', @@ -180,6 +180,7 @@ return array( 'phabricator-content-source-view-css', 'inline-comment-summary-css', 'phui-inline-comment-view-css', + 'phabricator-filetree-view-css', ), 'differential.pkg.js' => array( 'phabricator-drag-and-drop-file-upload', diff --git a/resources/sql/autopatches/20160927.phurl.ngrams.php b/resources/sql/autopatches/20160927.phurl.ngrams.php new file mode 100644 index 0000000000..74cf61efa5 --- /dev/null +++ b/resources/sql/autopatches/20160927.phurl.ngrams.php @@ -0,0 +1,11 @@ +getPHID(), + array( + 'force' => true, + )); +} diff --git a/resources/sql/autopatches/20160927.phurl.ngrams.sql b/resources/sql/autopatches/20160927.phurl.ngrams.sql new file mode 100644 index 0000000000..b5b35a24f5 --- /dev/null +++ b/resources/sql/autopatches/20160927.phurl.ngrams.sql @@ -0,0 +1,7 @@ +CREATE TABLE {$NAMESPACE}_phurl.phurl_phurlname_ngrams ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + objectID INT UNSIGNED NOT NULL, + ngram CHAR(3) NOT NULL COLLATE {$COLLATE_TEXT}, + KEY `key_object` (objectID), + KEY `key_ngram` (ngram, objectID) +) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT}; diff --git a/resources/sql/autopatches/20160928.tokentoken.sql b/resources/sql/autopatches/20160928.tokentoken.sql new file mode 100644 index 0000000000..cfe969f77b --- /dev/null +++ b/resources/sql/autopatches/20160928.tokentoken.sql @@ -0,0 +1,15 @@ +CREATE TABLE {$NAMESPACE}_token.token_token ( + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + phid VARBINARY(64) NOT NULL, + name VARCHAR(64) NOT NULL COLLATE {$COLLATE_TEXT}, + flavor VARCHAR(128) NOT NULL COLLATE {$COLLATE_TEXT}, + status VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT}, + builtinKey VARCHAR(32) COLLATE {$COLLATE_TEXT}, + dateCreated INT UNSIGNED NOT NULL, + dateModified INT UNSIGNED NOT NULL, + creatorPHID VARBINARY(64) NOT NULL, + tokenImagePHID VARBINARY(64), + UNIQUE KEY `key_phid` (phid), + UNIQUE KEY `key_builtin` (builtinKey), + KEY `key_creator` (creatorPHID, dateModified) +) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT}; diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 8e67eea1b9..f4a7ba2fd3 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2213,6 +2213,7 @@ phutil_register_library_map(array( 'PhabricatorConfigValidationException' => 'applications/config/exception/PhabricatorConfigValidationException.php', 'PhabricatorConfigVersionController' => 'applications/config/controller/PhabricatorConfigVersionController.php', 'PhabricatorConpherenceApplication' => 'applications/conpherence/application/PhabricatorConpherenceApplication.php', + 'PhabricatorConpherenceColumnMinimizeSetting' => 'applications/settings/setting/PhabricatorConpherenceColumnMinimizeSetting.php', 'PhabricatorConpherenceColumnVisibleSetting' => 'applications/settings/setting/PhabricatorConpherenceColumnVisibleSetting.php', 'PhabricatorConpherenceNotificationsSetting' => 'applications/settings/setting/PhabricatorConpherenceNotificationsSetting.php', 'PhabricatorConpherencePreferencesSettingsPanel' => 'applications/settings/panel/PhabricatorConpherencePreferencesSettingsPanel.php', @@ -2688,6 +2689,7 @@ phutil_register_library_map(array( 'PhabricatorIconSetEditField' => 'applications/transactions/editfield/PhabricatorIconSetEditField.php', 'PhabricatorIconSetIcon' => 'applications/files/iconset/PhabricatorIconSetIcon.php', 'PhabricatorImageMacroRemarkupRule' => 'applications/macro/markup/PhabricatorImageMacroRemarkupRule.php', + 'PhabricatorImageRemarkupRule' => 'applications/files/markup/PhabricatorImageRemarkupRule.php', 'PhabricatorImageTransformer' => 'applications/files/PhabricatorImageTransformer.php', 'PhabricatorImagemagickSetupCheck' => 'applications/config/check/PhabricatorImagemagickSetupCheck.php', 'PhabricatorInFlightErrorView' => 'applications/config/view/PhabricatorInFlightErrorView.php', @@ -3186,14 +3188,17 @@ phutil_register_library_map(array( 'PhabricatorPhurlURLAccessController' => 'applications/phurl/controller/PhabricatorPhurlURLAccessController.php', 'PhabricatorPhurlURLCommentController' => 'applications/phurl/controller/PhabricatorPhurlURLCommentController.php', 'PhabricatorPhurlURLCreateCapability' => 'applications/phurl/capability/PhabricatorPhurlURLCreateCapability.php', + 'PhabricatorPhurlURLEditConduitAPIMethod' => 'applications/phurl/conduit/PhabricatorPhurlURLEditConduitAPIMethod.php', 'PhabricatorPhurlURLEditController' => 'applications/phurl/controller/PhabricatorPhurlURLEditController.php', 'PhabricatorPhurlURLEditEngine' => 'applications/phurl/editor/PhabricatorPhurlURLEditEngine.php', 'PhabricatorPhurlURLEditor' => 'applications/phurl/editor/PhabricatorPhurlURLEditor.php', 'PhabricatorPhurlURLListController' => 'applications/phurl/controller/PhabricatorPhurlURLListController.php', 'PhabricatorPhurlURLMailReceiver' => 'applications/phurl/mail/PhabricatorPhurlURLMailReceiver.php', + 'PhabricatorPhurlURLNameNgrams' => 'applications/phurl/storage/PhabricatorPhurlURLNameNgrams.php', 'PhabricatorPhurlURLPHIDType' => 'applications/phurl/phid/PhabricatorPhurlURLPHIDType.php', 'PhabricatorPhurlURLQuery' => 'applications/phurl/query/PhabricatorPhurlURLQuery.php', 'PhabricatorPhurlURLReplyHandler' => 'applications/phurl/mail/PhabricatorPhurlURLReplyHandler.php', + 'PhabricatorPhurlURLSearchConduitAPIMethod' => 'applications/phurl/conduit/PhabricatorPhurlURLSearchConduitAPIMethod.php', 'PhabricatorPhurlURLSearchEngine' => 'applications/phurl/query/PhabricatorPhurlURLSearchEngine.php', 'PhabricatorPhurlURLTransaction' => 'applications/phurl/storage/PhabricatorPhurlURLTransaction.php', 'PhabricatorPhurlURLTransactionComment' => 'applications/phurl/storage/PhabricatorPhurlURLTransactionComment.php', @@ -3776,6 +3781,7 @@ phutil_register_library_map(array( 'PhabricatorTokensApplication' => 'applications/tokens/application/PhabricatorTokensApplication.php', 'PhabricatorTokensCurtainExtension' => 'applications/tokens/engineextension/PhabricatorTokensCurtainExtension.php', 'PhabricatorTokensSettingsPanel' => 'applications/settings/panel/PhabricatorTokensSettingsPanel.php', + 'PhabricatorTokensToken' => 'applications/tokens/storage/PhabricatorTokensToken.php', 'PhabricatorTooltipUIExample' => 'applications/uiexample/examples/PhabricatorTooltipUIExample.php', 'PhabricatorTransactionChange' => 'applications/transactions/data/PhabricatorTransactionChange.php', 'PhabricatorTransactionRemarkupChange' => 'applications/transactions/data/PhabricatorTransactionRemarkupChange.php', @@ -4765,7 +4771,7 @@ phutil_register_library_map(array( 'ConpherenceFulltextQuery' => 'PhabricatorOffsetPagedQuery', 'ConpherenceImageData' => 'ConpherenceConstants', 'ConpherenceIndex' => 'ConpherenceDAO', - 'ConpherenceLayoutView' => 'AphrontView', + 'ConpherenceLayoutView' => 'AphrontTagView', 'ConpherenceListController' => 'ConpherenceController', 'ConpherenceMenuItemView' => 'AphrontTagView', 'ConpherenceNewRoomController' => 'ConpherenceController', @@ -6976,6 +6982,7 @@ phutil_register_library_map(array( 'PhabricatorConfigValidationException' => 'Exception', 'PhabricatorConfigVersionController' => 'PhabricatorConfigController', 'PhabricatorConpherenceApplication' => 'PhabricatorApplication', + 'PhabricatorConpherenceColumnMinimizeSetting' => 'PhabricatorInternalSetting', 'PhabricatorConpherenceColumnVisibleSetting' => 'PhabricatorInternalSetting', 'PhabricatorConpherenceNotificationsSetting' => 'PhabricatorSelectSetting', 'PhabricatorConpherencePreferencesSettingsPanel' => 'PhabricatorEditEngineSettingsPanel', @@ -7523,6 +7530,7 @@ phutil_register_library_map(array( 'PhabricatorIconSetEditField' => 'PhabricatorEditField', 'PhabricatorIconSetIcon' => 'Phobject', 'PhabricatorImageMacroRemarkupRule' => 'PhutilRemarkupRule', + 'PhabricatorImageRemarkupRule' => 'PhutilRemarkupRule', 'PhabricatorImageTransformer' => 'Phobject', 'PhabricatorImagemagickSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorInFlightErrorView' => 'AphrontView', @@ -8102,18 +8110,23 @@ phutil_register_library_map(array( 'PhabricatorMentionableInterface', 'PhabricatorFlaggableInterface', 'PhabricatorSpacesInterface', + 'PhabricatorConduitResultInterface', + 'PhabricatorNgramsInterface', ), 'PhabricatorPhurlURLAccessController' => 'PhabricatorPhurlController', 'PhabricatorPhurlURLCommentController' => 'PhabricatorPhurlController', 'PhabricatorPhurlURLCreateCapability' => 'PhabricatorPolicyCapability', + 'PhabricatorPhurlURLEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod', 'PhabricatorPhurlURLEditController' => 'PhabricatorPhurlController', 'PhabricatorPhurlURLEditEngine' => 'PhabricatorEditEngine', 'PhabricatorPhurlURLEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorPhurlURLListController' => 'PhabricatorPhurlController', 'PhabricatorPhurlURLMailReceiver' => 'PhabricatorObjectMailReceiver', + 'PhabricatorPhurlURLNameNgrams' => 'PhabricatorSearchNgrams', 'PhabricatorPhurlURLPHIDType' => 'PhabricatorPHIDType', 'PhabricatorPhurlURLQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'PhabricatorPhurlURLReplyHandler' => 'PhabricatorApplicationTransactionReplyHandler', + 'PhabricatorPhurlURLSearchConduitAPIMethod' => 'PhabricatorSearchEngineAPIMethod', 'PhabricatorPhurlURLSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorPhurlURLTransaction' => 'PhabricatorApplicationTransaction', 'PhabricatorPhurlURLTransactionComment' => 'PhabricatorApplicationTransactionComment', @@ -8814,6 +8827,13 @@ phutil_register_library_map(array( 'PhabricatorTokensApplication' => 'PhabricatorApplication', 'PhabricatorTokensCurtainExtension' => 'PHUICurtainExtension', 'PhabricatorTokensSettingsPanel' => 'PhabricatorSettingsPanel', + 'PhabricatorTokensToken' => array( + 'PhabricatorTokenDAO', + 'PhabricatorDestructibleInterface', + 'PhabricatorSubscribableInterface', + 'PhabricatorFlaggableInterface', + 'PhabricatorConduitResultInterface', + ), 'PhabricatorTooltipUIExample' => 'PhabricatorUIExample', 'PhabricatorTransactionChange' => 'Phobject', 'PhabricatorTransactionRemarkupChange' => 'PhabricatorTransactionChange', diff --git a/src/applications/conduit/query/PhabricatorConduitMethodQuery.php b/src/applications/conduit/query/PhabricatorConduitMethodQuery.php index 512dc70e6f..0409e4ceb3 100644 --- a/src/applications/conduit/query/PhabricatorConduitMethodQuery.php +++ b/src/applications/conduit/query/PhabricatorConduitMethodQuery.php @@ -21,11 +21,6 @@ final class PhabricatorConduitMethodQuery return $this; } - public function withApplicationNames(array $application_names) { - $this->applicationNames = $application_names; - return $this; - } - public function withIsStable($is_stable) { $this->isStable = $is_stable; return $this; @@ -86,17 +81,6 @@ final class PhabricatorConduitMethodQuery } } - if ($this->applicationNames) { - $map = array_fuse($this->applicationNames); - foreach ($methods as $key => $method) { - $needle = $method->getApplicationName(); - $needle = phutil_utf8_strtolower($needle); - if (empty($map[$needle])) { - unset($methods[$key]); - } - } - } - if ($this->nameContains) { $needle = phutil_utf8_strtolower($this->nameContains); foreach ($methods as $key => $method) { diff --git a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php index 22e4e19e53..3c01005722 100644 --- a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php +++ b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php @@ -21,11 +21,6 @@ final class PhabricatorConduitSearchEngine $saved->setParameter('isStable', $request->getStr('isStable')); $saved->setParameter('isUnstable', $request->getStr('isUnstable')); $saved->setParameter('isDeprecated', $request->getStr('isDeprecated')); - - $saved->setParameter( - 'applicationNames', - $request->getStrList('applicationNames')); - $saved->setParameter('nameContains', $request->getStr('nameContains')); return $saved; @@ -39,11 +34,6 @@ final class PhabricatorConduitSearchEngine $query->withIsDeprecated($saved->getParameter('isDeprecated')); $query->withIsInternal(false); - $names = $saved->getParameter('applicationNames', array()); - if ($names) { - $query->withApplicationNames($names); - } - $contains = $saved->getParameter('nameContains'); if (strlen($contains)) { $query->withNameContains($contains); @@ -63,18 +53,6 @@ final class PhabricatorConduitSearchEngine ->setName('nameContains') ->setValue($saved->getParameter('nameContains'))); - $names = $saved->getParameter('applicationNames', array()); - $form - ->appendChild( - id(new AphrontFormTextControl()) - ->setLabel(pht('Applications')) - ->setName('applicationNames') - ->setValue(implode(', ', $names)) - ->setCaption( - pht( - 'Example: %s', - phutil_tag('tt', array(), 'differential, paste')))); - $is_stable = $saved->getParameter('isStable'); $is_unstable = $saved->getParameter('isUnstable'); $is_deprecated = $saved->getParameter('isDeprecated'); diff --git a/src/applications/conpherence/ConpherenceTransactionRenderer.php b/src/applications/conpherence/ConpherenceTransactionRenderer.php index ff8bb52510..341d287e8b 100644 --- a/src/applications/conpherence/ConpherenceTransactionRenderer.php +++ b/src/applications/conpherence/ConpherenceTransactionRenderer.php @@ -78,6 +78,7 @@ final class ConpherenceTransactionRenderer extends Phobject { ->setFullDisplay($full_display); foreach ($transactions as $transaction) { + $collapsed = false; if ($previous_transaction) { $previous_day = phabricator_format_local_time( $previous_transaction->getDateCreated(), @@ -87,6 +88,22 @@ final class ConpherenceTransactionRenderer extends Phobject { $transaction->getDateCreated(), $user, 'Ymd'); + + // See if same user / time + $previous_author = $previous_transaction->getAuthorPHID(); + $current_author = $transaction->getAuthorPHID(); + $previous_time = $previous_transaction->getDateCreated(); + $current_time = $transaction->getDateCreated(); + $previous_type = $previous_transaction->getTransactionType(); + $current_type = $transaction->getTransactionType(); + if (($previous_author == $current_author) && + ($previous_type == $current_type)) { + // Group messages within the last x seconds + if (($current_time - $previous_time) < 120) { + $collapsed = true; + } + } + // date marker transaction time! if ($previous_day != $current_day) { $date_marker_transaction->setDateCreated( @@ -97,6 +114,9 @@ final class ConpherenceTransactionRenderer extends Phobject { } $transaction_view = id(clone $transaction_view_template) ->setConpherenceTransaction($transaction); + if ($collapsed) { + $transaction_view->addClass('conpherence-transaction-collapsed'); + } $rendered_transactions[] = $transaction_view->render(); $previous_transaction = $transaction; diff --git a/src/applications/conpherence/controller/ConpherenceController.php b/src/applications/conpherence/controller/ConpherenceController.php index c89923ba83..c4750a08a8 100644 --- a/src/applications/conpherence/controller/ConpherenceController.php +++ b/src/applications/conpherence/controller/ConpherenceController.php @@ -62,9 +62,15 @@ abstract class ConpherenceController extends PhabricatorController { ->addClass((!$data['topic']) ? 'conpherence-no-topic' : null); $can_edit = PhabricatorPolicyFilter::hasCapability( - $viewer, - $conpherence, - PhabricatorPolicyCapability::CAN_EDIT); + $viewer, + $conpherence, + PhabricatorPolicyCapability::CAN_EDIT); + + $participating = $conpherence->getParticipantIfExists($viewer->getPHID()); + $can_join = PhabricatorPolicyFilter::hasCapability( + $viewer, + $conpherence, + PhabricatorPolicyCapability::CAN_JOIN); $header->addActionItem( id(new PHUIIconCircleView()) @@ -101,6 +107,38 @@ abstract class ConpherenceController extends PhabricatorController { ->setIcon('fa-group') ->setHref('#') ->addClass('conpherence-participant-toggle')); + + if ($can_join && !$participating) { + $action = ConpherenceUpdateActions::JOIN_ROOM; + $uri = $this->getApplicationURI('update/'.$conpherence->getID().'/'); + $button = phutil_tag( + 'button', + array( + 'type' => 'SUBMIT', + 'class' => 'button green mlr', + ), + pht('Join Room')); + + $hidden = phutil_tag( + 'input', + array( + 'type' => 'hidden', + 'name' => 'action', + 'value' => ConpherenceUpdateActions::JOIN_ROOM, + )); + + $form = phabricator_form( + $viewer, + array( + 'method' => 'POST', + 'action' => (string)$uri, + ), + array( + $hidden, + $button, + )); + $header->addActionItem($form); + } } return $header; diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php index e13d020626..4aec1d0e0a 100644 --- a/src/applications/conpherence/controller/ConpherenceViewController.php +++ b/src/applications/conpherence/controller/ConpherenceViewController.php @@ -118,6 +118,11 @@ final class ConpherenceViewController extends return id(new AphrontAjaxResponse())->setContent($content); } + $can_join = PhabricatorPolicyFilter::hasCapability( + $user, + $conpherence, + PhabricatorPolicyCapability::CAN_JOIN); + $layout = id(new ConpherenceLayoutView()) ->setUser($user) ->setBaseURI($this->getApplicationURI()) @@ -128,6 +133,12 @@ final class ConpherenceViewController extends ->setLatestTransactionID($data['latest_transaction_id']) ->setRole('thread'); + $participating = $conpherence->getParticipantIfExists($user->getPHID()); + + if (!$user->isLoggedIn()) { + $layout->addClass('conpherence-no-pontificate'); + } + return $this->newPage() ->setTitle($title) ->setPageObjectPHIDs(array($conpherence->getPHID())) @@ -149,46 +160,56 @@ final class ConpherenceViewController extends $draft = PhabricatorDraft::newFromUserAndKey( $user, $conpherence->getPHID()); - if ($participating) { - $action = ConpherenceUpdateActions::MESSAGE; - $button_text = pht('Send'); - } else if ($user->isLoggedIn()) { - $action = ConpherenceUpdateActions::JOIN_ROOM; - $button_text = pht('Join Room'); + $update_uri = $this->getApplicationURI('update/'.$conpherence->getID().'/'); + + if ($user->isLoggedIn()) { + $this->initBehavior('conpherence-pontificate'); + if ($participating) { + $action = ConpherenceUpdateActions::MESSAGE; + $status = new PhabricatorNotificationStatusView(); + } else { + $action = ConpherenceUpdateActions::JOIN_ROOM; + $status = pht('Sending a message will also join the room.'); + } + + $form = id(new AphrontFormView()) + ->setUser($user) + ->setAction($update_uri) + ->addSigil('conpherence-pontificate') + ->setWorkflow(true) + ->addHiddenInput('action', $action) + ->appendChild( + id(new PhabricatorRemarkupControl()) + ->setUser($user) + ->setName('text') + ->setValue($draft->getDraft())); + + $status_view = phutil_tag( + 'div', + array( + 'class' => 'conpherence-room-status', + 'id' => 'conpherence-room-status', + ), + $status); + + $view = phutil_tag_div( + 'pontificate-container', array($form, $status_view)); + + return $view; + } else { // user not logged in so give them a login button. $login_href = id(new PhutilURI('/auth/start/')) ->setQueryParam('next', '/'.$conpherence->getMonogram()); return id(new PHUIFormLayoutView()) ->addClass('login-to-participate') + ->appendInstructions(pht('Log in to join this room and participate.')) ->appendChild( id(new PHUIButtonView()) ->setTag('a') ->setText(pht('Login to Participate')) ->setHref((string)$login_href)); } - $update_uri = $this->getApplicationURI('update/'.$conpherence->getID().'/'); - - $this->initBehavior('conpherence-pontificate'); - - $form = - id(new AphrontFormView()) - ->setUser($user) - ->setAction($update_uri) - ->addSigil('conpherence-pontificate') - ->setWorkflow(true) - ->addHiddenInput('action', $action) - ->appendChild( - id(new PhabricatorRemarkupControl()) - ->setUser($user) - ->setName('text') - ->setValue($draft->getDraft())) - ->appendChild( - id(new AphrontFormSubmitControl()) - ->setValue($button_text)) - ->render(); - - return $form; } private function getNeededTransactions( diff --git a/src/applications/conpherence/mail/ConpherenceReplyHandler.php b/src/applications/conpherence/mail/ConpherenceReplyHandler.php index 0a07cbad29..946501c8b8 100644 --- a/src/applications/conpherence/mail/ConpherenceReplyHandler.php +++ b/src/applications/conpherence/mail/ConpherenceReplyHandler.php @@ -34,14 +34,8 @@ final class ConpherenceReplyHandler extends PhabricatorMailReplyHandler { $user = $this->getActor(); if (!$conpherence->getPHID()) { $conpherence - ->attachParticipants(array()) - ->attachFilePHIDs(array()); + ->attachParticipants(array()); } else { - $edge_type = PhabricatorObjectHasFileEdgeType::EDGECONST; - $file_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( - $conpherence->getPHID(), - $edge_type); - $conpherence->attachFilePHIDs($file_phids); $participants = id(new ConpherenceParticipant()) ->loadAllWhere('conpherencePHID = %s', $conpherence->getPHID()); $participants = mpull($participants, null, 'getParticipantPHID'); diff --git a/src/applications/conpherence/view/ConpherenceDurableColumnView.php b/src/applications/conpherence/view/ConpherenceDurableColumnView.php index bf454c882a..ed5c072c5d 100644 --- a/src/applications/conpherence/view/ConpherenceDurableColumnView.php +++ b/src/applications/conpherence/view/ConpherenceDurableColumnView.php @@ -7,6 +7,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { private $selectedConpherence; private $transactions; private $visible; + private $minimize; private $initialLoad = false; private $policyObjects; private $quicksandConfig = array(); @@ -59,6 +60,15 @@ final class ConpherenceDurableColumnView extends AphrontTagView { return $this->visible; } + public function setMinimize($minimize) { + $this->minimize = $minimize; + return $this; + } + + public function getMinimize() { + return $this->minimize; + } + public function setInitialLoad($bool) { $this->initialLoad = $bool; return $this; @@ -109,12 +119,15 @@ final class ConpherenceDurableColumnView extends AphrontTagView { protected function getTagContent() { $column_key = PhabricatorConpherenceColumnVisibleSetting::SETTINGKEY; + $minimize_key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; Javelin::initBehavior( 'durable-column', array( 'visible' => $this->getVisible(), - 'settingsURI' => '/settings/adjust/?key='.$column_key, + 'minimize' => $this->getMinimize(), + 'visibleURI' => '/settings/adjust/?key='.$column_key, + 'minimizeURI' => '/settings/adjust/?key='.$minimize_key, 'quicksandConfig' => $this->getQuicksandConfig(), )); @@ -125,19 +138,13 @@ final class ConpherenceDurableColumnView extends AphrontTagView { $classes = array(); $classes[] = 'conpherence-durable-column-header'; - $classes[] = 'phabricator-main-menu-background'; - - $loading_mask = phutil_tag( - 'div', - array( - 'class' => 'loading-mask', - ), - ''); + $classes[] = 'grouped'; $header = phutil_tag( 'div', array( 'class' => implode(' ', $classes), + 'data-sigil' => 'conpherence-minimize-window', ), $this->buildHeader()); @@ -175,23 +182,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { $input = $this->buildTextInput(); - $footer = phutil_tag( - 'div', - array( - 'class' => 'conpherence-durable-column-footer', - ), - array( - $this->buildSendButton(), - phutil_tag( - 'div', - array( - 'class' => 'conpherence-durable-column-status', - ), - $this->buildStatusText()), - )); - return array( - $loading_mask, $header, javelin_tag( 'div', @@ -203,7 +194,6 @@ final class ConpherenceDurableColumnView extends AphrontTagView { $icon_bar, $content, $input, - $footer, )), ); } @@ -253,7 +243,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { 'threadID' => $conpherence->getID(), 'threadTitle' => hsprintf('%s', $thread_title), 'tip' => $data['title'], - 'align' => 'S', + 'align' => 'W', ), ), phutil_tag( @@ -263,26 +253,10 @@ final class ConpherenceDurableColumnView extends AphrontTagView { ), '')); } - $icons[] = $this->buildSearchButton(); return $icons; } - private function buildSearchButton() { - return phutil_tag( - 'div', - array( - 'class' => 'conpherence-durable-column-search-button', - ), - id(new PHUIButtonBarView()) - ->addButton( - id(new PHUIButtonView()) - ->setTag('a') - ->setHref('/conpherence/search/') - ->setColor(PHUIButtonView::GREY) - ->setIcon('fa-search'))); - } - private function buildHeader() { $conpherence = $this->getSelectedConpherence(); @@ -324,18 +298,30 @@ final class ConpherenceDurableColumnView extends AphrontTagView { 'containerDivID' => 'conpherence-durable-column', )); - $item = id(new PHUIListItemView()) + $bars = id(new PHUIListItemView()) ->setName(pht('Room Actions')) - ->setIcon('fa-bars') + ->setIcon('fa-gear') ->addClass('core-menu-item') + ->addClass('conpherence-settings-icon') ->addSigil('conpherence-settings-menu') ->setID($bubble_id) ->setHref('#') ->setAural(pht('Room Actions')) + ->setOrder(400); + + $minimize = id(new PHUIListItemView()) + ->setName(pht('Minimize Window')) + ->setIcon('fa-toggle-down') + ->addClass('core-menu-item') + ->addClass('conpherence-minimize-icon') + ->addSigil('conpherence-minimize-window') + ->setHref('#') + ->setAural(pht('Minimize Window')) ->setOrder(300); + $settings_button = id(new PHUIListView()) - ->addMenuItem($item) - ->addClass('phabricator-dark-menu') + ->addMenuItem($bars) + ->addMenuItem($minimize) ->addClass('phabricator-application-menu'); $header = null; @@ -354,7 +340,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { phutil_tag( 'div', array( - 'class' => 'conpherence-durable-column-header', + 'class' => 'conpherence-durable-column-header-inner', ), array( javelin_tag( @@ -401,7 +387,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView { } $actions[] = array( - 'name' => pht('Hide Column'), + 'name' => pht('Hide Window'), 'disabled' => false, 'href' => '#', 'icon' => 'fa-times', diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php index 2b6ed5e0d2..f0d94d9a06 100644 --- a/src/applications/conpherence/view/ConpherenceLayoutView.php +++ b/src/applications/conpherence/view/ConpherenceLayoutView.php @@ -1,6 +1,6 @@ getUserSetting($widget_key, false); } - public function render() { + protected function getTagAttributes() { + $classes = array(); + if (!$this->getWidgetColumnVisible()) { + $classes[] = 'hide-widgets'; + } + + return array( + 'id' => 'conpherence-main-layout', + 'sigil' => 'conpherence-layout', + 'class' => 'conpherence-layout '. + implode(' ', $classes). + ' conpherence-role-'.$this->role, + ); + + } + + protected function getTagContent() { require_celerity_resource('conpherence-menu-css'); require_celerity_resource('conpherence-message-pane-css'); require_celerity_resource('conpherence-participant-pane-css'); - $layout_id = 'conpherence-main-layout'; - $selected_id = null; $selected_thread_id = null; $selected_thread_phid = null; @@ -87,7 +101,7 @@ final class ConpherenceLayoutView extends AphrontView { $this->initBehavior('conpherence-menu', array( 'baseURI' => $this->baseURI, - 'layoutID' => $layout_id, + 'layoutID' => 'conpherence-main-layout', 'selectedID' => $selected_id, 'selectedThreadID' => $selected_thread_id, 'selectedThreadPHID' => $selected_thread_phid, @@ -99,26 +113,9 @@ final class ConpherenceLayoutView extends AphrontView { 'hasWidgets' => false, )); - $classes = array(); - if (!$this->getUser()->isLoggedIn()) { - $classes[] = 'conpherence-logged-out'; - } - - if (!$this->getWidgetColumnVisible()) { - $classes[] = 'hide-widgets'; - } - $this->initBehavior('conpherence-participant-pane'); - return javelin_tag( - 'div', - array( - 'id' => $layout_id, - 'sigil' => 'conpherence-layout', - 'class' => 'conpherence-layout '. - implode(' ', $classes). - ' conpherence-role-'.$this->role, - ), + return array( javelin_tag( 'div', @@ -202,7 +199,7 @@ final class ConpherenceLayoutView extends AphrontView { nonempty($this->replyForm, '')), )), )), - )); + ); } private function buildNUXView() { diff --git a/src/applications/conpherence/view/ConpherenceTransactionView.php b/src/applications/conpherence/view/ConpherenceTransactionView.php index e99013fda7..3b1c29ebcb 100644 --- a/src/applications/conpherence/view/ConpherenceTransactionView.php +++ b/src/applications/conpherence/view/ConpherenceTransactionView.php @@ -201,21 +201,19 @@ final class ConpherenceTransactionView extends AphrontView { private function renderTransactionImage() { $image = null; - if ($this->getFullDisplay()) { - $transaction = $this->getConpherenceTransaction(); - switch ($transaction->getTransactionType()) { - case PhabricatorTransactions::TYPE_COMMENT: - $handles = $this->getHandles(); - $author = $handles[$transaction->getAuthorPHID()]; - $image_uri = $author->getImageURI(); - $image = phutil_tag( - 'span', - array( - 'class' => 'conpherence-transaction-image', - 'style' => 'background-image: url('.$image_uri.');', - )); - break; - } + $transaction = $this->getConpherenceTransaction(); + switch ($transaction->getTransactionType()) { + case PhabricatorTransactions::TYPE_COMMENT: + $handles = $this->getHandles(); + $author = $handles[$transaction->getAuthorPHID()]; + $image_uri = $author->getImageURI(); + $image = phutil_tag( + 'span', + array( + 'class' => 'conpherence-transaction-image', + 'style' => 'background-image: url('.$image_uri.');', + )); + break; } return $image; } diff --git a/src/applications/files/application/PhabricatorFilesApplication.php b/src/applications/files/application/PhabricatorFilesApplication.php index 4247de5bd4..4b1cb253bb 100644 --- a/src/applications/files/application/PhabricatorFilesApplication.php +++ b/src/applications/files/application/PhabricatorFilesApplication.php @@ -37,6 +37,7 @@ final class PhabricatorFilesApplication extends PhabricatorApplication { public function getRemarkupRules() { return array( new PhabricatorEmbedFileRemarkupRule(), + new PhabricatorImageRemarkupRule(), ); } diff --git a/src/applications/files/controller/PhabricatorFileImageProxyController.php b/src/applications/files/controller/PhabricatorFileImageProxyController.php index 5155229b7f..44573aea46 100644 --- a/src/applications/files/controller/PhabricatorFileImageProxyController.php +++ b/src/applications/files/controller/PhabricatorFileImageProxyController.php @@ -99,7 +99,7 @@ final class PhabricatorFileImageProxyController ->setViewer(PhabricatorUser::getOmnipotentUser()) ->withPHIDs(array($request->getFilePHID())) ->executeOne(); - if (!file) { + if (!$file) { throw new Exception(pht( 'The underlying file does not exist, but the cached request was '. 'successful. This likely means the file record was manually deleted '. diff --git a/src/applications/files/controller/PhabricatorFileInfoController.php b/src/applications/files/controller/PhabricatorFileInfoController.php index 3c822b401c..4ca3bbb72e 100644 --- a/src/applications/files/controller/PhabricatorFileInfoController.php +++ b/src/applications/files/controller/PhabricatorFileInfoController.php @@ -285,12 +285,17 @@ final class PhabricatorFileInfoController extends PhabricatorFileController { pht('Engine'), $file->getStorageEngine()); - $format_key = $file->getStorageFormat(); - $format = PhabricatorFileStorageFormat::getFormat($format_key); - if ($format) { - $format_name = $format->getStorageFormatName(); + $engine = $this->loadStorageEngine($file); + if ($engine && $engine->isChunkEngine()) { + $format_name = pht('Chunks'); } else { - $format_name = pht('Unknown ("%s")', $format_key); + $format_key = $file->getStorageFormat(); + $format = PhabricatorFileStorageFormat::getFormat($format_key); + if ($format) { + $format_name = $format->getStorageFormatName(); + } else { + $format_name = pht('Unknown ("%s")', $format_key); + } } $storage_properties->addProperty(pht('Format'), $format_name); @@ -369,13 +374,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController { $box->addPropertyList($media); } - $engine = null; - try { - $engine = $file->instantiateStorageEngine(); - } catch (Exception $ex) { - // Don't bother raising this anywhere for now. - } - + $engine = $this->loadStorageEngine($file); if ($engine) { if ($engine->isChunkEngine()) { $chunkinfo = new PHUIPropertyListView(); @@ -436,4 +435,17 @@ final class PhabricatorFileInfoController extends PhabricatorFileController { } + private function loadStorageEngine(PhabricatorFile $file) { + $engine = null; + + try { + $engine = $file->instantiateStorageEngine(); + } catch (Exception $ex) { + // Don't bother raising this anywhere for now. + } + + return $engine; + } + + } diff --git a/src/applications/files/markup/PhabricatorImageRemarkupRule.php b/src/applications/files/markup/PhabricatorImageRemarkupRule.php new file mode 100644 index 0000000000..9e91bdc096 --- /dev/null +++ b/src/applications/files/markup/PhabricatorImageRemarkupRule.php @@ -0,0 +1,75 @@ +isFlatText($matches[0])) { + return $matches[0]; + } + $args = array(); + $defaults = array( + 'uri' => null, + 'alt' => null, + 'href' => null, + 'width' => null, + 'height' => null, + ); + $trimmed_match = trim($matches[2]); + if ($this->isURI($trimmed_match)) { + $args['uri'] = new PhutilURI($trimmed_match); + } else { + $parser = new PhutilSimpleOptions(); + $keys = $parser->parse($trimmed_match); + + $uri_key = ''; + foreach (array('src', 'uri', 'url') as $key) { + if (array_key_exists($key, $keys)) { + $uri_key = $key; + } + } + if ($uri_key) { + $args['uri'] = new PhutilURI($keys[$uri_key]); + } + $args += $keys; + } + + $args += $defaults; + + if ($args['href'] && !PhabricatorEnv::isValidURIForLink($args['href'])) { + $args['href'] = null; + } + + if ($args['uri']) { + $src_uri = id(new PhutilURI('/file/imageproxy/')) + ->setQueryParam('uri', (string)$args['uri']); + $img = $this->newTag( + 'img', + array( + 'src' => $src_uri, + 'alt' => $args['alt'], + 'href' => $args['href'], + 'width' => $args['width'], + 'height' => $args['height'], + )); + return $this->getEngine()->storeText($img); + } else { + return $matches[0]; + } + } + + private function isURI($uri_string) { + // Very simple check to make sure it starts with either http or https. + // If it does, we'll try to treat it like a valid URI + return preg_match('~^https?\:\/\/.*\z~i', $uri_string); + } +} diff --git a/src/applications/notification/view/PhabricatorNotificationStatusView.php b/src/applications/notification/view/PhabricatorNotificationStatusView.php index 6aecbb6dcf..988587f65c 100644 --- a/src/applications/notification/view/PhabricatorNotificationStatusView.php +++ b/src/applications/notification/view/PhabricatorNotificationStatusView.php @@ -23,4 +23,13 @@ final class PhabricatorNotificationStatusView extends AphrontTagView { ); } + protected function getTagContent() { + $have = PhabricatorEnv::getEnvConfig('notification.servers'); + if ($have) { + return pht('Connecting...'); + } else { + return pht('Notification server not enabled'); + } + } + } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php index 4621aba3c5..657fd0435e 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -293,6 +293,7 @@ final class PhabricatorPeopleProfileViewController ->setHeader($badge->getName()) ->setSubhead($badge->getFlavor()) ->setQuality($badge->getQuality()) + ->setHref($badge->getViewURI()) ->addByLine($awarder_info); $flex->addItem($item); diff --git a/src/applications/people/view/PhabricatorUserLogView.php b/src/applications/people/view/PhabricatorUserLogView.php index c467a9010d..c442cfd934 100644 --- a/src/applications/people/view/PhabricatorUserLogView.php +++ b/src/applications/people/view/PhabricatorUserLogView.php @@ -33,7 +33,6 @@ final class PhabricatorUserLogView extends AphrontView { $rows = array(); foreach ($logs as $log) { - $ip = $log->getRemoteAddr(); $session = substr($log->getSession(), 0, 6); @@ -62,7 +61,7 @@ final class PhabricatorUserLogView extends AphrontView { $log->getActorPHID() ? $handles[$log->getActorPHID()]->getName() : null, - $handles[$log->getUserPHID()]->getName(), + $username = $handles[$log->getUserPHID()]->renderLink(), $ip, $session, ); diff --git a/src/applications/phurl/conduit/PhabricatorPhurlURLEditConduitAPIMethod.php b/src/applications/phurl/conduit/PhabricatorPhurlURLEditConduitAPIMethod.php new file mode 100644 index 0000000000..2f78c87489 --- /dev/null +++ b/src/applications/phurl/conduit/PhabricatorPhurlURLEditConduitAPIMethod.php @@ -0,0 +1,18 @@ +withNgramsConstraint( + id(new PhabricatorPhurlURLNameNgrams()), + $ngrams); + } + public function withLongURLs(array $long_urls) { $this->longURLs = $long_urls; return $this; diff --git a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php index 9c91adf17d..f2e2c99399 100644 --- a/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php +++ b/src/applications/phurl/query/PhabricatorPhurlURLSearchEngine.php @@ -25,6 +25,19 @@ final class PhabricatorPhurlURLSearchEngine ->setLabel(pht('Created By')) ->setKey('authorPHIDs') ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()), + id(new PhabricatorSearchTextField()) + ->setLabel(pht('Name Contains')) + ->setKey('name') + ->setDescription(pht('Search for Phurl URLs by name substring.')), + id(new PhabricatorSearchStringListField()) + ->setLabel(pht('Aliases')) + ->setKey('aliases') + ->setDescription(pht('Search for Phurl URLs by alias.')), + id(new PhabricatorSearchStringListField()) + ->setLabel(pht('Long URLs')) + ->setKey('longurls') + ->setDescription( + pht('Search for Phurl URLs by the non-shortened URL.')), ); } @@ -35,6 +48,18 @@ final class PhabricatorPhurlURLSearchEngine $query->withAuthorPHIDs($map['authorPHIDs']); } + if ($map['name'] !== null) { + $query->withNameNgrams($map['name']); + } + + if ($map['aliases']) { + $query->withAliases($map['aliases']); + } + + if ($map['longurls']) { + $query->withLongURLs($map['longurls']); + } + return $query; } diff --git a/src/applications/phurl/storage/PhabricatorPhurlURL.php b/src/applications/phurl/storage/PhabricatorPhurlURL.php index db82e20baf..c36bf6e8cb 100644 --- a/src/applications/phurl/storage/PhabricatorPhurlURL.php +++ b/src/applications/phurl/storage/PhabricatorPhurlURL.php @@ -9,7 +9,9 @@ final class PhabricatorPhurlURL extends PhabricatorPhurlDAO PhabricatorDestructibleInterface, PhabricatorMentionableInterface, PhabricatorFlaggableInterface, - PhabricatorSpacesInterface { + PhabricatorSpacesInterface, + PhabricatorConduitResultInterface, + PhabricatorNgramsInterface { protected $name; protected $alias; @@ -103,12 +105,12 @@ final class PhabricatorPhurlURL extends PhabricatorPhurlDAO } else { $path = '/u/'.$this->getID(); } - $short_domain = PhabricatorEnv::getEnvConfig('phurl.short-uri'); - if (!$short_domain) { - return $path; + $domain = PhabricatorEnv::getEnvConfig('phurl.short-uri'); + if (!$domain) { + $domain = PhabricatorEnv::getEnvConfig('phabricator.base-uri'); } - $uri = new PhutilURI($short_domain); + $uri = new PhutilURI($domain); $uri->setPath($path); return (string)$uri; } @@ -202,4 +204,55 @@ final class PhabricatorPhurlURL extends PhabricatorPhurlDAO public function getSpacePHID() { return $this->spacePHID; } + +/* -( PhabricatorConduitResultInterface )---------------------------------- */ + + + public function getFieldSpecificationsForConduit() { + return array( + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('name') + ->setType('string') + ->setDescription(pht('URL name.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('alias') + ->setType('string') + ->setDescription(pht('The alias for the URL.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('longurl') + ->setType('string') + ->setDescription(pht('The pre-shortened URL.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('description') + ->setType('string') + ->setDescription(pht('A description of the URL.')), + ); + } + + public function getFieldValuesForConduit() { + return array( + 'name' => $this->getName(), + 'alias' => $this->getAlias(), + 'description' => $this->getDescription(), + 'urls' => array( + 'long' => $this->getLongURL(), + 'short' => $this->getRedirectURI(), + ), + ); + } + + public function getConduitSearchAttachments() { + return array(); + } + +/* -( PhabricatorNgramInterface )------------------------------------------ */ + + + public function newNgrams() { + return array( + id(new PhabricatorPhurlURLNameNgrams()) + ->setValue($this->getName()), + ); + } + } diff --git a/src/applications/phurl/storage/PhabricatorPhurlURLNameNgrams.php b/src/applications/phurl/storage/PhabricatorPhurlURLNameNgrams.php new file mode 100644 index 0000000000..0a760e32b9 --- /dev/null +++ b/src/applications/phurl/storage/PhabricatorPhurlURLNameNgrams.php @@ -0,0 +1,18 @@ +addTextCrumb($title); } + $nav->addClass('application-search-view'); require_celerity_resource('application-search-view-css'); return $this->newPage() @@ -327,8 +328,7 @@ final class PhabricatorApplicationSearchController ->setTitle(pht('Query: %s', $title)) ->setCrumbs($crumbs) ->setNavigation($nav) - ->appendChild($body) - ->addClass('application-search-view'); + ->appendChild($body); } private function processEditRequest() { @@ -419,6 +419,7 @@ final class PhabricatorApplicationSearchController ->setObjectList($list) ->addClass('application-search-results'); + $nav->addClass('application-search-view'); require_celerity_resource('application-search-view-css'); return $this->newPage() @@ -426,7 +427,6 @@ final class PhabricatorApplicationSearchController ->setTitle(pht('Saved Queries')) ->setCrumbs($crumbs) ->setNavigation($nav) - ->addClass('application-search-view') ->appendChild($box); } diff --git a/src/applications/settings/setting/PhabricatorConpherenceColumnMinimizeSetting.php b/src/applications/settings/setting/PhabricatorConpherenceColumnMinimizeSetting.php new file mode 100644 index 0000000000..7ba4b27103 --- /dev/null +++ b/src/applications/settings/setting/PhabricatorConpherenceColumnMinimizeSetting.php @@ -0,0 +1,12 @@ + true, + self::CONFIG_COLUMN_SCHEMA => array( + 'name' => 'text64', + 'flavor' => 'text128', + 'status' => 'text32', + 'tokenImagePHID' => 'phid?', + 'builtinKey' => 'text32?', + ), + self::CONFIG_KEY_SCHEMA => array( + 'key_creator' => array( + 'columns' => array('creatorPHID', 'dateModified'), + ), + 'key_builtin' => array( + 'columns' => array('builtinKey'), + 'unique' => true, + ), + ), + ) + parent::getConfiguration(); + } + + public function getTableName() { + return 'token_token'; + } + + public function generatePHID() { + return PhabricatorPHID::generateNewPHID( + PhabricatorTokenTokenPHIDType::TYPECONST); + } + + public static function initializeNewToken(PhabricatorUser $actor) { + $app = id(new PhabricatorApplicationQuery()) + ->setViewer($actor) + ->withClasses(array('PhabricatorTokensApplication')) + ->executeOne(); + + $token = id(new self()) + ->setCreatorPHID($actor->getPHID()) + ->setStatus(self::STATUS_ACTIVE) + ->setTokenImagePHID(''); + return $token; + } + + public function isArchived() { + return ($this->getStatus() == self::STATUS_ARCHIVED); + } + + public static function getStatusNameMap() { + return array( + self::STATUS_ACTIVE => pht('Active'), + self::STATUS_ARCHIVED => pht('Archived'), + ); + } + + public function getTokenImageURI() { + return $this->getTokenImageFile()->getBestURI(); + } + + public function attachTokenImageFile(PhabricatorFile $file) { + $this->tokenImageFile = $file; + return $this; + } + + public function getTokenImageFile() { + return $this->assertAttached($this->tokenImageFile); + } + + public function getViewURI() { + return '/tokens/view/'.$this->getID().'/'; + } + + +/* -( PhabricatorDestructibleInterface )----------------------------------- */ + + public function destroyObjectPermanently( + PhabricatorDestructionEngine $engine) { + + $this->openTransaction(); + + $tokens = id(new PhabricatorTokenGiven()) + ->loadAllWhere('tokenPHID = %s', $this->getPHID()); + foreach ($tokens as $token) { + $token->delete(); + } + if ($this->getTokenImagePHID()) { + id(new PhabricatorFile()) + ->loadOneWhere('filePHID = %s', $this->getTokenImagePHID()) + ->delete(); + } + + $this->delete(); + + $this->saveTransaction(); + } + +/* -( PhabricatorSubscribableInterface Implementation )-------------------- */ + + + public function isAutomaticallySubscribed($phid) { + return false; + } + + +/* -( PhabricatorConduitResultInterface )---------------------------------- */ + + + public function getFieldSpecificationsForConduit() { + return array( + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('name') + ->setType('string') + ->setDescription(pht('The name of the token.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('flavor') + ->setType('string') + ->setDescription(pht('Token flavor.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('status') + ->setType('string') + ->setDescription(pht('Archived or active status.')), + ); + } + + public function getFieldValuesForConduit() { + return array( + 'name' => $this->getName(), + 'flavor' => $this->getFlavor(), + 'status' => $this->getStatus(), + ); + } + + public function getConduitSearchAttachments() { + return array(); + } + +} diff --git a/src/view/form/AphrontFormView.php b/src/view/form/AphrontFormView.php index 3c92f72c88..3022a91f9c 100644 --- a/src/view/form/AphrontFormView.php +++ b/src/view/form/AphrontFormView.php @@ -9,11 +9,11 @@ final class AphrontFormView extends AphrontView { private $encType; private $workflow; private $id; - private $shaded = false; private $sigils = array(); private $metadata; private $controls = array(); private $fullWidth = false; + private $classes = array(); public function setMetadata($metadata) { $this->metadata = $metadata; @@ -44,11 +44,6 @@ final class AphrontFormView extends AphrontView { return $this; } - public function setShaded($shaded) { - $this->shaded = $shaded; - return $this; - } - public function addHiddenInput($key, $value) { $this->data[$key] = $value; return $this; @@ -64,6 +59,11 @@ final class AphrontFormView extends AphrontView { return $this; } + public function addClass($class) { + $this->classes[] = $class; + return $this; + } + public function setFullWidth($full_width) { $this->fullWidth = $full_width; return $this; @@ -149,7 +149,7 @@ final class AphrontFormView extends AphrontView { return phabricator_form( $this->getViewer(), array( - 'class' => $this->shaded ? 'phui-form-shaded' : null, + 'class' => implode(' ', $this->classes), 'action' => $this->action, 'method' => $this->method, 'enctype' => $this->encType, diff --git a/src/view/form/control/PhabricatorRemarkupControl.php b/src/view/form/control/PhabricatorRemarkupControl.php index f32e58fb29..5fc275e063 100644 --- a/src/view/form/control/PhabricatorRemarkupControl.php +++ b/src/view/form/control/PhabricatorRemarkupControl.php @@ -203,6 +203,10 @@ final class PhabricatorRemarkupControl extends AphrontFormTextAreaControl { $classes[] = 'remarkup-assist-button'; } + if ($action == 'fa-cloud-upload') { + $classes[] = 'remarkup-assist-upload'; + } + $href = idx($spec, 'href', '#'); if ($href == '#') { $meta = array('action' => $action); diff --git a/src/view/page/PhabricatorStandardPageView.php b/src/view/page/PhabricatorStandardPageView.php index d7e3a643d5..dc2dfe186e 100644 --- a/src/view/page/PhabricatorStandardPageView.php +++ b/src/view/page/PhabricatorStandardPageView.php @@ -136,6 +136,11 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView return (bool)$this->getUserPreference($column_key, false); } + public function getDurableColumnMinimize() { + $column_key = PhabricatorConpherenceColumnMinimizeSetting::SETTINGKEY; + return (bool)$this->getUserPreference($column_key, false); + } + public function addQuicksandConfig(array $config) { $this->quicksandConfig = $config + $this->quicksandConfig; return $this; @@ -480,12 +485,17 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView $durable_column = null; if ($this->getShowDurableColumn()) { $is_visible = $this->getDurableColumnVisible(); + $is_minimize = $this->getDurableColumnMinimize(); $durable_column = id(new ConpherenceDurableColumnView()) ->setSelectedConpherence(null) ->setUser($user) ->setQuicksandConfig($this->buildQuicksandConfig()) ->setVisible($is_visible) + ->setMinimize($is_minimize) ->setInitialLoad(true); + if ($is_minimize) { + $this->classes[] = 'minimize-column'; + } } Javelin::initBehavior('quicksand-blacklist', array( diff --git a/webroot/rsrc/css/aphront/multi-column.css b/webroot/rsrc/css/aphront/multi-column.css index badae756fe..ad9931ce0b 100644 --- a/webroot/rsrc/css/aphront/multi-column.css +++ b/webroot/rsrc/css/aphront/multi-column.css @@ -182,39 +182,3 @@ margin: 0 0 16px; } } - -/* Make Dashboards with Durable reasonably display on homepage narrow widths */ -@media (max-width: 1300px) { - .device-desktop.with-durable-column .dashboard-view - .aphront-multi-column-inner { - display: block; - width: auto; - } - .device-desktop.with-durable-column .dashboard-view - .aphront-multi-column-column-outer { - display: block; - border: none; - } - .device-desktop.with-durable-column .dashboard-view - .aphront-multi-column-column.mlr { - margin: 0; - } - .device-desktop.with-durable-column .dashboard-view - .aphront-multi-column-fluid .aphront-multi-column-2-up - .aphront-multi-column-column-outer.half { - width: auto; - margin: 0 0 16px; - } - .device-desktop.with-durable-column .dashboard-view - .aphront-multi-column-fluid .aphront-multi-column-2-up - .aphront-multi-column-column-outer.thirds { - width: auto; - margin: 0 0 16px; - } - .device-desktop.with-durable-column .dashboard-view - .aphront-multi-column-fluid .aphront-multi-column-2-up - .aphront-multi-column-column-outer.third { - width: auto; - margin: 0 0 16px; - } -} diff --git a/webroot/rsrc/css/application/base/standard-page-view.css b/webroot/rsrc/css/application/base/standard-page-view.css index 43215df445..36294ca288 100644 --- a/webroot/rsrc/css/application/base/standard-page-view.css +++ b/webroot/rsrc/css/application/base/standard-page-view.css @@ -29,6 +29,10 @@ body.white-background { color: {$greytext}; } +.with-durable-column .phabricator-standard-page-footer { + margin: 36px 16px 28px; +} + .device .phabricator-standard-page-footer { margin: 24px 8px 16px; } diff --git a/webroot/rsrc/css/application/conpherence/durable-column.css b/webroot/rsrc/css/application/conpherence/durable-column.css index 8872e2fb22..f4320ed1a2 100644 --- a/webroot/rsrc/css/application/conpherence/durable-column.css +++ b/webroot/rsrc/css/application/conpherence/durable-column.css @@ -2,63 +2,34 @@ * @provides conpherence-durable-column-view */ -.with-durable-column .phabricator-standard-page-body { - margin-right: 300px; -} - -.with-durable-margin .phabricator-standard-page-body { - margin-right: 312px; -} - -.with-durable-column .phabricator-main-menu { - padding-right: 304px; -} - -.with-durable-margin .phabricator-main-menu { - padding-right: 316px; -} - -.with-durable-column -.phabricator-global-upload-instructions { - font-size: 28px; - width: 50%; -} - .global-upload-mask { pointer-events: none; } -.with-durable-column .global-upload-mask { - right: 300px; -} - -.with-durable-margin .global-upload-mask { - right: 312px; -} - .conpherence-durable-column { position: fixed; - top: 0; bottom: 0; - right: 0; - width: 300px; + right: 16px; + width: 400px; + height: 360px; background: #fff; + border-top-right-radius: 3px; + border-top-left-radius: 3px; + box-shadow: 0px 1px 8px rgba(55,55,55, .3); } -.with-durable-margin .conpherence-durable-column { - border-right: 12px solid {$lightgreybackground}; -} - -.conpherence-durable-column .loading-mask { - position: absolute; - top: 90px; - bottom: 0; - right: 1px; - width: 298px; - background: #fff; +.device .conpherence-durable-column { display: none; - opacity: .6; - z-index: 2; +} + +.conpherence-durable-column .conpherence-transaction-image { + float: left; + border-radius: 3px; + height: 24px; + width: 24px; + background-size: 24px; + position: absolute; + top: 5px; } .device-desktop .conpherence-durable-column.loading .loading-mask { @@ -69,129 +40,117 @@ z-index: 1; } -.conpherence-durable-column-header .phabricator-application-menu { - display: block; - float: right; - padding-right: 4px; - width: 36px; +.conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-name { + display: none; } -.conpherence-durable-column-header -.phabricator-application-menu .phui-list-item-view.core-menu-item { - display: block; + +.conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-view { + margin: 0; + width: 28px; + height: 34px; + min-width: 28px; } -.conpherence-durable-column-header -.phabricator-application-menu .phui-list-item-name { - display: none; -} -.conpherence-durable-column-header -.phabricator-application-menu .phui-list-item-view { - float: left; - position: relative; - width: 36px; - height: 36px; - margin-top: 4px; -} -.conpherence-durable-column-header -.phabricator-application-menu .phui-list-item-href { - background: transparent; - border: none; - padding: 0; -} -.conpherence-durable-column-header -.phabricator-dark-menu .phui-list-item-type-link { - background: transparent; -} -.conpherence-durable-column-header -.phabricator-application-menu -.phui-list-item-view.core-menu-item { - display: block; + +.conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-href { + background: transparent; + border: none; + padding: 0; } .conpherence-durable-column-header { - border-left: 1px solid rgba({$alphablack},.1); - border-right: 1px solid rgba({$alphablack},.1); + border-top-right-radius: 3px; + border-top-left-radius: 3px; + background-color: #525867; +} + +.conpherence-durable-column-header:hover { + cursor: pointer; + background-color: #5f6572; +} + +.conpherence-durable-column-header .phabricator-application-menu { + margin-right: 8px; +} + +.conpherence-durable-column-header + .phabricator-main-menu-dropdown.phui-list-sidenav { + top: 30px; } .conpherence-durable-column-header-text { float: left; - padding: 13px 0 12px 12px; - font-size: 15px; - color: {$hoverwhite}; - width: 230px; + padding: 8px 0 8px 10px; + color: #fff; + width: 260px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; + text-shadow: 1px 1px 0 rgba(0,0,0,.6); +} + +.conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-icon.phui-font-fa { + font-size: 15px; + margin: 0; + height: 15px; + width: 15px; + padding: 10px 8px 10px 8px; } .conpherence-durable-column-header-text .phui-icon-view { - color: {$hoverwhite}; + color: #fff; + text-shadow: 1px 1px 0 rgba(0,0,0,.6); } .conpherence-durable-column-icon-bar { - height: 38px; - padding: 4px; + width: 36px; background-color: {$lightgreybackground}; + border-right: 1px solid {$thinblueborder}; + position: absolute; + top: 0; + left: 0; + bottom: 0; } .conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon { - float: left; + height: 28px; + width: 28px; + padding: 4px; display: block; - height: 34px; - width: 34px; - border: 2px solid transparent; - border-radius: 3px; - margin: 0 4px 0 0; -} - -.conpherence-durable-column-icon-bar .conpherence-durable-column-search-button { - margin: 4px 0px 0px 0px; -} -.conpherence-durable-column-icon-bar .phui-button-bar { -} -.conpherence-durable-column-icon-bar .phui-button-bar a.button.has-icon { - height: 21px; -} -.conpherence-durable-column-icon-bar .phui-button-bar .button .phui-icon-view { - top: 8px; } .conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon.selected { - border-color: {$sky}; + background-color: rgba({$alphablue},.1); } .conpherence-durable-column-icon-bar .conpherence-durable-column-thread-icon span { - position: relative; display: block; - width: 30px; - height: 30px; - top: 2px; - left: 2px; - background-size: 30px 30px; + width: 28px; + height: 28px; + border-radius: 3px; + background-size: 28px 28px; } .conpherence-durable-column-body { position: absolute; - top: 44px; + top: 34px; bottom: 0; right: 0; left: 0; - border-left: 1px solid {$lightblueborder}; -} - -.with-durable-margin .conpherence-durable-column-body { - border-right: 1px solid {$lightblueborder}; } .conpherence-durable-column-main { position: absolute; - top: 46px; - bottom: 134px; - left: 0; + top: 0; + bottom: 36px; + left: 34px; right: 0; overflow-x: hidden; - border-top: 1px solid {$thinblueborder}; } .conpherence-durable-column-transactions { @@ -201,9 +160,9 @@ .conpherence-durable-column-transactions .conpherence-transaction-view.conpherence-edited { color: {$lightgreytext}; - font-size: {$smallerfontsize}; margin: 0; padding: 0; + font-style: italic; } .conpherence-durable-column-transactions .conpherence-edited @@ -218,32 +177,31 @@ min-height: 0; } -.conpherence-durable-column-transactions - .conpherence-transaction-view +.conpherence-durable-column-transactions .conpherence-transaction-view .conpherence-message { - word-wrap: break-word; + word-wrap: break-word; } .conpherence-durable-column-transactions .conpherence-transaction-detail { border: 0; - margin: 0; + margin: 0 0 0 32px; } .conpherence-durable-column-transactions .conpherence-transaction-detail -.conpherence-transaction-header { - background: none; - padding: 0 0 2px 0; + .conpherence-transaction-header { + background: none; + padding: 0 0 2px 0; } .conpherence-durable-column-transactions .conpherence-transaction-view.date-marker { - margin: 20px 0px 8px; + margin: 12px 0 0; } .conpherence-durable-column-transactions .conpherence-transaction-view.date-marker .date { left: 0; - font-size: {$smallerfontsize}; + font-size: {$normalfontsize}; top: -14px; padding: 0 6px 0 0; } @@ -295,42 +253,78 @@ img { position: absolute; left: 0; right: 0; - bottom: 34px; - height: 100px; + bottom: 0; + height: 36px; margin: 0; - border-width: 1px 0; + border-width: 1px 0 0 0; border-style: solid; border-top-color: {$thinblueborder}; - border-bottom-color: {$thinblueborder}; - padding: 8px 12px; + padding: 8px; width: 100%; resize: none; } .conpherence-durable-column-textarea:focus { outline: 0; - border-top-color: {$sky}; - border-bottom-color: {$sky}; + border-top-color: {$lightblueborder}; box-shadow: none; } -.conpherence-durable-column-footer { - position: absolute; - height: 26px; - padding: 4px 8px 4px 12px; - left: 0; - right: 0; - bottom: 0; - background-color: {$lightgreybackground}; + +/* Minimized Column */ + +.minimize-column .conpherence-durable-column { + height: 32px; + width: 240px; + box-shadow: none; } -.conpherence-durable-column-footer button { - float: right; +.minimize-column .conpherence-durable-column .conpherence-durable-column-body { + display: none; } -.conpherence-durable-column-status { - vertical-align: middle; - line-height: 24px; - font-size: {$smallerfontsize}; - color: {$lightbluetext}; +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header { + background-color: rgba({$alphablue},.15); +} + +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header:hover { + background-color: rgba({$alphablue},.2); +} + +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header-text { + width: 100px; + color: {$darkbluetext}; + text-shadow: none; +} + +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header-text .phui-icon-view { + color: {$darkbluetext}; + text-shadow: none; +} + +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-icon.phui-font-fa { + color: {$bluetext}; +} + +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-icon.phui-font-fa:hover { + color: {$darkbluetext}; +} + +.minimize-column .conpherence-durable-column + .conpherence-durable-column-header .phabricator-application-menu + .phui-list-item-icon.phui-font-fa:before { + content: "\f151"; +} + +.minimize-column .conpherence-durable-column .phabricator-application-menu + .conpherence-settings-icon { + display: none; } diff --git a/webroot/rsrc/css/application/conpherence/message-pane.css b/webroot/rsrc/css/application/conpherence/message-pane.css index 7209ac7085..6df4cb8828 100644 --- a/webroot/rsrc/css/application/conpherence/message-pane.css +++ b/webroot/rsrc/css/application/conpherence/message-pane.css @@ -58,16 +58,12 @@ left: 240px; right: 240px; top: 103px; - bottom: 148px; + bottom: 122px; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; } -.conpherence-logged-out .conpherence-message-pane .conpherence-messages { - bottom: 42px; -} - .conpherence-messages.jx-scrollbar-frame { overflow-y: hidden; } @@ -77,7 +73,7 @@ padding-top: 20px; } -.conpherence-messages .jx-scrollbar-content .conpherence-edited:last-child { +.conpherence-messages .conpherence-edited:last-child { padding-bottom: 20px; } @@ -93,19 +89,9 @@ box-shadow: none; } -.conpherence-message-pane .messages-loading-mask { - opacity: .6; - background: #fff; - display: none; -} - -.loading .messages-loading-mask { - display: block; -} - .conpherence-message-pane .phui-form-view { border-width: 0; - height: 140px; + height: 110px; padding: 0 20px 12px; position: fixed; bottom: 0; @@ -113,18 +99,44 @@ right: 241px; } +.conpherence-room-status { + font-size: {$smallerfontsize}; + color: {$lightgreytext}; + font-style: italic; + position: absolute; + bottom: 6px; + left: 24px; +} + +.device .conpherence-room-status { + display: none; +} + +.conpherence-no-pontificate .conpherence-message-pane .phui-form-view { + border-top: 1px solid {$thinblueborder}; + text-align: center; +} + +.conpherence-no-pontificate .conpherence-message-pane + .aphront-form-control-submit button, +.conpherence-no-pontificate .conpherence-message-pane + .aphront-form-control-submit a.button { + margin: 4px 0 0 0; + float: none; +} + +.conpherence-no-pontificate .phui-form-view .aphront-form-instructions { + margin: 24px 0 16px; + width: 100%; + padding: 0; + color: {$bluetext}; + font-size: {$biggestfontsize}; +} + .device .conpherence-message-pane .phui-form-view { padding: 8px 8px; } -.conpherence-message-pane .phui-form-view.login-to-participate { - height: 26px; -} - -.conpherence-message-pane .login-to-participate a.button { - float: right; -} - .conpherence-message-pane .aphront-form-control-submit button, .conpherence-message-pane .aphront-form-control-submit a.button { margin-top: 6px; @@ -152,13 +164,27 @@ border-bottom: none; border-top-left-radius: 3px; border-top-right-radius: 3px; - background-color: #f7f7f7; + background-color: {$lightgreybackground}; } .device .conpherence-message-pane .remarkup-assist-bar { + position: absolute; + top: 12px; + left: 12px; + background: {$bluebackground}; + border-radius: 3px; + border: none; +} + +.device .remarkup-assist-button, +.device .remarkup-assist-separator { display: none; } +.device .remarkup-assist-button.remarkup-assist-upload { + display: block; +} + .device .conpherence-message-pane .phui-form-view { left: 0; right: 0; @@ -313,7 +339,7 @@ } .conpherence-message-pane .remarkup-assist-textarea { - height: 80px; + height: 68px; padding: 8px; border: 2px solid {$lightgreyborder}; border-top: 1px solid {$thinblueborder}; @@ -334,7 +360,7 @@ .device .conpherence-message-pane .remarkup-assist-textarea { margin: 0; - padding: 8px 68px 8px 8px; + padding: 7px 8px 6px 30px; width: 100%; height: 34px; resize: none; @@ -364,3 +390,13 @@ max-height: 200px; } +.conpherence-transaction-collapsed .conpherence-transaction-image, +.conpherence-transaction-collapsed .conpherence-transaction-header { + display: none; +} + +.conpherence-message-pane + .conpherence-transaction-collapsed.conpherence-transaction-view { + margin-top: 0; + margin-bottom: 0; +} diff --git a/webroot/rsrc/css/phui/phui-form-view.css b/webroot/rsrc/css/phui/phui-form-view.css index 3cf5111692..19f74c975a 100644 --- a/webroot/rsrc/css/phui/phui-form-view.css +++ b/webroot/rsrc/css/phui/phui-form-view.css @@ -14,12 +14,6 @@ padding: 0; } -/* only used in transaction comments */ -.phui-form-shaded .phui-form-view { - border-bottom: 1px solid #D4DAE0; - background: #F4F5F8; -} - .phui-form-view label.aphront-form-label { padding-top: 5px; width: 19%; diff --git a/webroot/rsrc/css/phui/workboards/phui-workboard.css b/webroot/rsrc/css/phui/workboards/phui-workboard.css index 089fbcf0a5..df51e7623d 100644 --- a/webroot/rsrc/css/phui/workboards/phui-workboard.css +++ b/webroot/rsrc/css/phui/workboards/phui-workboard.css @@ -22,14 +22,6 @@ background-color: #fff; } -.device-desktop.with-durable-column .phui-workboard-view-shadow { - right: 300px; -} - -.device-desktop.with-durable-margin .phui-workboard-view-shadow { - right: 312px; -} - .phui-workboard-view-shadow::-webkit-scrollbar { height: 8px; width: 8px; diff --git a/webroot/rsrc/js/application/conpherence/behavior-durable-column.js b/webroot/rsrc/js/application/conpherence/behavior-durable-column.js index 9c3d2bba39..812be0f082 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-durable-column.js +++ b/webroot/rsrc/js/application/conpherence/behavior-durable-column.js @@ -25,16 +25,13 @@ JX.behavior('durable-column', function(config, statics) { } var userVisible = config.visible; + var userMinimize = config.minimize; var show = null; var loadThreadID = null; var scrollbar = null; var margin = JX.Scrollbar.getScrollbarControlMargin(); - var columnWidth = (300 + margin); - // This is the smallest window size where we'll enable the column. - var minimumViewportWidth = (920 - margin); - var quick = JX.$('phabricator-standard-page-body'); function _getColumnNode() { @@ -46,17 +43,8 @@ JX.behavior('durable-column', function(config, statics) { return JX.DOM.find(column, 'div', 'conpherence-durable-column-main'); } - function _isViewportWideEnoughForColumn() { - var viewport = JX.Vector.getViewport(); - if (viewport.x < minimumViewportWidth) { - return false; - } else { - return true; - } - } - function _updateColumnVisibility() { - var new_value = (userVisible && _isViewportWideEnoughForColumn()); + var new_value = (userVisible); if (new_value !== show) { show = new_value; _drawColumn(show); @@ -67,20 +55,27 @@ JX.behavior('durable-column', function(config, statics) { userVisible = !userVisible; _updateColumnVisibility(); - new JX.Request(config.settingsURI) + new JX.Request(config.visibleURI) .setData({value: (show ? 1 : 0)}) .send(); } + function _minimizeColumn(e) { + e.kill(); + userMinimize = !userMinimize; + JX.DOM.alterClass(document.body, 'minimize-column', userMinimize); + JX.Stratcom.invoke('resize'); + + new JX.Request(config.minimizeURI) + .setData({value: (userMinimize ? 1 : 0)}) + .send(); + } + function _drawColumn(visible) { JX.DOM.alterClass( document.body, 'with-durable-column', visible); - JX.DOM.alterClass( - document.body, - 'with-durable-margin', - visible && !!margin); var column = _getColumnNode(); if (visible) { @@ -91,16 +86,6 @@ JX.behavior('durable-column', function(config, statics) { } JX.Quicksand.setFrame(visible ? quick : null); - // When we activate the column, adjust the tablet breakpoint so that we - // convert the left side of the screen to tablet mode on narrow displays. - var breakpoint; - if (visible) { - breakpoint = minimumViewportWidth + columnWidth; - } else { - breakpoint = minimumViewportWidth; - } - JX.Device.setTabletBreakpoint(breakpoint); - JX.Stratcom.invoke('resize'); } @@ -108,6 +93,11 @@ JX.behavior('durable-column', function(config, statics) { .setHandler(_toggleColumn) .register(); + JX.Stratcom.listen( + 'click', + 'conpherence-minimize-window', + _minimizeColumn); + scrollbar = new JX.Scrollbar(_getColumnScrollNode()); JX.Quicksand.setFrame(userVisible ? quick : null); diff --git a/webroot/rsrc/js/application/conpherence/behavior-pontificate.js b/webroot/rsrc/js/application/conpherence/behavior-pontificate.js index b810a24241..5f9e24a915 100644 --- a/webroot/rsrc/js/application/conpherence/behavior-pontificate.js +++ b/webroot/rsrc/js/application/conpherence/behavior-pontificate.js @@ -10,7 +10,7 @@ JX.behavior('conpherence-pontificate', function() { - var onsubmit = function(e) { + var _sendMessage = function(e) { e.kill(); var form = e.getNode('tag:form'); var threadManager = JX.ConpherenceThreadManager.getInstance(); @@ -20,6 +20,29 @@ JX.behavior('conpherence-pontificate', function() { JX.Stratcom.listen( ['submit', 'didSyntheticSubmit'], 'conpherence-pontificate', - onsubmit); + _sendMessage); + + // Send on enter if the shift key is not held. + JX.Stratcom.listen( + 'keydown', + 'conpherence-pontificate', + function(e) { + if (e.getSpecialKey() != 'return') { + return; + } + + var raw = e.getRawEvent(); + if (raw.shiftKey) { + // If the shift key is pressed, let the browser write a newline into + // the textarea. + return; + } + + // From here on, interpret this as a "send" action, not a literal + // newline. + e.kill(); + + _sendMessage(e); + }); }); diff --git a/webroot/rsrc/js/application/projects/WorkboardColumn.js b/webroot/rsrc/js/application/projects/WorkboardColumn.js index ced39dcd73..81fba84077 100644 --- a/webroot/rsrc/js/application/projects/WorkboardColumn.js +++ b/webroot/rsrc/js/application/projects/WorkboardColumn.js @@ -222,6 +222,7 @@ JX.install('WorkboardColumn', { var points = {}; var count = 0; + var decimal_places = 0; for (var phid in cards) { var card = cards[phid]; @@ -238,6 +239,15 @@ JX.install('WorkboardColumn', { points[status] = 0; } points[status] += card_points; + + // Count the number of decimal places in the point value with the + // most decimal digits. We'll use the same precision when rendering + // the point sum. This avoids rounding errors and makes the display + // a little more consistent. + var parts = card_points.toString().split('.'); + if (parts[1]) { + decimal_places = Math.max(decimal_places, parts[1].length); + } } count++; @@ -247,6 +257,7 @@ JX.install('WorkboardColumn', { for (var k in points) { total_points += points[k]; } + total_points = total_points.toFixed(decimal_places); var limit = this.getPointLimit();