Loading
Use server-built path for inline blame prior-blame link
What does this MR do and why?
This MR switches the blame viewer to read previousBlamePath added in !253769 (merged)
References
- Original bug (relative URL root 404): #627734 (closed)
- Backend MR that added
previousBlamePathto the GraphQL blame type: !253769 (merged) - Interim frontend fix (commit that introduced
projectBlobPathusage): 9fcfaf2a - Multi-version compatibility via
@gl_introduced: https://docs.gitlab.com/development/api_graphql_styleguide/#mitigation
Screenshots or screen recordings
No visual change. The "View blame prior to this change" button looks and behaves identically to master. Only the source of the button's href changes: it is now server-built (previousBlamePath from GraphQL) rather than client-built. The resulting URL value is the same.
How to set up and validate locally
- In GDK, open any text file that has more than one commit in its history. Click Blame in the file header to enable inline blame. Hover a blame entry and click the View blame prior to this change button (the
doc-versionsicon). Confirm the link resolves with?blame=1and shows the correct prior blame view. - Configure GDK with a relative URL root (
relative_url_root: /gitlabingdk.yml) and repeat step 1. Confirm the button href includes the/gitlabprefix and the page still resolves correctly. - In both cases the behavior should be identical to current
master.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Chaoyue Zhao