Skip to content

Commit 42378ea

Browse files
author
epriestley
committedMay 14, 2020
Allow users to create inline comments by directly selecting text directly
Summary: Ref T13513. Support direct text selection for inlines. This is currently just an alternate way to get to the same place as using line numbers, but can preserve offset/range information in the future. Test Plan: - Selected some text, hit "c", clicked "New Inline Comment", got sensible comments on both sides of a diff in Safari, Chrome, and (with limitations) Firefox. - Caveats: no unified support, doesn't work across lines in Firefox. Maniphest Tasks: T13513 Differential Revision: https://secure.phabricator.com/D21248
1 parent c063e0e commit 42378ea

File tree

5 files changed

+396
-44
lines changed

5 files changed

+396
-44
lines changed
 

‎resources/celerity/map.php

+24-24
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
'conpherence.pkg.css' => '0e3cf785',
1111
'conpherence.pkg.js' => '020aebcf',
1212
'core.pkg.css' => 'a560707d',
13-
'core.pkg.js' => '1e667bcb',
13+
'core.pkg.js' => '0efaf0ac',
1414
'dark-console.pkg.js' => '187792c2',
1515
'differential.pkg.css' => 'd71d4531',
16-
'differential.pkg.js' => 'b3e29cb8',
16+
'differential.pkg.js' => '06a7949c',
1717
'diffusion.pkg.css' => '42c75c37',
1818
'diffusion.pkg.js' => 'a98c0bf7',
1919
'maniphest.pkg.css' => '35995d6d',
@@ -380,7 +380,7 @@
380380
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9',
381381
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '0116d3e8',
382382
'rsrc/js/application/diff/DiffChangeset.js' => '20715b98',
383-
'rsrc/js/application/diff/DiffChangesetList.js' => '40d6c41c',
383+
'rsrc/js/application/diff/DiffChangesetList.js' => '4a3639a1',
384384
'rsrc/js/application/diff/DiffInline.js' => '6227a0e3',
385385
'rsrc/js/application/diff/DiffPathView.js' => '8207abf9',
386386
'rsrc/js/application/diff/DiffTreeView.js' => '5d83623b',
@@ -488,7 +488,7 @@
488488
'rsrc/js/core/behavior-linked-container.js' => '74446546',
489489
'rsrc/js/core/behavior-more.js' => '506aa3f4',
490490
'rsrc/js/core/behavior-object-selector.js' => '98ef467f',
491-
'rsrc/js/core/behavior-oncopy.js' => 'ff7b3f22',
491+
'rsrc/js/core/behavior-oncopy.js' => 'b475aae5',
492492
'rsrc/js/core/behavior-phabricator-remarkup-assist.js' => '54262396',
493493
'rsrc/js/core/behavior-read-only-warning.js' => 'b9109f8f',
494494
'rsrc/js/core/behavior-redirect.js' => '407ee861',
@@ -523,7 +523,7 @@
523523
'rsrc/js/phuix/PHUIXActionView.js' => 'a8f573a9',
524524
'rsrc/js/phuix/PHUIXAutocomplete.js' => '2fbe234d',
525525
'rsrc/js/phuix/PHUIXButtonView.js' => '55a24e84',
526-
'rsrc/js/phuix/PHUIXDropdownMenu.js' => '7acfd98b',
526+
'rsrc/js/phuix/PHUIXDropdownMenu.js' => 'b557770a',
527527
'rsrc/js/phuix/PHUIXExample.js' => 'c2c500a7',
528528
'rsrc/js/phuix/PHUIXFormControl.js' => '38c1f3fb',
529529
'rsrc/js/phuix/PHUIXFormationColumnView.js' => '4bcc1f78',
@@ -648,7 +648,7 @@
648648
'javelin-behavior-phabricator-line-linker' => '590e6527',
649649
'javelin-behavior-phabricator-notification-example' => '29819b75',
650650
'javelin-behavior-phabricator-object-selector' => '98ef467f',
651-
'javelin-behavior-phabricator-oncopy' => 'ff7b3f22',
651+
'javelin-behavior-phabricator-oncopy' => 'b475aae5',
652652
'javelin-behavior-phabricator-remarkup-assist' => '54262396',
653653
'javelin-behavior-phabricator-reveal-content' => 'b105a3a6',
654654
'javelin-behavior-phabricator-search-typeahead' => '1cb7d027',
@@ -775,7 +775,7 @@
775775
'phabricator-darkmessage' => '26cd4b73',
776776
'phabricator-dashboard-css' => '5a205b9d',
777777
'phabricator-diff-changeset' => '20715b98',
778-
'phabricator-diff-changeset-list' => '40d6c41c',
778+
'phabricator-diff-changeset-list' => '4a3639a1',
779779
'phabricator-diff-inline' => '6227a0e3',
780780
'phabricator-diff-path-view' => '8207abf9',
781781
'phabricator-diff-tree-view' => '5d83623b',
@@ -886,7 +886,7 @@
886886
'phuix-action-view' => 'a8f573a9',
887887
'phuix-autocomplete' => '2fbe234d',
888888
'phuix-button-view' => '55a24e84',
889-
'phuix-dropdown-menu' => '7acfd98b',
889+
'phuix-dropdown-menu' => 'b557770a',
890890
'phuix-form-control-view' => '38c1f3fb',
891891
'phuix-formation-column-view' => '4bcc1f78',
892892
'phuix-formation-flank-view' => '6648270a',
@@ -1259,11 +1259,6 @@
12591259
'javelin-behavior',
12601260
'javelin-uri',
12611261
),
1262-
'40d6c41c' => array(
1263-
'javelin-install',
1264-
'phuix-button-view',
1265-
'phabricator-diff-tree-view',
1266-
),
12671262
'42c44e8b' => array(
12681263
'javelin-behavior',
12691264
'javelin-workflow',
@@ -1332,6 +1327,11 @@
13321327
'490e2e2e' => array(
13331328
'phui-oi-list-view-css',
13341329
),
1330+
'4a3639a1' => array(
1331+
'javelin-install',
1332+
'phuix-button-view',
1333+
'phabricator-diff-tree-view',
1334+
),
13351335
'4a7fb02b' => array(
13361336
'javelin-behavior',
13371337
'javelin-dom',
@@ -1614,13 +1614,6 @@
16141614
'javelin-install',
16151615
'javelin-dom',
16161616
),
1617-
'7acfd98b' => array(
1618-
'javelin-install',
1619-
'javelin-util',
1620-
'javelin-dom',
1621-
'javelin-vector',
1622-
'javelin-stratcom',
1623-
),
16241617
'7ad020a5' => array(
16251618
'javelin-behavior',
16261619
'javelin-dom',
@@ -1975,13 +1968,24 @@
19751968
'javelin-workboard-card-template',
19761969
'javelin-workboard-order-template',
19771970
),
1971+
'b475aae5' => array(
1972+
'javelin-behavior',
1973+
'javelin-dom',
1974+
),
19781975
'b49fd60c' => array(
19791976
'multirow-row-manager',
19801977
'trigger-rule',
19811978
),
19821979
'b517bfa0' => array(
19831980
'phui-oi-list-view-css',
19841981
),
1982+
'b557770a' => array(
1983+
'javelin-install',
1984+
'javelin-util',
1985+
'javelin-dom',
1986+
'javelin-vector',
1987+
'javelin-stratcom',
1988+
),
19851989
'b58d1a2a' => array(
19861990
'javelin-behavior',
19871991
'javelin-behavior-device',
@@ -2203,10 +2207,6 @@
22032207
'owners-path-editor',
22042208
'javelin-behavior',
22052209
),
2206-
'ff7b3f22' => array(
2207-
'javelin-behavior',
2208-
'javelin-dom',
2209-
),
22102210
),
22112211
'packages' => array(
22122212
'conpherence.pkg.css' => array(

‎src/applications/differential/view/DifferentialChangesetListView.php

+8
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,14 @@ public function render() {
365365
pht('Jump to the comment area.'),
366366

367367
'Show Changeset' => pht('Show Changeset'),
368+
369+
'You must select source text to create a new inline comment.' =>
370+
pht('You must select source text to create a new inline comment.'),
371+
372+
'New Inline Comment' => pht('New Inline Comment'),
373+
374+
'Add new inline comment on selected source text.' =>
375+
pht('Add new inline comment on selected source text.'),
368376
),
369377
));
370378

0 commit comments

Comments
 (0)
Failed to load comments.