algorithm-archive icon indicating copy to clipboard operation
algorithm-archive copied to clipboard

Discussion about code line length

Open stormofice opened this issue 3 years ago • 2 comments

Description

Currently code blocks in the AAA handle lines [which are longer than possible (for the current view width)] by inserting a scroll bar on the bottom of the code block and making it scrollable horizontally.

Long (one-line) code comments (as shown in #662) can create pretty long lines, which may not be suitable/comfortable to view on devices with narrow screens, so it may be time to think about alternative solutions for displaying overly long code lines.

For Algorithm Archive Developers

  • [ ] This feature can be added to the Master Overview (if it cannot be, explain why in a comment below -- lack of technical expertise, not relevant to the scope of this project, too ambitious)
  • [ ] There is a timeline for when this feature can be implemented
  • [ ] The feature has been added to the Master Overview
  • [ ] The feature has been implemented (Please link the PR)

stormofice avatar Dec 01 '21 01:12 stormofice

We used to have a "soft rule" of 80 columns a while back, which was enforced by several linters, but these had to be run locally. Now that we have a more robust build system, I wonder how hard it would be to enforce certain rules for most languages?

I think the problem is that some linters (like Julia's) do not deal with comment-length, which is the exact purpose of this PR, but I think I know how to fix that and can see if I can push it upstream, maybe?

leios avatar Dec 01 '21 07:12 leios

We could run linters yes, but I would also like to fix the editor to wrap overflow.

ntindle avatar Dec 01 '21 16:12 ntindle