@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.

If the user cancels a workboard drop flow, put things back where they were

Summary:
Ref T13074. If you hit a prompt on a drop operation (today: MFA; in the future, maybe "add a comment" or "assign this task"), we currently leave the board in a bad semi-frozen state if you cancel the workflow by pressing "Cancel" on the dialog.

Instead, put things back the way they were.

Test Plan: Dragged an MFA-required card, cancelled the MFA prompt, got a functional board instead of a semi-frozen board I needed to reload.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13074

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

+39 -14
+14 -14
resources/celerity/map.php
··· 409 409 'rsrc/js/application/phortune/phortune-credit-card-form.js' => 'd12d214f', 410 410 'rsrc/js/application/policy/behavior-policy-control.js' => '0eaa33a9', 411 411 'rsrc/js/application/policy/behavior-policy-rule-editor.js' => '9347f172', 412 - 'rsrc/js/application/projects/WorkboardBoard.js' => '31766c31', 412 + 'rsrc/js/application/projects/WorkboardBoard.js' => '65afb173', 413 413 'rsrc/js/application/projects/WorkboardCard.js' => '0392a5d8', 414 414 'rsrc/js/application/projects/WorkboardCardTemplate.js' => '2a61f8d4', 415 415 'rsrc/js/application/projects/WorkboardColumn.js' => 'c3d24e63', ··· 737 737 'javelin-view-renderer' => '9aae2b66', 738 738 'javelin-view-visitor' => '308f9fe4', 739 739 'javelin-websocket' => 'fdc13e4e', 740 - 'javelin-workboard-board' => '31766c31', 740 + 'javelin-workboard-board' => '65afb173', 741 741 'javelin-workboard-card' => '0392a5d8', 742 742 'javelin-workboard-card-template' => '2a61f8d4', 743 743 'javelin-workboard-column' => 'c3d24e63', ··· 1182 1182 'javelin-install', 1183 1183 'javelin-util', 1184 1184 ), 1185 - '31766c31' => array( 1186 - 'javelin-install', 1187 - 'javelin-dom', 1188 - 'javelin-util', 1189 - 'javelin-stratcom', 1190 - 'javelin-workflow', 1191 - 'phabricator-draggable-list', 1192 - 'javelin-workboard-column', 1193 - 'javelin-workboard-header-template', 1194 - 'javelin-workboard-card-template', 1195 - 'javelin-workboard-order-template', 1196 - ), 1197 1185 '32755edb' => array( 1198 1186 'javelin-install', 1199 1187 'javelin-util', ··· 1467 1455 ), 1468 1456 '60cd9241' => array( 1469 1457 'javelin-behavior', 1458 + ), 1459 + '65afb173' => array( 1460 + 'javelin-install', 1461 + 'javelin-dom', 1462 + 'javelin-util', 1463 + 'javelin-stratcom', 1464 + 'javelin-workflow', 1465 + 'phabricator-draggable-list', 1466 + 'javelin-workboard-column', 1467 + 'javelin-workboard-header-template', 1468 + 'javelin-workboard-card-template', 1469 + 'javelin-workboard-order-template', 1470 1470 ), 1471 1471 '65bb0011' => array( 1472 1472 'javelin-behavior',
+25
webroot/rsrc/js/application/projects/WorkboardBoard.js
··· 479 479 480 480 data.visiblePHIDs = visible_phids.join(','); 481 481 482 + // If the user cancels the workflow (for example, by hitting an MFA 483 + // prompt that they click "Cancel" on), put the card back where it was 484 + // and reset the UI state. 485 + var on_revert = JX.bind( 486 + this, 487 + this._revertCard, 488 + list, 489 + item, 490 + src_phid, 491 + dst_phid); 492 + 482 493 var onupdate = JX.bind( 483 494 this, 484 495 this._oncardupdate, ··· 489 500 490 501 new JX.Workflow(this.getController().getMoveURI(), data) 491 502 .setHandler(onupdate) 503 + .setCloseHandler(on_revert) 492 504 .start(); 505 + }, 506 + 507 + _revertCard: function(list, item, src_phid, dst_phid) { 508 + JX.DOM.alterClass(item, 'drag-sending', false); 509 + 510 + var src_column = this.getColumn(src_phid); 511 + var dst_column = this.getColumn(dst_phid); 512 + 513 + src_column.markForRedraw(); 514 + dst_column.markForRedraw(); 515 + this._redrawColumns(); 516 + 517 + list.unlock(); 493 518 }, 494 519 495 520 _oncardupdate: function(list, src_phid, dst_phid, after_phid, response) {