Skip to content
Snippets Groups Projects

fix: avoid duplicate decorations (fixes #1231)

Merged Warren Gifford requested to merge lg/fix-duplicate-decorations into master

Created by: lguychard

This fixes #1231 (closed), but the overall behaviour of decorations still leaves to be desired, notably when several extensions try to decorate the same line (eg git blame + codecov). For this to work well, we need something akin to vscode's DecorationType

Will write follow-up issues to decouple decoration merge/update logic from the DOM, and harmonize it between the website and the browser extension (currently the behaviour is different, but broken in both), and make sure adding decorations from several extensions, and toggling them, is handled gracefully.

The code changed here is currently hard to test due to high coupling in handleCodeHost (eg. it's not trivial to "setDecorations" from one or several mocked extension in unit tests). Will also work on making this more modular/testable.

Merge request reports

Merged by avatar (Jul 12, 2025 5:46pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading