sourceoptics / source_optics

Development has moved to BitBucket. Please clone from and send PRs to https://bitbucket.org/laserllama/sourceoptics/src/master/.
http://sourceoptics.io
20 stars 6 forks source link

file browser view - ticket now tracking upgrade ideas #112

Open mpdehaan opened 4 years ago

mpdehaan commented 4 years ago

per repo we track a lot of information about files

we have every single path as file object, and every single filechange that includes the size of the change and a link to the commit

We can produce a directory tree view or even some sort of depth map that shows for each directory who were the top authors over time on that directory

Potentially, we can show a graph of that selected directory as it is selected in the treeview, showing commits, authors, and lines changed over time, with top authors for that directory over the time range

This would be useful for developers asking questions like "who owns this component"

Another important use case is "what are the files and directories in this repo experiencing the most churn, so when looking at any directory, it should show the stats about the number of edits per time interval (etc) in a table.

mpdehaan commented 4 years ago

current idea:

have a function that finds all the subdirectories for the directory in the query string

default directory is "/" for each repo

show sparklines for each directory in a table, each is a lazy loaded graph snippet

show some minimal stats for each directory based on what is easily available off the 'file changes' objects in the database

click on any directory to descend into the subdirectory

print the current directory at the top of the system

show top authors for this directory at the top of the graphs

get this going and then see how it evolves

mpdehaan commented 4 years ago

I've added code that allows graphs of commits (not LoC just yet, commits seemed more useful? Easy to do one or both really)...

It should be fairly trivial to add an icon link beside each directory that shows either or both of:

Because of the way data is stored, it's only really developmently-worth-it to show lines added/removed/changed on a per directory basis... otherwise we'd spend eons more in statistic calculation. However, we should be able to add some slightly modified code to generate "lightweight" versions of the stats table for this purpose.

This will handle the desire to show top authors, but also be more flexible. We can PROBABLY reuse the existing stats table templates and just add an if-conditonal to them for stats to just show the few selected columns.

mpdehaan commented 4 years ago

added axes back

looks like the commit graphs may be selecting things in the immediate directory and not subdirectories, which is an easy fix

we should add top three commiters in each directory and LOC stats in the table beside each, in addition to a button to see the commits for just that subdirectory

mpdehaan commented 4 years ago

show files in each directory below directory list, same graphs? may need to limit for large number of files/dirs

mpdehaan commented 4 years ago

pushed some nice updates - only files that have commits between the time range will be graphed. We don't yet have a good way to show what files are deleted in these views just yet (though their line counts should be negative, LOL).