mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Conpherence - make ZXXX
monograms a bit more useful.
Summary: Ref T7756. Now viewing individual threads in Conpherence is `ZXXX` driven. Also adds remarkup support. Test Plan: clicked around on list of conpherences in full view and it worked. selected 'view in conpherence' action from column and loaded correct `ZXXX` uri. Typed `ZXXX` in Maniphest and saw it link to Conpherence room. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7756 Differential Revision: https://secure.phabricator.com/D12397
This commit is contained in:
parent
f12839ffd4
commit
dd22db18ff
8 changed files with 50 additions and 24 deletions
|
@ -356,7 +356,7 @@ return array(
|
|||
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
|
||||
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0a5192c4',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => '7ffa744f',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => 'eaf57226',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => 'e5826953',
|
||||
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
|
||||
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
|
||||
'rsrc/js/application/conpherence/behavior-widget-pane.js' => '31b18ee7',
|
||||
|
@ -559,7 +559,7 @@ return array(
|
|||
'javelin-behavior-boards-dropdown' => '0ec56e1d',
|
||||
'javelin-behavior-choose-control' => '6153c708',
|
||||
'javelin-behavior-config-reorder-fields' => '14a827de',
|
||||
'javelin-behavior-conpherence-menu' => 'eaf57226',
|
||||
'javelin-behavior-conpherence-menu' => 'e5826953',
|
||||
'javelin-behavior-conpherence-pontificate' => '21ba5861',
|
||||
'javelin-behavior-conpherence-widget-pane' => '31b18ee7',
|
||||
'javelin-behavior-countdown-timer' => 'e4cc26b3',
|
||||
|
@ -1874,6 +1874,20 @@ return array(
|
|||
'javelin-workflow',
|
||||
'javelin-magical-init',
|
||||
),
|
||||
'e5826953' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'javelin-behavior-device',
|
||||
'javelin-history',
|
||||
'javelin-vector',
|
||||
'javelin-scrollbar',
|
||||
'phabricator-title',
|
||||
'phabricator-shaped-request',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'e58bf807' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-util',
|
||||
|
@ -1909,20 +1923,6 @@ return array(
|
|||
'phabricator-phtize',
|
||||
'javelin-dom',
|
||||
),
|
||||
'eaf57226' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'javelin-behavior-device',
|
||||
'javelin-history',
|
||||
'javelin-vector',
|
||||
'javelin-scrollbar',
|
||||
'phabricator-title',
|
||||
'phabricator-shaped-request',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'efe49472' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
|
|
@ -258,6 +258,7 @@ phutil_register_library_map(array(
|
|||
'ConpherenceThreadListView' => 'applications/conpherence/view/ConpherenceThreadListView.php',
|
||||
'ConpherenceThreadMailReceiver' => 'applications/conpherence/mail/ConpherenceThreadMailReceiver.php',
|
||||
'ConpherenceThreadQuery' => 'applications/conpherence/query/ConpherenceThreadQuery.php',
|
||||
'ConpherenceThreadRemarkupRule' => 'applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php',
|
||||
'ConpherenceThreadSearchEngine' => 'applications/conpherence/query/ConpherenceThreadSearchEngine.php',
|
||||
'ConpherenceThreadTestCase' => 'applications/conpherence/__tests__/ConpherenceThreadTestCase.php',
|
||||
'ConpherenceTransaction' => 'applications/conpherence/storage/ConpherenceTransaction.php',
|
||||
|
@ -3451,6 +3452,7 @@ phutil_register_library_map(array(
|
|||
'ConpherenceThreadListView' => 'AphrontView',
|
||||
'ConpherenceThreadMailReceiver' => 'PhabricatorObjectMailReceiver',
|
||||
'ConpherenceThreadQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
|
||||
'ConpherenceThreadRemarkupRule' => 'PhabricatorObjectRemarkupRule',
|
||||
'ConpherenceThreadSearchEngine' => 'PhabricatorApplicationSearchEngine',
|
||||
'ConpherenceThreadTestCase' => 'ConpherenceTestCase',
|
||||
'ConpherenceTransaction' => 'PhabricatorApplicationTransaction',
|
||||
|
|
|
@ -22,6 +22,12 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication {
|
|||
return "\xE2\x9C\x86";
|
||||
}
|
||||
|
||||
public function getRemarkupRules() {
|
||||
return array(
|
||||
new ConpherenceThreadRemarkupRule(),
|
||||
);
|
||||
}
|
||||
|
||||
public function getEventListeners() {
|
||||
return array(
|
||||
new ConpherenceHovercardEventListener(),
|
||||
|
@ -30,6 +36,7 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication {
|
|||
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/Z(?P<id>[1-9]\d*)' => 'ConpherenceViewController',
|
||||
'/conpherence/' => array(
|
||||
'' => 'ConpherenceListController',
|
||||
'thread/(?P<id>[1-9]\d*)/' => 'ConpherenceListController',
|
||||
|
@ -62,6 +69,7 @@ final class PhabricatorConpherenceApplication extends PhabricatorApplication {
|
|||
public function getQuicksandURIPatternBlacklist() {
|
||||
return array(
|
||||
'/conpherence/.*',
|
||||
'/Z\d+',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ final class PhabricatorConpherenceThreadPHIDType extends PhabricatorPHIDType {
|
|||
$data = $thread->getDisplayData($query->getViewer());
|
||||
$handle->setName($data['title']);
|
||||
$handle->setFullName($data['title']);
|
||||
$handle->setURI('/conpherence/'.$thread->getID().'/');
|
||||
$handle->setURI('/'.$thread->getMonogram());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
final class ConpherenceThreadRemarkupRule
|
||||
extends PhabricatorObjectRemarkupRule {
|
||||
|
||||
protected function getObjectNamePrefix() {
|
||||
return 'Z';
|
||||
}
|
||||
|
||||
protected function loadObjects(array $ids) {
|
||||
$viewer = $this->getEngine()->getConfig('viewer');
|
||||
$threads = id(new ConpherenceThreadQuery())
|
||||
->setViewer($viewer)
|
||||
->withIDs($ids)
|
||||
->execute();
|
||||
return mpull($threads, null, 'getID');
|
||||
}
|
||||
|
||||
}
|
|
@ -408,7 +408,7 @@ final class ConpherenceDurableColumnView extends AphrontTagView {
|
|||
array(
|
||||
'name' => pht('View in Conpherence'),
|
||||
'disabled' => false,
|
||||
'href' => '/conpherence/'.$conpherence->getID().'/',
|
||||
'href' => '/'.$conpherence->getMonogram(),
|
||||
'icon' => 'fa-comments',
|
||||
'key' => 'go_conpherence',
|
||||
),
|
||||
|
|
|
@ -70,7 +70,7 @@ final class ConpherenceThreadListView extends AphrontView {
|
|||
|
||||
$user = $this->getUser();
|
||||
|
||||
$uri = $this->baseURI.$thread->getID().'/';
|
||||
$uri = '/'.$thread->getMonogram();
|
||||
$data = $thread->getDisplayData($user);
|
||||
$icon = null;
|
||||
if ($thread->getIsRoom()) {
|
||||
|
|
|
@ -155,11 +155,8 @@ JX.behavior('conpherence-menu', function(config) {
|
|||
}
|
||||
|
||||
function updatePageData(data) {
|
||||
var uri_suffix = _thread.selected + '/';
|
||||
if (data.use_base_uri) {
|
||||
uri_suffix = '';
|
||||
}
|
||||
JX.History.replace(config.baseURI + uri_suffix);
|
||||
var uri = '/Z' + _thread.selected;
|
||||
JX.History.replace(uri);
|
||||
if (data.title) {
|
||||
JX.Title.setTitle(data.title);
|
||||
} else if (_thread.node) {
|
||||
|
|
Loading…
Reference in a new issue