metacpan / metacpan-grep-front-end

Grep Front end code
GNU General Public License v3.0
13 stars 13 forks source link

link to the full source view for each match #42

Closed toddr closed 4 years ago

toddr commented 6 years ago

[05:26:29] ilmari wishes grep.metacpan.org would link to the full source view for each match

toddr commented 6 years ago

@ilmari ^^

dboehmer commented 4 years ago

This sounds like to most basic feature to me when filenames with matches are displayed. :stuck_out_tongue:

Additional detail: the line number in the code excerpt could link to the source file on this line.

atoomic commented 4 years ago

This request is unclear to me how the current behavior should be updated right now when we perform a search and click on a distro matching our request we land here https://grep.metacpan.org/search?qci=&q=Test&qft=&qd=ACME-CPANPLUS-Module-With-Core-PreReq

then by clicking on a filename I can view the source file with the line highlighted https://grep.metacpan.org/search?qci=&q=Test&qft=&qd=ACME-CPANPLUS-Module-With-Core-PreReq&f=t%2F00-compile.t

is this request about having a raw view?

Please provide a little more informations on the expected behavior

dboehmer commented 4 years ago

Thanks for asking!

I was looking for the code that is generating debug output Loaded Chained actions from Catalyst: https://grep.metacpan.org/search?q=Loaded+Chained+actions&qd=Catalyst-Runtime&qft=

The top most result was exactly what I was looking for: https://grep.metacpan.org/search?qci=&q=Loaded%20Chained%20actions&qft=&qd=Catalyst-Runtime&qls=0&f=lib/Catalyst/DispatchType/Chained.pm

For me this displays only lines 118 to 238 and from that section I can't even see what $paths is (that variable is used in the matching line) or what method this line is in. Well, one more reason to write shorter methods;-)

I'd like to have a link to https://metacpan.org/release/Catalyst-Runtime/source/lib/Catalyst/DispatchType/Chained.pm, possibly from the displayed lines linked to the respective line numbers.

What I did instead:

atoomic commented 4 years ago

Thanks for provided this information, this is now clear, and very doable and would be a nice addition.