-
Notifications
You must be signed in to change notification settings - Fork 194
Limit the length of names to 80 characters #933
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
index.ts
Outdated
| import { BASELINE_LOW_TO_HIGH_DURATION } from 'compute-baseline'; | ||
|
|
||
| // The longest name allowed, to allow for compact display. | ||
| const nameMaxLength = 50; |
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 like the fact that we enfore a max limit. I imagine this could be a useful guarantee to consumers of the data.
I don't know about picking 50 though. It feels a tad short and I'm guessing we might need to up that limit at some point in the future.
How about picking 100 instead? It feels more manageable on the long run, and would still play the role of communicating a limit to consumers.
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 think 100 is longer than we need since the longest we've written so far was only 56 characters long, and arguably that was a bad "short" name. I'd prefer names that would fit in a presentation like https://wpt.fyi/interop-2024 without line wrapping, but that only fits roughly 40 characters, and I think that's too short.
The longest I think we should go is 80, as a commonly used line length limit:
https://softwareengineering.stackexchange.com/questions/148677/why-is-80-characters-the-standard-limit-for-code-width
Following some Git conventions, 50 and 72 are also options:
https://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting
(But this isn't why I picked 50, I discovered this now.)
Since any limit is better than no limit, I'll take anything we can agree to :)
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.
My vote goes to 80.
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.
80 it is! I'll also back out the name changes that aren't needed then.
Co-authored-by: Patrick Brosset <[email protected]>
Shorten two CSS function features, the longest of which was 56
characters long. The remaining names that list function names consists
of 3 functions or less.
The longest remaining name is 43 characters long:
ARIA attribute reflection (initial support)