Spike: Render Blame file information within the Blob viewer frontend app
Context
Recently while discussion an improvement for the Blob viewer (Add line-specific historic information to the s... (#386639)) an idea popped up:
The full blame page could theoretically be achieved in the blob viewer by fetching and displaying blame information for ALL the lines without leaving the page.
🤔 Might be worth opening an issue to discuss how that could be achieved, if we want to dig deeper.For clarity, the "/blame/" page/url would still exist, it would just render the blob page with the relevant blame information displayed in the gutter.
Proposal
(lacks design guidance)
- Add a button at the top of the line gutters to "show blame information" (alternatively, this could be the functionality of the BLAME button at the top)
- That button increases the width of the line gutter and replaces that with the blame information
Motivation
- Maintenance: Doing this in the blob page unifies the code into the Blob vue app
- Performance/UX: Quicker toggling back/forth between blame and normal blob viewing
- Performance/UX:Allows the frontend to selectively request blame data from the backend pertaining to the region currently being shown to the user (and surroundings) resulting in faster performance
- Performance/UX:Reuses information from the blob rendering task so no need to fetch it when toggling the Blame info on.
- Performance/UX:Still allows to render Blame mode from scratch (would essentially render the Blob vue app + Blame on from the start)
Questions
- backend Do we need new APIs/GraphQL queries? (likely)
- backend Can we provide blame info in chunks and still do it performantly?
- frontend Could we be pushing the blob app too far with this? (in terms of resources/performance)
- frontend Should we tackle this before migrating to Vue 3 or should we wait?
- UX Does this open up the option to roll out other kinds of interactive feature?
Availability and Testing
Add feature specs for: -opening blame from blob app -ensuring correct blame information is displayed -closing blame from blob app
Exploratory testing of feature.
Edited by Jay McCure