KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
270 stars 18 forks source link

Code editor missing syntax highlighting #2796

Open ZooSpiritWolf opened 3 days ago

ZooSpiritWolf commented 3 days ago

🐛 on Dev

Steps to reproduce:

  1. Login in to zoo${uuid}+sketchrectangle@qawolf.email
  2. Start Sketch
  3. Click the blue plane (XZ)
  4. Select Rectangle tool + create rectangle
  5. Open Code Editor Expected: Code has correct syntax highlighting Actual: Code is missing highlighting and missing formatting i.e., [ 'rectangleSegmentA001' ] with red text vs [ $rectangleSegmentA001 ] Timestamp: 0:01 Video: https://www.loom.com/share/9a11fce05a704ae7958e6500c5211184?sid=87e42e14-e19e-410e-acfd-31ef4d36e3ba (https://www.loom.com/share/9a11fce05a704ae7958e6500c5211184?sid=87e42e14-e19e-410e-acfd-31ef4d36e3ba)

Bug report: https://app.qawolf.com/zoo/bug-reports/9a7c1c9e-c7b5-453f-8c23-ebe90d5e4e7d

Affected workflows: • Sketch Rectangle - https://app.qawolf.com/zoo/workflows/clw9me0fq0ssxorodw8h3nqpf

If you are aware of this bug you can set the priority to low which will prevent it from causing a run failure.

jessfraz commented 3 days ago

ah okay this is likely due to the fact we use the js syntax highlighter under the hood versus our own codemirror one similar to https://github.com/KittyCAD/modeling-app/issues/2214

at this point since our ast is diverging from js so much I guess it is worth biting off doing our own lexer

Irev-Dev commented 3 days ago

Oh true #2769 etc is probably what took us over the edge.

jessfraz commented 3 days ago

this looks fine in dark mode... its only light mode but im still working on a lsp semantic tokens to code highlighting for codemirror anyways makes it less suss dark mode looks fine

Screenshot 2024-06-25 at 8 57 07 PM