-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support same name for static method and instance method #104
Comments
Done! |
AFAIK there is a concrete proposal: https://github.com/mdn/content/discussions/5121#discussioncomment-785747 which is waiting for implementation. We talked about this the other day and thought it would be much easier to implement once we had page types for Web/API, which I think we will get done in the next few weeks (mdn/content#16255). cc @Rumyra . |
Thanks for filing this OWD project proposal! I'm a bit unclear what is the scope here. It would be nice if that could be clarified so I can then run this against the OWD prioritization criteria which guides us to make decisions.
(We do have page types now.) |
This is the motivating case, to make it possible to document these at the same time, in a pattern that can be followed by other cases in the future. Even if that's something unsightly like https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static for now, I'd still consider this resolved. |
Another problem here which isn't being addressed at the moment AFAIK is slugs: we need a way to have different URLs for static/instance methods/properties. Maybe either:
or:
? I think I like the first better, but there's much more stuff in it. |
Related BCD issue: mdn/browser-compat-data#16613 |
Things we need for this to get done:
The tricky bit left is slugs, since we've not discussed this yet. I expect we will end up with a One thing we have talked about is that these changes will make titles longer, so they will wrap more often (wrapping is already a problem for Yari). It would be great to have a design fix for this (e.g. auto scaling font size so it fits, and/or giving titles more width), but that would probably stop us getting this done in Q4. Anything else? |
See also https://github.com/orgs/mdn/discussions/264 (I wish GitHub added links for discussions). |
Things we need for this to get done:
|
Nice to see progress here! The new titles are great. There's some cleanup to do still I think, e.g.
|
Thanks for the nice feedback!
Yes, link text is a separate thing from titles and will take some thinking about. There's a mini-thread about this here: https://github.com/orgs/mdn/discussions/248#discussioncomment-4102050 . I agree with you that in this context just the member name The next piece though, which is needed to support static and instance members with the same name, is to give them different URLs: https://github.com/orgs/mdn/discussions/264.
It doesn't seem to be, from the IDL: https://drafts.fxtf.org/geometry/#dommatrixreadonly , am I missing something? |
I'm trying to understand what if anything we need to do about domxref here. I think that after adding the _static suffix, existing domxref links will still work, because of redirects. So for instance: https://github.com/mdn/content/blob/f29d8a648ef7ada05a00c358bfb9e9f67f3bc90d/files/en-us/web/api/abortsignal/index.md?plain=1#L25 will still work, because This does mean that if people ever make an "instance version" of one of the 42 currently existing static method/property, we will get errors. For new statics, like mdn/content#21550, people will need to call domxref like:
...which is a bit ugly. We could add something to domxref that removes the
? @teoli2003 , wdyt, am I missing something here? |
Yes, they will still work, but this will raise a flaw too (as it is a redirect)
Yes, the redirect file will not like it and we will need to fix it. I don't expect this to happen, though. If a non-static version of one of these 42 static members is ever created (and we fix the redirect file), the macros will then point to the non-static version.
We can add this, sounds like a good idea. Anyway, we need to fix the existing ones (we'll do this while fixing flaws), as if we create a non-static version in the future, they will suddenly point to the wrong page. Macros are painful to maintain: regular links would "just" work and we'll have been automatically fixed already ( |
This has been discussed in https://github.com/mdn/content/discussions/5121 and there's general agreement that something needs to be done, but no concrete proposal on the table. whatwg/fetch#1392 will not be possible to document until this is resolved.
@teoli2003 can you label this
proposed for Q3 2022
?The text was updated successfully, but these errors were encountered: