Draft: feat: enable submitting MR comments in batch

Description

I've attempted to integrate the ability to add notes (comments/threads) to an existing MR for desktop, without instantly publishing them to the API. In the process of getting to understand the existing code, I've drafted two different approaches:

  • Optimistic UI / Limited API Calls:
    • Have the IssuableController hold a BatchReview, that tracks local notes/threads
    • submitting a review posts all pending/local threads
    • More error-prone
  • Simple API-Integration:
    • Register a BatchReviewProvider, that allows for interception of notes before posting them as 'normal' notes
    • Instead publishes a note as pending Draft-Note if in batch-review mode
    • Needs additional visual indicators to distinguish notes in the webview

#526 (comment 2351316547) as requested here, it's probably a good idea to consult the maintainers before finalizing the implementation.

Please note that the current state of the branch is not at all final and not meant for review or merge, as there are quite a few snippets of code that were meant for me to better understand the architecture, or just trying something out. I think just utilizing the draft endpoints will be a more lightweight approach that won't need all my changes, but as suggested I haven't done any cleanup yet. Once I get some inital feedback on the approach and complete the implementation, I'll mark this as ready!

Related Issues

Resolves #526

How has this been tested?

(TODO)

  • If src/browser or src/common has been modified, please consider interoperability with the Web IDE. See Running the Extension in WebIDE.
  • Consider an end-to-end test for significant new features that aren't covered by integration tests.

Screenshots (if appropriate)

(TODO)

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by timokz

Merge request reports

Loading