p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

CM6: Line numbering misalignment, temporary font-size compression and unexpected fold arrow rendering on larger screens

Open yugalkaushik opened this issue 6 months ago • 4 comments

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

In the cm6 branch, the editor UI has a few visual inconsistencies compared to the current editor implementation. The current editor (attached preview) renders correctly with proper line number alignment, stable spacing and expected behavior. However, in the cm6 branch, there are multiple UI regressions affecting readability and layout consistency.

  1. Line number alignment is off
  2. Font-size change causes temporary compression
  3. Unexpected function closing/fold arrow rendering on larger screens

Expected Behavior

The cm6 editor should match the behavior and visual consistency of the current editor:

  1. Properly aligned line numbers
  2. Stable layout during font-size changes (no temporary compression)
  3. No unexpected fold/function arrow rendering on larger screens

Steps to reproduce

Steps:

  1. Open the editor
  2. Open settings and try changing the font size

CM6 preview: https://github.com/user-attachments/assets/fae89573-5b8a-4dbb-bc1f-f5ec79fc939d

Image

Expected/Current:

https://github.com/user-attachments/assets/4da252d4-69a5-4c96-949c-27c70d593c0e

yugalkaushik avatar Jun 01 '26 19:06 yugalkaushik

Hi @khanniie, I'd like to work on this once it gets approved.

parthjadhao01 avatar Jun 02 '26 12:06 parthjadhao01

Hi @khanniie, I'd like to work on this once it gets approved.

@parthjadhao01 sounds good! Thank you!

khanniie avatar Jun 02 '26 15:06 khanniie

@parthjadhao01 Just a suggestion, before directly jumping into the fix, check the develop branch first and compare the methods and CSS being used there with what is currently missing in the codemirror branch. It will help you understand the existing implementation better and identify gaps before making changes in the codebase.

yugalkaushik avatar Jun 02 '26 16:06 yugalkaushik

Thanks for the suggestion! I'll make sure to check the develop branch first before making any changes

parthjadhao01 avatar Jun 02 '26 16:06 parthjadhao01