BigW Consortium Gitlab
New diff notes Fixes #12732, #14731, #19375, #14783 Builds on https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4110 To do: - [x] Get it mostly working - [x] Validate position validity - [x] Fix: Don’t link to `#` - [x] Fix: Base ref can be `nil`, potentially, when the MR has an oprhan source branch => Yep, doesn’t work. We need to store a `start_id` - [x] Optimize: Fewer duplicate `git diff` compares - [x] Optimize: Pass paths to `PositionTracer#diff` for faster diffs - [x] Refactor: Use `head_id` in `MergeRequest`/`MergeRequestDiff` instead of `source_sha` - [x] Refactor: Convert existing array-based diff refs to the DiffRefs model - [x] Tweak: Use `note_type` in `Autosave` key - [x] Tweak: Remove `line_code: note.line_code` from `link_to_reply_discussion` - [x] Update: `SentNotifications` and reply-by-email receiver - [x] Update: MR diff notification email - [x] Update: API (MR, Commit note creation and entity) - [x] Update: GitHub importer - [x] Address any other TODO comments - [x] Fix: Suppress "edited 4 minutes ago" - [x] Write tests - [x] `LineMapper` - [x] `PositionTracer` - [x] `Position` - [x] `DiffPositionUpdateService` - [x] `DiffNote` - [x] `MergeRequests::RefreshService` / `MergeRequest#update_diff_notes_positions` - [x] Make sure commits with diff notes don't get cleaned up, since this would prevent the diff notes from being rendered (https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5062) Future improvements: - Display unresolved comments on files outside the diff, if the comment was added when that file _was_ part of the diff - Allow commenting on sections between hunks, when expanding the diff using `...` - (We'd need to generate line code based on Position if we have it, even if it falls outside bounds of diff) - `diff_hunk` on diff note API entity - Show diff hunk in notification email - Resolved line notes would have a boolean, and be inactive through `notes.any? { !active? || resolved? }` - Multi line notes would store a number of positions, and do the right thing (™ ) in grouping and then rendering if the first item is multiline? => true - Image diff notes could store x,y,width,height instead of old_line,new_line for similar grouping. Does it need a reference to say if it's on old or new? These can't have line_codes, clearly. Rendering would be interesting. - Show commit line comments in the MR diff - Comment on specific selected words - Comment on file header - Unfold top of discussion diff note - New diff notes API for commits and MRs /cc @rspeicher See merge request !4101
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ci | Loading commit data... | |
abuse_reports.rb | Loading commit data... | |
appearances.rb | Loading commit data... | |
award_emoji.rb | Loading commit data... | |
broadcast_messages.rb | Loading commit data... | |
commit_statuses.rb | Loading commit data... | |
commits.rb | Loading commit data... | |
deploy_keys_projects.rb | Loading commit data... | |
deployments.rb | Loading commit data... | |
emails.rb | Loading commit data... | |
environments.rb | Loading commit data... | |
events.rb | Loading commit data... | |
file_uploader.rb | Loading commit data... | |
forked_project_links.rb | Loading commit data... | |
group_members.rb | Loading commit data... | |
groups.rb | Loading commit data... | |
identities.rb | Loading commit data... | |
issues.rb | Loading commit data... | |
keys.rb | Loading commit data... | |
label_links.rb | Loading commit data... | |
labels.rb | Loading commit data... | |
lfs_objects.rb | Loading commit data... | |
lfs_objects_projects.rb | Loading commit data... | |
merge_requests.rb | Loading commit data... | |
milestones.rb | Loading commit data... | |
namespaces.rb | Loading commit data... | |
notes.rb | Loading commit data... | |
notification_settings.rb | Loading commit data... | |
oauth_access_tokens.rb | Loading commit data... | |
oauth_applications.rb | Loading commit data... | |
personal_access_tokens.rb | Loading commit data... | |
personal_snippets.rb | Loading commit data... | |
project_group_links.rb | Loading commit data... | |
project_hooks.rb | Loading commit data... | |
project_members.rb | Loading commit data... | |
project_snippets.rb | Loading commit data... | |
project_wikis.rb | Loading commit data... | |
projects.rb | Loading commit data... | |
protected_branches.rb | Loading commit data... | |
releases.rb | Loading commit data... | |
sent_notifications.rb | Loading commit data... | |
service_hooks.rb | Loading commit data... | |
services.rb | Loading commit data... | |
snippets.rb | Loading commit data... | |
spam_logs.rb | Loading commit data... | |
system_hooks.rb | Loading commit data... | |
todos.rb | Loading commit data... | |
u2f_registrations.rb | Loading commit data... | |
users.rb | Loading commit data... | |
wiki_pages.rb | Loading commit data... |