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

Add guideline about chaining to style guide

Open meezwhite opened this issue 6 months ago • 1 comments

Increasing access

Improve style guide to prevent future inconsistencies in docs.

Most appropriate sub-area of p5.js?

Feature enhancement details

In reference to https://github.com/processing/p5.js/issues/6400#issuecomment-1709419148, as proposed by @nickmcintyre, to add guideline about chaining functions to styleguide.

// Nope.
fill(0)
  .strokeWeight(0)
  .textSize(10);

// Nope.
fill(0).strokeWeight(0).textSize(10);

// Yep.
fill(0);
strokeWeight(0);
textSize(10);

meezwhite avatar Feb 07 '24 18:02 meezwhite

Hey @meezwhite I would like to work on this issue. Please assign it to me.

Anayverma avatar Feb 12 '24 11:02 Anayverma

Yes I think that is fine to add, @meezwhite you can go ahead with a PR if you like.

limzykenneth avatar Feb 26 '24 17:02 limzykenneth