From f8cebdc418e8702921ec0d3b3c8e4ce66689609f Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 19 Jan 2017 11:50:37 -0800 Subject: [PATCH] Make Differential inline events actually trigger comment preview refreshes Summary: Earlier, I made some changes so that when you create or edit an inline, the comment at the bottom of the page updates (even though you didn't fiddle with the stacked actions inputs). At the last second I broke them by spelling this wrong while cleaning things up, so they didn't actually work. Spell the property correctly ("showPreview", not "shouldPreview"). Also, we have some JS which rewrites "Not Visible" into "View", but it fires in an inconvenient way now and is flickery for me. Ideally this should get cleaned up slightly better eventualy, but at least make is stop doing so much flickery layout for now. Test Plan: - Wrote no comment on a revision. - Added an inline. - Saw comment preview properly update immediately. Reviewers: chad Reviewed By: chad Differential Revision: https://secure.phabricator.com/D17229 --- resources/celerity/map.php | 22 +++++++++---------- .../view/PHUIDiffInlineCommentDetailView.php | 2 +- .../transactions/behavior-comment-actions.js | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index ade2a4324c..8649bdf11b 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -453,7 +453,7 @@ return array( 'rsrc/js/application/search/behavior-reorder-profile-menu-items.js' => 'e2e0a072', 'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08', 'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => '887ad43f', - 'rsrc/js/application/transactions/behavior-comment-actions.js' => 'b52947eb', + 'rsrc/js/application/transactions/behavior-comment-actions.js' => '9a6dd75c', 'rsrc/js/application/transactions/behavior-reorder-configs.js' => 'd7a74243', 'rsrc/js/application/transactions/behavior-reorder-fields.js' => 'b59e1e96', 'rsrc/js/application/transactions/behavior-show-older-transactions.js' => '94c65b72', @@ -609,7 +609,7 @@ return array( 'javelin-behavior-bulk-job-reload' => 'edf8a145', 'javelin-behavior-calendar-month-view' => 'fe33e256', 'javelin-behavior-choose-control' => '327a00d1', - 'javelin-behavior-comment-actions' => 'b52947eb', + 'javelin-behavior-comment-actions' => '9a6dd75c', 'javelin-behavior-config-reorder-fields' => 'b6993408', 'javelin-behavior-conpherence-menu' => '7524fcfa', 'javelin-behavior-conpherence-participant-pane' => '8604caa8', @@ -1682,6 +1682,15 @@ return array( 'phabricator-phtize', 'changeset-view-manager', ), + '9a6dd75c' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-workflow', + 'javelin-dom', + 'phuix-form-control-view', + 'phuix-icon-view', + 'javelin-behavior-phabricator-gesture', + ), '9a8cb501' => array( 'aphront-typeahead-control-css', 'phui-tag-view-css', @@ -1856,15 +1865,6 @@ return array( 'javelin-typeahead-preloaded-source', 'javelin-util', ), - 'b52947eb' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-workflow', - 'javelin-dom', - 'phuix-form-control-view', - 'phuix-icon-view', - 'javelin-behavior-phabricator-gesture', - ), 'b59e1e96' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php index 808fb5d067..f01bfbdb65 100644 --- a/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php +++ b/src/infrastructure/diff/view/PHUIDiffInlineCommentDetailView.php @@ -270,7 +270,7 @@ final class PHUIDiffInlineCommentDetailView ), 'sigil' => 'differential-inline-preview-jump', ), - pht('Not Visible')); + pht('View')); $action_buttons[] = id(new PHUIButtonView()) ->setTag('a') diff --git a/webroot/rsrc/js/application/transactions/behavior-comment-actions.js b/webroot/rsrc/js/application/transactions/behavior-comment-actions.js index 44d5597cb5..11141f138a 100644 --- a/webroot/rsrc/js/application/transactions/behavior-comment-actions.js +++ b/webroot/rsrc/js/application/transactions/behavior-comment-actions.js @@ -126,7 +126,7 @@ JX.behavior('comment-actions', function(config) { } function force_preview() { - if (!config.shouldPreview) { + if (!config.showPreview) { return; }