mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 01:48:23 +01:00
Correct line highlighting behavior in Diffusion
Summary: See <https://discourse.phabricator-community.org/t/line-highlighting-in-diffusion-breaks-url/1207>. Ref T13088. This was disrupted by changes for the new Harbormaster build logs and now needs an explicit base URI. Test Plan: Clicked lines and dragged across line ranges in Diffusion, observed correct URI behavior. Maniphest Tasks: T13088 Differential Revision: https://secure.phabricator.com/D19187
This commit is contained in:
parent
28854ae812
commit
c6a042b59a
1 changed files with 13 additions and 5 deletions
|
@ -593,6 +593,9 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
array(
|
||||
'class' => 'diffusion-source remarkup-code PhabricatorMonospaced',
|
||||
'sigil' => 'phabricator-source',
|
||||
'meta' => array(
|
||||
'uri' => $this->getLineNumberBaseURI(),
|
||||
),
|
||||
),
|
||||
$rows);
|
||||
|
||||
|
@ -1126,11 +1129,7 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
|
||||
// NOTE: We're doing this manually because rendering is otherwise
|
||||
// dominated by URI generation for very large files.
|
||||
$line_base = (string)$drequest->generateURI(
|
||||
array(
|
||||
'action' => 'browse',
|
||||
'stable' => true,
|
||||
));
|
||||
$line_base = $this->getLineNumberBaseURI();
|
||||
|
||||
require_celerity_resource('aphront-tooltip-css');
|
||||
Javelin::initBehavior('phabricator-oncopy');
|
||||
|
@ -2039,4 +2038,13 @@ final class DiffusionBrowseController extends DiffusionController {
|
|||
->setTable($history_table);
|
||||
}
|
||||
|
||||
private function getLineNumberBaseURI() {
|
||||
$drequest = $this->getDiffusionRequest();
|
||||
|
||||
return (string)$drequest->generateURI(
|
||||
array(
|
||||
'action' => 'browse',
|
||||
'stable' => true,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue