@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Conpherence - finesse global upload vs conpherence durable column upload

Summary: Fixes T7539. We need to set the "with-column" css class on the document body to make things like the jx-mask style-able. Also, make the global upload control only do it for the standard phabrcator page and not the document body.

Test Plan: dragged a file to conpherence column and it worked! uploaded a file to homepage with column open and it worked! uploaded a file to /file/ with column open and it worked!

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7539

Differential Revision: https://secure.phabricator.com/D12055

+49 -30
+24 -24
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => 'efdeeb14', 11 - 'core.pkg.js' => '5f50c01b', 11 + 'core.pkg.js' => 'deae6907', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 13 'differential.pkg.css' => '1940be3f', 14 14 'differential.pkg.js' => '53c1ccc2', ··· 44 44 'rsrc/css/application/config/config-welcome.css' => '6abd79be', 45 45 'rsrc/css/application/config/setup-issue.css' => '22270af2', 46 46 'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', 47 - 'rsrc/css/application/conpherence/durable-column.css' => 'acefcb30', 47 + 'rsrc/css/application/conpherence/durable-column.css' => 'ddd4e599', 48 48 'rsrc/css/application/conpherence/menu.css' => 'c6ac5299', 49 49 'rsrc/css/application/conpherence/message-pane.css' => '5930260a', 50 50 'rsrc/css/application/conpherence/notification.css' => '04a6e10a', ··· 353 353 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 354 354 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 355 355 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '0324970d', 356 - 'rsrc/js/application/conpherence/behavior-durable-column.js' => '9142e483', 356 + 'rsrc/js/application/conpherence/behavior-durable-column.js' => 'a3ba7034', 357 357 'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295', 358 358 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 359 359 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', ··· 464 464 'rsrc/js/core/behavior-file-tree.js' => '88236f00', 465 465 'rsrc/js/core/behavior-form.js' => '5c54cbf3', 466 466 'rsrc/js/core/behavior-gesture.js' => '3ab51e2c', 467 - 'rsrc/js/core/behavior-global-drag-and-drop.js' => '07f199d8', 467 + 'rsrc/js/core/behavior-global-drag-and-drop.js' => '8c584f17', 468 468 'rsrc/js/core/behavior-high-security-warning.js' => '8fc1c918', 469 469 'rsrc/js/core/behavior-history-install.js' => '7ee2b591', 470 470 'rsrc/js/core/behavior-hovercard.js' => 'f36e01af', ··· 514 514 'changeset-view-manager' => '88be0133', 515 515 'config-options-css' => '7fedf08b', 516 516 'config-welcome-css' => '6abd79be', 517 - 'conpherence-durable-column-view' => 'acefcb30', 517 + 'conpherence-durable-column-view' => 'ddd4e599', 518 518 'conpherence-menu-css' => 'c6ac5299', 519 519 'conpherence-message-pane-css' => '5930260a', 520 520 'conpherence-notification-css' => '04a6e10a', ··· 585 585 'javelin-behavior-diffusion-locate-file' => '6d3e1947', 586 586 'javelin-behavior-diffusion-pull-lastmodified' => '2b228192', 587 587 'javelin-behavior-doorkeeper-tag' => 'e5822781', 588 - 'javelin-behavior-durable-column' => '9142e483', 588 + 'javelin-behavior-durable-column' => 'a3ba7034', 589 589 'javelin-behavior-error-log' => '6882e80a', 590 590 'javelin-behavior-fancy-datepicker' => 'c51ae228', 591 - 'javelin-behavior-global-drag-and-drop' => '07f199d8', 591 + 'javelin-behavior-global-drag-and-drop' => '8c584f17', 592 592 'javelin-behavior-herald-rule-editor' => '7ebaeed3', 593 593 'javelin-behavior-high-security-warning' => '8fc1c918', 594 594 'javelin-behavior-history-install' => '7ee2b591', ··· 871 871 'javelin-dom', 872 872 'javelin-stratcom', 873 873 'javelin-workflow', 874 - ), 875 - '07f199d8' => array( 876 - 'javelin-behavior', 877 - 'javelin-dom', 878 - 'javelin-uri', 879 - 'javelin-mask', 880 - 'phabricator-drag-and-drop-file-upload', 881 874 ), 882 875 '08883e8b' => array( 883 876 'javelin-behavior', ··· 1523 1516 'javelin-uri', 1524 1517 'phabricator-file-upload', 1525 1518 ), 1519 + '8c584f17' => array( 1520 + 'javelin-behavior', 1521 + 'javelin-dom', 1522 + 'javelin-uri', 1523 + 'javelin-mask', 1524 + 'phabricator-drag-and-drop-file-upload', 1525 + ), 1526 1526 '8ce821c5' => array( 1527 1527 'phabricator-notification', 1528 1528 'javelin-stratcom', ··· 1545 1545 'javelin-behavior', 1546 1546 'javelin-uri', 1547 1547 'phabricator-notification', 1548 - ), 1549 - '9142e483' => array( 1550 - 'javelin-behavior', 1551 - 'javelin-dom', 1552 - 'javelin-stratcom', 1553 - 'javelin-behavior-device', 1554 - 'javelin-scrollbar', 1555 - 'javelin-quicksand', 1556 - 'phabricator-keyboard-shortcut', 1557 - 'conpherence-thread-manager', 1558 1548 ), 1559 1549 '92eb531d' => array( 1560 1550 'javelin-behavior', ··· 1629 1619 'javelin-util', 1630 1620 'javelin-vector', 1631 1621 'javelin-magical-init', 1622 + ), 1623 + 'a3ba7034' => array( 1624 + 'javelin-behavior', 1625 + 'javelin-dom', 1626 + 'javelin-stratcom', 1627 + 'javelin-behavior-device', 1628 + 'javelin-scrollbar', 1629 + 'javelin-quicksand', 1630 + 'phabricator-keyboard-shortcut', 1631 + 'conpherence-thread-manager', 1632 1632 ), 1633 1633 'a48aa699' => array( 1634 1634 'javelin-behavior',
+9
src/applications/conpherence/view/ConpherenceDurableColumnView.php
··· 376 376 $draft_value = $draft->getDraft(); 377 377 } 378 378 379 + $textarea_id = celerity_generate_unique_node_id(); 379 380 $textarea = javelin_tag( 380 381 'textarea', 381 382 array( 383 + 'id' => $textarea_id, 382 384 'name' => 'text', 383 385 'class' => 'conpherence-durable-column-textarea', 384 386 'sigil' => 'conpherence-durable-column-textarea', 385 387 'placeholder' => pht('Send a message...'), 386 388 ), 387 389 $draft_value); 390 + Javelin::initBehavior( 391 + 'aphront-drag-and-drop-textarea', 392 + array( 393 + 'target' => $textarea_id, 394 + 'activatedClass' => 'aphront-textarea-drag-and-drop', 395 + 'uri' => '/file/dropupload/', 396 + )); 388 397 $id = $conpherence->getID(); 389 398 return phabricator_form( 390 399 $this->getUser(),
+11 -1
webroot/rsrc/css/application/conpherence/durable-column.css
··· 2 2 * @provides conpherence-durable-column-view 3 3 */ 4 4 5 - .with-durable-column { 5 + .with-durable-column .phabricator-standard-page { 6 6 margin-right: 300px; 7 + } 8 + 9 + .with-durable-column 10 + .phabricator-global-upload-instructions { 11 + font-size: 28px; 12 + width: 50%; 13 + } 14 + 15 + .with-durable-column .global-upload-mask { 16 + right: 300px; 7 17 } 8 18 9 19 .conpherence-durable-column {
+1 -2
webroot/rsrc/js/application/conpherence/behavior-durable-column.js
··· 28 28 var loadThreadID = null; 29 29 var scrollbar = null; 30 30 31 - var frame = JX.$('phabricator-standard-page'); 32 31 var quick = JX.$('phabricator-standard-page-body'); 33 32 34 33 function _getColumnNode() { ··· 49 48 } 50 49 } 51 50 show = !show; 52 - JX.DOM.alterClass(frame, 'with-durable-column', show); 51 + JX.DOM.alterClass(document.body, 'with-durable-column', show); 53 52 var column = _getColumnNode(); 54 53 if (show) { 55 54 JX.DOM.show(column);
+4 -3
webroot/rsrc/js/core/behavior-global-drag-and-drop.js
··· 20 20 JX.$(config.ifSupported).style.display = ''; 21 21 } 22 22 23 - var drop = new JX.PhabricatorDragAndDropFileUpload(document.documentElement) 23 + var page = JX.$('phabricator-standard-page'); 24 + var drop = new JX.PhabricatorDragAndDropFileUpload(page) 24 25 .setURI(config.uploadURI) 25 26 .setViewPolicy(config.viewPolicy); 26 27 27 28 drop.listen('didBeginDrag', function() { 28 - JX.Mask.show(); 29 + JX.Mask.show('global-upload-mask'); 29 30 JX.DOM.show(JX.$(config.instructions)); 30 31 }); 31 32 32 33 drop.listen('didEndDrag', function() { 33 - JX.Mask.hide(); 34 + JX.Mask.hide('global-upload-mask'); 34 35 JX.DOM.hide(JX.$(config.instructions)); 35 36 }); 36 37