-
Notifications
You must be signed in to change notification settings - Fork 299
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
Rename Range's 'start' and 'end' to 'range start' and 'range end'. #1168
base: main
Are you sure you want to change the base?
Conversation
I'm sorry, but this seems wrong. Fields shouldn't contain the name of the concept they belong to. I'm not sure how these are used in CSS, but presumably there they would also belong to something? |
Would you prefer the term "start/end point", then, since they are naming boundary points? |
@annevk They're used primarily as adjectives in the CSS specs. |
Yeah, in CSS it's like "the start side", "in the startmost direction", etc. They're just directions, and don't belong to any one concept (thus the current |
(IIUC, cases like this are why I prefer the "explicit for" Bikeshed option...) |
A potential solution for the CSSWG here is to add a link-defaults block to their shared Bikeshed template, preferring CSS terms over any conflicts. |
@domenic I would be glad to have CSS configured to prefer its own terms internally somehow if that's possible; @tabatkins is that possible? (Splitting into modules is useful to us in a lot of ways but it definitely makes cross-linking more of a mess.) That said, I do think the DOM spec would be easier to read if the “start” and “end” concepts were a bit more specific, regardless, though, so maybe we can do both? At least I found things easier to read when reviewing the built results of the patch here, and I suspect Tab's follow-up suggestion of using “start point” and “end point” would have a similar effect. The extra word helps anchor it as a technical term referring to a particular data member, rather than as its more general English usage. |
I think the cases where it might help readability are due to a bug. There's a number of places such as https://dom.spec.whatwg.org/#dom-range-selectnodecontents that really ought to say "this's start" but instead just say "start". |
I don't think this is at all universal - we often put the parent term into sub-definitions, for readability. We'll often put in a local-lt without the prefix, so it's not too repetitious in the spec itself, which is most likely to say it a bunch and have the context already, but that's it.
It's not currently possible; it would require some categorization and logic that does not exist currently. Probably something I want eventually, but still needs a lot of thought to make it more than just "something for the CSSWG to use". |
I don't understand. Can't you just add <pre class=link-defaults>
spec:css-writing-modes-4; type:dfn; text:start
</pre> to the CSSWG template, e.g. in https://github.com/speced/bikeshed-boilerplate/blob/main/boilerplate/csswg/abstract.include ? |
I was responding to the request for a more general "prefer CSS terms". |
That... only helps somewhat. :) I know that it's completely unambiguous when you focus hard on the words and force your brain to interpret them as technical terms referring to particular data points, but they're such generic terms that it takes extra mental effort to do that. (At least for me, as someone who doesn't spend as much time in the DOM spec.) I do think either the original PR or using Tab's suggestion of “start point” and “end point” would help here. Like, this is easy for me to parse, because “start node” is clearly a term referring to a bit of data:
but this one is hard, because it's not immediately obvious what kind of thing “start” is:
If that works, then using that to solve the disambiguation issue sounds reasonable to me, and I'd be in favor of doing it anyway to avoid any future problems. (Still leaves the readability aspect for the DOM spec itself, though.)
Right, we do this a lot in the CSS specs: it gives flexibility within the spec to include more or less context into the term depending on how much context is needed in that particular instance of use, and also with not exporting overly-generic terms--which helps with avoiding conflicts, but also with readability by including more context into the linking term when it's used from the outside. Like, I would really like to be able to link “URL fragment” as a term; “fragment” by itself is too vague in a lot of sentences. :/ |
Right, But |
"url/fragment" standalone would be incorrect usage. It's a member of the URL concept. It might make sense to have a standalone "URL fragment" concept, but it would be something else (perhaps what "url/fragment" contains). We try to be quite careful about these things. |
@annevk I have no idea what your last comment means. :/ In any case, @tabatkins @annevk can we move forward here by:
If we can do both of these things I think both the CSS and DOM specs’ situations will have improved. |
https://dom.spec.whatwg.org/#concept-range-start
These definitions are correctly namespaced, but the words are still pretty generic, which has two problems:
[=CSS/start=]
. (There are other definitions of plain "start"/"end" in Bikeshed's db also, but none of them are exported so they don't interfere.)Would you mind renaming to "range start" and "range end"? This would also simplify your markup a bit - right now every usage of the terms is written as
<a for=range>start</a>
; after this fix they'd be[=range start=]
. This PR does so, and I believe is an editorial improvement.Preview | Diff