Revise performance timing entries' names and descriptions - #4278
Conversation
tunetheweb
left a comment
There was a problem hiding this comment.
Mostly LGTM but if we're capitalising some, then I'd capitalise them all. The specs mostly treat these as proper nouns (though not in all places I've noticed!).
And similarly I'd suggest adding "peformance entries" consistently.
I've also suggested changes to Visibility State and Resource Timing to make them clearer.
| @@ -1,5 +1,5 @@ | |||
| name: Element timing | |||
There was a problem hiding this comment.
| name: Element timing | |
| name: Element Timing performance entries |
| @@ -1,5 +1,5 @@ | |||
| name: Layout instability | |||
There was a problem hiding this comment.
| name: Layout instability | |
| name: Layout Instability performance entries |
| @@ -1,5 +1,5 @@ | |||
| name: Navigation timing | |||
There was a problem hiding this comment.
| name: Navigation timing | |
| name: Navigation Timing performance entries |
| @@ -1,5 +1,5 @@ | |||
| name: Paint timing | |||
There was a problem hiding this comment.
| name: Paint timing | |
| name: Paint Timing performance entries |
| @@ -1,5 +1,5 @@ | |||
| name: Resource timing | |||
There was a problem hiding this comment.
| name: Resource timing | |
| name: Resource Timing performance entries |
| @@ -1,5 +1,5 @@ | |||
| name: Soft navigation performance entries | |||
There was a problem hiding this comment.
| name: Soft navigation performance entries | |
| name: Soft Navigation performance entries |
| @@ -1,5 +1,5 @@ | |||
| name: Resource timing | |||
| description: "`PerformanceResourceTiming` entries report when network events happen while loading a resource, such as when connections start and end. You can use this information to measure loading times." | |||
| description: A `PerformanceResourceTiming` performance entry records when a network event happens while loading a resource, such as when a connection starts and ends. You can use this information to measure loading times. | |||
There was a problem hiding this comment.
| description: A `PerformanceResourceTiming` performance entry records when a network event happens while loading a resource, such as when a connection starts and ends. You can use this information to measure loading times. | |
| description: A `resource` performance entry records network event timings, such as when a connection starts and ends or loading time, for resources requested by a page. |
| @@ -1,5 +1,5 @@ | |||
| name: Page visibility state | |||
There was a problem hiding this comment.
| name: Page visibility state | |
| name: Page Visibility State Entry performance entry |
I think this is especially important to rename to differentiate it from page-visibility.yml (which is related but different - one just gets the current state, the other monitors for changes).
|
Thanks for the early review, @tunetheweb! I'm still not sure about capitalization. I agree we should capitalize proper nouns, but I'm not inclined to defer to specs as a rule. They're almost German in their tendency towards capitalization and, as you've noted, not consistently edited. "Paint timing" is a good example where even the spec is seemingly unconvinced that it's a proper noun, shedding the capitalization after the early sections. Instead, I'd suggest we follow capitalization where the named measures have a well-known-to-developers initialism or it's likely to be known that way. Or, more generally, if there's a term of art that is likely to be capitalized by developers, but I don't think we have a good example in this batch. In this case, I think that means we capitalize:
And though they're not mentioned in feature names, in the description for the
Are there any others you want to make a case for? (Otherwise, consistency across these features would be good. I should also pluralize consistently here, with "performance entries.") |
|
Yeah it's a tricky one! Some more thoughts: I think to explain the spec choices (somewhat) there is a difference between using an API (e.g. "The page uses the Paint Timing API") and the concept ("this is used to measure paint timings - i.e. the timing of paints"). But the concept could also be worded in terms of the API ("this is used to measure the Paint Timing (as defined by the spec) of the page"). But that nuance is tricky to comprehend. However for web features the concept is more important than the API IMHO so we probably shouldn't capitalise unless there's a well-known acronym/initialism as you say. That also fits with other examples of features like "View transitions" which is not capitalised, despite there being a "View Transition API" and a "View Transitions" spec. So plus one to that. And agree FP and FCP deserve that capitalism while others (e.g. "Navigation timing") do not. When it comes to acronyms, there is another subtlety in that we have APIs ( But this introduces another couple of oddities:
So, at the end of that meandering thought, I think I'm back to NOT capitalising them after all! Even if there's a well-known initialism. |
A follow up to #4237.