Skip to content

Commit 541e3d9

Browse files
committed
Conpherence - remove room vs message distinction as far as users are concerned
Summary: Ref T8488, T8469, T8485. This is done in regards to T8488 as far as users are concerned. There's still some classes, and etc. that should be re-named probably. T8469 and T8485 are basically moot now though. Rather than having "Send Message" exposed, just expose "Create Room". Users get the full form. One change is "title" is now required. This diff removes the concept of "isRoom" entirely. Test Plan: Verifed a user with no conpherences had sensible data in both column view and full conpherence view. Created rooms with various policies and things worked well. Reviewers: epriestley Reviewed By: epriestley Subscribers: chad, epriestley, Korvin Maniphest Tasks: T8469, T8485, T8488 Differential Revision: https://secure.phabricator.com/D13351
1 parent db1bc7f commit 541e3d9

31 files changed

+261
-735
lines changed

resources/celerity/map.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
'rsrc/js/application/conpherence/behavior-menu.js' => 'd3782c93',
343343
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
344344
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
345-
'rsrc/js/application/conpherence/behavior-widget-pane.js' => '93568464',
345+
'rsrc/js/application/conpherence/behavior-widget-pane.js' => 'cafc59ab',
346346
'rsrc/js/application/countdown/timer.js' => 'e4cc26b3',
347347
'rsrc/js/application/daemon/behavior-bulk-job-reload.js' => 'edf8a145',
348348
'rsrc/js/application/dashboard/behavior-dashboard-async-panel.js' => '469c0d9e',
@@ -550,7 +550,7 @@
550550
'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a',
551551
'javelin-behavior-conpherence-menu' => 'd3782c93',
552552
'javelin-behavior-conpherence-pontificate' => '21ba5861',
553-
'javelin-behavior-conpherence-widget-pane' => '93568464',
553+
'javelin-behavior-conpherence-widget-pane' => 'cafc59ab',
554554
'javelin-behavior-countdown-timer' => 'e4cc26b3',
555555
'javelin-behavior-dark-console' => 'f411b6ae',
556556
'javelin-behavior-dashboard-async-panel' => '469c0d9e',
@@ -1501,19 +1501,6 @@
15011501
'javelin-dom',
15021502
'javelin-stratcom',
15031503
),
1504-
93568464 => array(
1505-
'javelin-behavior',
1506-
'javelin-dom',
1507-
'javelin-stratcom',
1508-
'javelin-workflow',
1509-
'javelin-util',
1510-
'phabricator-notification',
1511-
'javelin-behavior-device',
1512-
'phuix-dropdown-menu',
1513-
'phuix-action-list-view',
1514-
'phuix-action-view',
1515-
'conpherence-thread-manager',
1516-
),
15171504
'93d0c9e3' => array(
15181505
'javelin-behavior',
15191506
'javelin-stratcom',
@@ -1768,6 +1755,19 @@
17681755
'javelin-stratcom',
17691756
'phabricator-phtize',
17701757
),
1758+
'cafc59ab' => array(
1759+
'javelin-behavior',
1760+
'javelin-dom',
1761+
'javelin-stratcom',
1762+
'javelin-workflow',
1763+
'javelin-util',
1764+
'phabricator-notification',
1765+
'javelin-behavior-device',
1766+
'phuix-dropdown-menu',
1767+
'phuix-action-list-view',
1768+
'phuix-action-view',
1769+
'conpherence-thread-manager',
1770+
),
17711771
'ccf1cbf8' => array(
17721772
'javelin-install',
17731773
'javelin-dom',
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
UPDATE {$NAMESPACE}_conpherence.conpherence_thread
2+
SET
3+
viewPolicy = 'obj.conpherence.members',
4+
editPolicy = 'obj.conpherence.members',
5+
joinPolicy = 'obj.conpherence.members'
6+
WHERE isRoom = 0;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE {$NAMESPACE}_conpherence.conpherence_thread
2+
DROP KEY `key_room`;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE {$NAMESPACE}_conpherence.conpherence_thread
2+
DROP COLUMN isRoom;

src/__phutil_library_map__.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@
238238
'ConpherenceLayoutView' => 'applications/conpherence/view/ConpherenceLayoutView.php',
239239
'ConpherenceListController' => 'applications/conpherence/controller/ConpherenceListController.php',
240240
'ConpherenceMenuItemView' => 'applications/conpherence/view/ConpherenceMenuItemView.php',
241-
'ConpherenceNewController' => 'applications/conpherence/controller/ConpherenceNewController.php',
242241
'ConpherenceNewRoomController' => 'applications/conpherence/controller/ConpherenceNewRoomController.php',
243242
'ConpherenceNotificationPanelController' => 'applications/conpherence/controller/ConpherenceNotificationPanelController.php',
244243
'ConpherenceParticipant' => 'applications/conpherence/storage/ConpherenceParticipant.php',
@@ -263,7 +262,6 @@
263262
'ConpherenceThreadQuery' => 'applications/conpherence/query/ConpherenceThreadQuery.php',
264263
'ConpherenceThreadRemarkupRule' => 'applications/conpherence/remarkup/ConpherenceThreadRemarkupRule.php',
265264
'ConpherenceThreadSearchEngine' => 'applications/conpherence/query/ConpherenceThreadSearchEngine.php',
266-
'ConpherenceThreadTestCase' => 'applications/conpherence/__tests__/ConpherenceThreadTestCase.php',
267265
'ConpherenceTransaction' => 'applications/conpherence/storage/ConpherenceTransaction.php',
268266
'ConpherenceTransactionComment' => 'applications/conpherence/storage/ConpherenceTransactionComment.php',
269267
'ConpherenceTransactionQuery' => 'applications/conpherence/query/ConpherenceTransactionQuery.php',
@@ -3609,7 +3607,6 @@
36093607
'ConpherenceLayoutView' => 'AphrontView',
36103608
'ConpherenceListController' => 'ConpherenceController',
36113609
'ConpherenceMenuItemView' => 'AphrontTagView',
3612-
'ConpherenceNewController' => 'ConpherenceController',
36133610
'ConpherenceNewRoomController' => 'ConpherenceController',
36143611
'ConpherenceNotificationPanelController' => 'ConpherenceController',
36153612
'ConpherenceParticipant' => 'ConpherenceDAO',
@@ -3640,7 +3637,6 @@
36403637
'ConpherenceThreadQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
36413638
'ConpherenceThreadRemarkupRule' => 'PhabricatorObjectRemarkupRule',
36423639
'ConpherenceThreadSearchEngine' => 'PhabricatorApplicationSearchEngine',
3643-
'ConpherenceThreadTestCase' => 'ConpherenceTestCase',
36443640
'ConpherenceTransaction' => 'PhabricatorApplicationTransaction',
36453641
'ConpherenceTransactionComment' => 'PhabricatorApplicationTransactionComment',
36463642
'ConpherenceTransactionQuery' => 'PhabricatorApplicationTransactionQuery',

src/applications/conpherence/__tests__/ConpherenceRoomTestCase.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,6 @@ public function testRoomParticipantAddition() {
6969
$participant_phids,
7070
$conpherence->getRecentParticipantPHIDs());
7171

72-
// test policy error as another user tries to add
73-
$caught = null;
74-
try {
75-
$this->addParticipants(
76-
$friend_2,
77-
$conpherence,
78-
array($friend_3->getPHID()));
79-
} catch (PhabricatorPolicyException $ex) {
80-
$caught = $ex;
81-
}
82-
$this->assertTrue($caught instanceof PhabricatorPolicyException);
83-
84-
// update edit policy so user has a chance
85-
$this->changeEditPolicy($creator, $conpherence, 'users');
8672
// test add by other participant, so recent participation should
8773
// meaningfully change
8874
$participant_phids = array(
@@ -129,7 +115,6 @@ public function testRoomParticipantDeletion() {
129115
public function testAddMessageWithFileAttachments() {
130116
$creator = $this->generateNewTestUser();
131117
$friend_1 = $this->generateNewTestUser();
132-
$join_via_add = $this->generateNewTestUser();
133118

134119
$participant_map = array(
135120
$creator->getPHID() => $creator,
@@ -144,9 +129,6 @@ public function testAddMessageWithFileAttachments() {
144129
$xactions = $this->addMessageWithFile($user, $conpherence);
145130
$this->assertEqual(2, count($xactions));
146131
}
147-
148-
$xactions = $this->addMessageWithFile($join_via_add, $conpherence);
149-
$this->assertEqual(2, count($xactions));
150132
}
151133

152134
private function createRoom(

src/applications/conpherence/__tests__/ConpherenceThreadTestCase.php

Lines changed: 0 additions & 169 deletions
This file was deleted.

src/applications/conpherence/application/PhabricatorConpherenceApplication.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public function getName() {
1111
}
1212

1313
public function getShortDescription() {
14-
return pht('Send Messages');
14+
return pht('Chat with Others');
1515
}
1616

1717
public function getFontIcon() {
@@ -44,8 +44,7 @@ public function getRoutes() {
4444
'(?P<id>[1-9]\d*)/(?P<messageID>[1-9]\d*)/'
4545
=> 'ConpherenceViewController',
4646
'columnview/' => 'ConpherenceColumnViewController',
47-
'new/' => 'ConpherenceNewController',
48-
'room/new/' => 'ConpherenceNewRoomController',
47+
'new/' => 'ConpherenceNewRoomController',
4948
'search/(?:query/(?P<queryKey>[^/]+)/)?'
5049
=> 'ConpherenceRoomListController',
5150
'panel/' => 'ConpherenceNotificationPanelController',
@@ -59,7 +58,7 @@ public function getQuickCreateItems(PhabricatorUser $viewer) {
5958
$items = array();
6059

6160
$item = id(new PHUIListItemView())
62-
->setName(pht('Conpherence Thread'))
61+
->setName(pht('Conpherence Room'))
6362
->setIcon('fa-comments')
6463
->setWorkflow(true)
6564
->setHref($this->getBaseURI().'new/');

0 commit comments

Comments
 (0)