1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-03 10:28:23 +01:00

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
This commit is contained in:
epriestley 2017-01-19 11:50:37 -08:00
parent a9158d34d4
commit f8cebdc418
3 changed files with 13 additions and 13 deletions

View file

@ -453,7 +453,7 @@ return array(
'rsrc/js/application/search/behavior-reorder-profile-menu-items.js' => 'e2e0a072', 'rsrc/js/application/search/behavior-reorder-profile-menu-items.js' => 'e2e0a072',
'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08', 'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08',
'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => '887ad43f', '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-configs.js' => 'd7a74243',
'rsrc/js/application/transactions/behavior-reorder-fields.js' => 'b59e1e96', 'rsrc/js/application/transactions/behavior-reorder-fields.js' => 'b59e1e96',
'rsrc/js/application/transactions/behavior-show-older-transactions.js' => '94c65b72', 'rsrc/js/application/transactions/behavior-show-older-transactions.js' => '94c65b72',
@ -609,7 +609,7 @@ return array(
'javelin-behavior-bulk-job-reload' => 'edf8a145', 'javelin-behavior-bulk-job-reload' => 'edf8a145',
'javelin-behavior-calendar-month-view' => 'fe33e256', 'javelin-behavior-calendar-month-view' => 'fe33e256',
'javelin-behavior-choose-control' => '327a00d1', 'javelin-behavior-choose-control' => '327a00d1',
'javelin-behavior-comment-actions' => 'b52947eb', 'javelin-behavior-comment-actions' => '9a6dd75c',
'javelin-behavior-config-reorder-fields' => 'b6993408', 'javelin-behavior-config-reorder-fields' => 'b6993408',
'javelin-behavior-conpherence-menu' => '7524fcfa', 'javelin-behavior-conpherence-menu' => '7524fcfa',
'javelin-behavior-conpherence-participant-pane' => '8604caa8', 'javelin-behavior-conpherence-participant-pane' => '8604caa8',
@ -1682,6 +1682,15 @@ return array(
'phabricator-phtize', 'phabricator-phtize',
'changeset-view-manager', '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( '9a8cb501' => array(
'aphront-typeahead-control-css', 'aphront-typeahead-control-css',
'phui-tag-view-css', 'phui-tag-view-css',
@ -1856,15 +1865,6 @@ return array(
'javelin-typeahead-preloaded-source', 'javelin-typeahead-preloaded-source',
'javelin-util', '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( 'b59e1e96' => array(
'javelin-behavior', 'javelin-behavior',
'javelin-stratcom', 'javelin-stratcom',

View file

@ -270,7 +270,7 @@ final class PHUIDiffInlineCommentDetailView
), ),
'sigil' => 'differential-inline-preview-jump', 'sigil' => 'differential-inline-preview-jump',
), ),
pht('Not Visible')); pht('View'));
$action_buttons[] = id(new PHUIButtonView()) $action_buttons[] = id(new PHUIButtonView())
->setTag('a') ->setTag('a')

View file

@ -126,7 +126,7 @@ JX.behavior('comment-actions', function(config) {
} }
function force_preview() { function force_preview() {
if (!config.shouldPreview) { if (!config.showPreview) {
return; return;
} }