Skip to content

codemirror file view: Improve line selection UX

Administrator requested to merge fkling/cm-fv-sl into main

Created by: fkling

This PR makes two changes:

To achieve parity with the current (HTML-based) blob view, the background color of the line numbers of selected lines also changes.

Right now "select-by-drag" doesn't update the selected lines when the mouse cursor leaves the line number gutter during the process. This was changed by binding the corresponding event handler to window instead.

Before/after video:

https://user-images.githubusercontent.com/179026/183857589-9782b79f-6c97-4428-9692-4da4ba5d8bb7.mp4

Test plan

Click and drag to select lines. Line decoration includes line number gutter and moving the mouse outside the line number gutter still updates the selected lines in real time.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading