Page MenuHomePhorge

Adds "Locate File" input to every browse directory view in Diffusion
ClosedPublic

Authored by bekay on Jan 18 2024, 16:04.

Details

Summary

Ref T15645

The very helpful "Locate File" input in Diffusion was so far only visible in the homepage route of any repository (/repository).

With this revision you can now locate a file from every browsed directory and in any selected commit.

The finder was already "directory sensitive" meaning: if you are trying to locate a file from within a browsed directory, only the children of this path will be searched.

For the searching in a specified commit (for example: https://we.phorge.it/source/phorge/browse/master/src/;05f4d5071fdca02123bd1ff4c0935b847c7f9963), I had to do a little JS magic adding the commit to the URI on the client side.

Test Plan

Checkout, browse through your repos with Diffusion trying to find files. (I tested only with Git repos.)

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bekay requested review of this revision.Jan 18 2024, 16:04
bekay retitled this revision from Adds "Locate File" input to every browse view in Diffusion to Adds "Locate File" input to every browse directory view in Diffusion.Jan 18 2024, 16:08

Looks good! Thank you so much for this!

src/applications/diffusion/controller/DiffusionController.php
557

Can we doc the return type now that this is protected visibility?

Adds return value to annotation and fixes wrong path when locating file from within a directory.

bekay marked an inline comment as done.Jan 19 2024, 10:11
This revision is now accepted and ready to land.Jan 19 2024, 12:36
In D25521#14952, @speck wrote:

Thanks!

You are welcome. I don't know if I should wait for a second accept before landing. Somebody with Mercurial repos should test this... @valerio.bozzolan ?