Skip to content

Fix source code scrolling

Jacques Erasmus requested to merge 415753-fix-source-code-scrolling into master

What does this MR do and why?

Fixes the issue where line numbers were not sticky while scrolling

Note, changes in this MR are behind the highlight_js_worker feature flag.

Screenshots or screen recordings

Before After
Screen_Recording_2023-11-21_at_13.07.21.2023-11-21_13_08_48 Screen_Recording_2023-11-21_at_13.07.44.2023-11-21_13_09_45

How to set up and validate locally

  1. Run echo "Feature.enable(:highlight_js_worker)" | gdk rails c
  2. Open a source code blob via the repository files browser (sample.json)
  3. While scrolling on the x-axis the line numbers should stay visible.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #415753 (closed)

Edited by Jacques Erasmus

Merge request reports