Loading
Remove inline_blame feature flag
What does this MR do and why?
This MR removes the inline_blame feature flag.
Resolves #602273 (closed).
Scope
Backend:
BlameController#shownow renders the client-side redirect to the blob viewer (?blame=1) unconditionally, instead of only when the flag was on. The@gitaly_unavailablebranch still runs first.- The legacy
elsebranch ofapp/views/projects/blame/show.html.haml(blame table, pagination, streaming, legend, preferences mount) is removed, because it can no longer render. showno longer callsload_environmentorload_blame, so theIgnoreRevsFormatError/IgnoreRevsFileErrorrescues and theredirect_show_with_flashhelper are gone. On the blob viewer path those errors are already surfaced byResolvers::BlameResolver, which raises aGraphQL::ExecutionErrorthatsource_viewer.vueshows withcreateAlert. Covered byspec/graphql/resolvers/blame_resolver_spec.rb.- Removed all three
push_frontend_feature_flag(:inline_blame, @project)calls, inblob_controller.rb,tree_controller.rb, andprojects_controller.rb. - Deleted
config/feature_flags/beta/inline_blame.yml. - Deleted
BlameHelper#blame_pages_streaming_url,#entire_blame_pathand#blame_preferences, plus their specs. The removed view branch was their only caller, andkeela(the unused-method static analysis) blocks on newly orphaned methods.#age_map_classand#age_map_durationstay, becauseGitlab::BlamePresenterandTypes::Blame::CommitDataTypestill use them.
Frontend:
blob_content_viewer.vue:isBlameAvailable, the$routewatcher,show-blame-toggle, and the twoshow-blamebindings now use the always-on branch.chunk.vue:handleBlameClickalways intercepts the in-gutter blame link.blob_controls.vue: removed the desktop Blame button, which was permanently hidden while the flag was on.- Dropped the
glFeaturesmixin/inject from these three components, because nothing else in them read it. - The mobile Blame entry in the overflow menu (
blob_repository_actions_group.vue) was never flag gated and is unchanged.
QA and docs:
- Deleted
qa/qa/page/blame/show.rb. It is an unreferenced page object whoseviewblock asserts theblob-content-holderselector that existed only in the legacy branch, soqa:selectorswould fail otherwise. - Regenerated
locale/gitlab.pot. Four strings became unused:Show full blame,Loading full blame…,Malformed .git-blame-ignore-revs,.git-blame-ignore-revs is not a file. - Added the final history entry to
doc/user/project/repository/files/git_blame.md.
Specs:
spec/controllers/projects/blame_controller_spec.rbrewritten to assert the redirect. The legacy flash and ignore-revs contexts are removed.spec/features/projects/blobs/blame_spec.rbrewritten. The old file only tested legacy page pagination and streaming, which is unreachable once/-/blame/*always redirects. The new file covers the redirect, line fragment preservation, blame panel rendering, and binary file handling.- Flag stubs removed from
spec/features/projects/files/user_browses_files_spec.rb,spec/features/search/user_searches_for_code_spec.rb,spec/features/accessibility/create/writing_code_spec.rb, and from the corresponding Jest specs.
Related issues
- #602273 (closed) (this issue)
- #501539 (closed) (rollout issue)
- #618439 (closed) (follow-up: retire the legacy blame page)
Edited by Anastasia Khomchenko