Skip to content

Make selections specific to a code view

Warren Gifford requested to merge selections-code-view into master

Created by: lguychard

Having selections as a property of CodeHost is a problem, because it is incorrect to assume that all code views on the page have the same selections.

This adds getSelections and observeSelections as optional properties of CodeViewSpec, and changes the code to make sure that when selections change, we only set them on the relevant editor. Selections are parsed from the URL hash on single file code views, only for code hosts where this is relevant (GitHub, Gitlab).

Merge request reports

Loading