Sourcegraph extension API: use and build extensions that enhance reading and reviewing code in your existing tools. "The extension API you wish your code host had."
The extension API lets you add after-line decorations. As a developer, I would like to be able to toggle on/off seeing blame annotations for all lines in the file. Currently Sourcegraph shows you this on the selected line but not all lines, and GitHub (and other code hosts) requires you to go to a different page for this info.
This would be implemented by:
Show a Blame toggle button and storing the toggle state in settings
When blame is on, fetch the blame data for all lines in the current file (e.g., from the Sourcegraph GraphQL API using sourcegraph.commands.executeCommand('queryGraphQL', graphqlquerystring, mapofvars)
Display an after-line decoration for each line with the blame author, date, commit message summary, abbreviated SHA, etc. (whatever is useful and looks good; there is a lot of prior art here)
The extension API lets you add after-line decorations. As a developer, I would like to be able to toggle on/off seeing blame annotations for all lines in the file. Currently Sourcegraph shows you this on the selected line but not all lines, and GitHub (and other code hosts) requires you to go to a different page for this info.
This would be implemented by:
sourcegraph.commands.executeCommand('queryGraphQL', graphqlquerystring, mapofvars)