Add support for timeline in Rapid Diffs commit diffs
What does this MR do and why?
For #547881
Adds a timeline to the Commit view when rendered with Rapid Diffs.
Screenshots or screen recordings
See the Caveats section for discussion about the visuals of the After implementation.
| Before | Before (with ?rapid_diffs=true) |
After (with ?rapid_diffs=true) |
|---|---|---|
|
|
|
How to set up and validate locally
- Go to a commit (this is from the top level menu Commits option, not from the Commits tab of an MR)
- Copy the URL to this commit and mention it (for example, paste it in the description of a new issue)
- Enable the
rapid_diffs_on_commit_showfeature flag:rails c=>Feature.enable( :rapid_diffs_on_commit_show ); - Add
?rapid_diffs=trueto the commit URL bar and submit that change - Verify that your system note (logging your mention of the commit) appears below the diff.
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.
Caveats
The timeline uses the legacy system_note.vue component (imported in discussion_notes.vue) because the Rapid Diffs system note hasn't been migrated yet. This causes one visual issue:
- A dot marker instead of a speech bubble icon
A persistent loading spinner (showSpinnerdefaults to true in the legacynote_header.vue)
@slashmanov mentioned that system note migration is planned separately and shouldn't block this work. Once discussion_notes.vue switches to a Rapid Diffs-native system_note.vue, the spinner issue will resolve without changes to this MR's code. Notably, most of this conversion work is being done in !214423 (merged).


