p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

Add line numbers into the gutter instead of a grey solid line

Open GaurangTandon opened this issue 6 years ago • 3 comments

It seems that a lot of useful real estate is otherwise being wasted in the /examples/*.html code editor: (example link)

image

It might be useful to display line numbers instead of that grey solid line. Thoughts? May I work on this issue @lmccart @limzykenneth ?

GaurangTandon avatar Mar 18 '19 13:03 GaurangTandon

@GaurangTandon can you say more about why the line numbers are useful in this case? I know they're often useful when debugging or discussing code with others, but since we don't have a console on this page and the examples are already (in theory) complete, I don't know if this is such a big use case. I just want to make sure we're not just adding visual noise. I don't think the gray bar is just wasting space, it's a visual element that helps the viewer quickly delineate the bounds of the example space.

lmccart avatar Mar 18 '19 14:03 lmccart

Hey @lmccart,

I know they're often useful when debugging or discussing code with others

that is precisely the reason why I wished to add the line numbers. If I am a student and wished to ask my professor about a particular code example, I could simply say: "Could you please look at line 26 and explain to me how xyz works there?" I believe this could be useful this way.

GaurangTandon avatar Mar 18 '19 15:03 GaurangTandon

Design wise I think the grey bar helps with quickly identifying where the code start and end so I would suggest keeping it, maybe reducing its width only if absolutely necessary.

I agree that line numbers are useful in teaching situation to get people's attention on a specific line instead of using a mouse cursor to point to a line in class.

limzykenneth avatar Mar 19 '19 11:03 limzykenneth