-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Update general guideline #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Valeria Graffeo <[email protected]> Co-authored-by: Rob Whittaker <[email protected]> Co-authored-by: Trésor Bireke <[email protected]>
eb96218
to
60e3c61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a mix of multiple unrelated changes:
- Delete Hound guideline
- Move some guidelines out general
- Reformat part of general
- Change guideline on whitespace
Thoughts on making each of these their own commit? Maybe even their own PR? That would allow conversation to happen independently for each, and if one proves controversial then it doesn't block merging the others.
- Delete trailing whitespace. | ||
- Delete trailing spaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace is more than just spaces. It includes other invisible characters such as tabs, newlines, carriage returns or the unicode zero-width-joiner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would "blank spaces" include these characters? Our main goal was to not use "whitespace".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but I think it's more ambiguous because some of the characters aren't spaces.
"Whitespace" seems to be the precise technical term used in e.g. the whatwg spec, the ECMAScript spec, or the Unicode spec to describe the class of characters (although they all define the set slightly differently).
Is "whitespace" in the context of characters and typography considered problematic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also want to ensure we're covering more than just trailing spaces as there's many other characters that one should avoid trailing a line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoelQ Not sure about being considered problematic but in our playbook and best practices chapter, we write:
Use negative space instead of white space.
Of course, it's important to consider the "environment" of where we use a terminology – I just feel if there is a more inclusive naming that captures the same intent, I would prefer using it.
@vburzynski How do you feel about adding these other characters we should avoid to this list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TL;DR: Perhaps "delete trailing spaces" is the better phrasing if we do need to get rid of "whitespace".
Whitespace is the more precise technical term, but there are instances where "trailing whitespace" is shortened to "trailing spaces". I would, however, strongly argue against using "blank space" or "negative space" over "whitespace".
In general, I agree with attempting to use more inclusive verbiage where possible. Yet, in regards to this use case, I think the alternatives muddle the clarity of the guideline. There are instances, however, where trailing whitespace is referred to as trailing spaces so that option would be acceptable (see the link to ESLint below for an example).
More often than not, the trailing characters are spaces, but they could also be many other characters. A whitespace character (no space), as Joel mentioned, is a specific technical concept. There are 25 Unicode characters that fall under the category (see https://en.wikipedia.org/wiki/Whitespace_character)
Whitespace refers to characters which are used to provide horizontal or vertical space between other characters. Whitespace is often used to separate tokens in HTML, CSS, JavaScript, and other computer language
— https://developer.mozilla.org/en-US/docs/Glossary/Whitespace
On the other hand, White Space (the visual arts concept) is more closely related to the concept of Negative Space. There are still slight nuances between the two concepts, but are often interchangeable in the context of design and art. Negative space is the unused space in relation to one or more subjects within that space. White space is the unused or unmarked space. So they're talking about the same thing, but using two different frames of reference.
- trailing whitespace characters would be the most precise phrase
- trailing spaces would be less precise, but acceptable and has demonstrable usage
- negative space is not used to describe whitespace characters in the context of programming.
- blank space feels too ambiguous
- white space is either a different visual arts concept or a misspelling of whitespace.
example usage of "trailing spaces"
example usage of "trailing whitespace"
- https://docs.rubocop.org/rubocop/cops_layout.html#layouttrailingwhitespace
- vscode refers to it as trailing whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think whitespace was to be removed as per inclusive language, but if that's the case, I'm in favor of "trailing spaces" as well, FWIW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤵 Looks good to me!
@slickepinne I think we can merge this 😃 |
We updated the general guidelines and moved language specific guidelines to the relevant folders.
Co-authored-by: Valeria Graffeo [email protected]
Co-authored-by: Rob Whittaker [email protected]
Co-authored-by: Trésor Bireke [email protected]