Skip to content

Conversation

@foolip
Copy link
Collaborator

@foolip foolip commented Apr 23, 2024

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)

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Apr 23, 2024
index.ts Outdated
import { BASELINE_LOW_TO_HIGH_DURATION } from 'compute-baseline';

// The longest name allowed, to allow for compact display.
const nameMaxLength = 50;
Copy link
Contributor

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.

Copy link
Collaborator Author

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 :)

Copy link
Contributor

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.

Copy link
Collaborator Author

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.

@foolip foolip changed the title Limit the length of names Limit the length of names to 80 characters Apr 24, 2024
@foolip foolip merged commit d103995 into web-platform-dx:main Apr 24, 2024
@foolip foolip deleted the nameMaxLength branch April 24, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants