Skip to content

Reduction in line character limit #48

@paulalden

Description

@paulalden

I have been working within the Hyku codespace for a little while and have been struggling with the higher character limit that you permit for each line of code - I believe this is currently set to 200 characters per line.

As someone who struggles periodically due to mild dyslexia, incredibly long lines of code are far harder to comprehend in their entirety than those which have been broken up for brevity.

I will provide an example below and please note I mean no disrespect to the owner of this code, it is only used because of its length of 184 characters - 16 character below your upper limit:

if Hyrax::PresenterFactory.build_for(ids: [collection.thumbnail_id], presenter_class: Hyrax::FileSetPresenter, presenter_args: [current_ability, request]).first&.solr_document&.public?

If this were broken up so that the options for the build_for method were on a seperate line, the entire condition can be much more easily comprehended:

options = { 
    ids: [collection.thumbnail_id], 
    presenter_class: Hyrax::FileSetPresenter, 
    presenter_args: [current_ability, request] 
} 
if Hyrax::PresenterFactory.build_for(options).first&.solr_document&.public?

Thank you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions