-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Remove Constrain{Double, Boolean, DOMString, ULong} and {ULong, Double}Range #5975
Comments
Thanks for opening this issue! @saschanaz also has a PR to remove |
There is a discussion on this here https://github.com/mdn/content/discussions/5828 I'm not sure if there is a canonical result from that, but the implication for me was that it is generally OK to delete separate page documentation for dictionaries and that they should be documented in-place instead. |
Thanks for the info! So:
|
Yes, at least for dictionaries used in one place (which is most, but not all, of them). |
That was my take-away. I've cross linked back to here in the hope that you can get more expert confirmation than I can provide :-). Also, thanks to you and @vinyldarkscratch for letting us know in advance. |
To go along with my PR for BCD, I'd love to tackle this one! I've got a couple of questions before beginning, however:
|
@vinyldarkscratch Probably :-) Hard to say without trying it. But yes, I think that is probably your best bet for minimising the amount of duplication and work. So I'd try to pull the definition of But of course it isn't that simple. What should you do in the property pages like https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/deviceId ? My thinking is that you'd TRY to link up to the the Yes, you redirect all of these to Probably there will be some discussion once you have a PR. Sorry I can't be "canonical". |
Thank you very much, this is a big help! I'm going to give a shot a PR for one of these typedefs and should have it up within the hour! |
Ooh, actually, I just noticed that at the top of the page, there's a blurb that might just solve the issue altogether:
The linked page seems to describe the constraint typedefs pretty well, documenting the |
Generally I see guide and reference as separate - so even though this is a good explanation I wouldn't use it as the place where I send people to find out what the dictionaries are. Others might feel differently. |
Definitely agree this is a good thing to clean up! Constraints have a very regular structure allowing both a "naked" value and as well as Is there any precedent we can follow here? I was looking for how we document callback functions as arguments, but |
I've opened #6047 as a proof-of-concept to get an idea for the removal. I'd love to get some feedback on it! |
In mdn/browser-compat-data#11000, @vinyldarkscratch is planning to remove the bcd entries for these 4 typedefs.
This is a good thing™.
But there are timely consequences for MDN content: these four pages will immediately (when yari pick up the new bcd npm package) replace their BCD and spec tables by error messages, which will make them look weird.
I think we should wipe them out of MDN content by replacing every mentions of these typedef (most of the time by using the js type they are typedefing). That way, the MDN users will have the type information they will see in their developer tools and their JavaScript.
With a few ripgrep magic, I see the following tasks to be done:
ConstrainDouble
:ConstrainDouble
page (make it a redirect?)MediaTrackConstraints
,MediaTrackConstraints.volume
,MediaTrackConstraints.frameRate
,MediaTrackConstraints.latency
, andMediaTrackConstraints.aspectRatio
.InputDeviceInfo.getCapabilities
.ConstrainDOMString
:ConstrainDOMString
page (make it a redirect?)MediaTrackConstraints
,MediaTrackConstraints.deviceId
,MediaTrackConstraints.displaySurface
,MediaTrackConstraints.logicalSurface
,MediaTrackConstraints.groupId
,MediaTrackConstraints.cursor
, andMediaTrackConstraints.facingMode
.InputDeviceInfo.getCapabilities
.Screen Capture API
overview page.ConstrainBoolean
:ConstrainBoolean
page (make it a redirect?)MediaTrackConstraints
,MediaTrackConstraints.autoGainControl
,MediaTrackConstraints.logicalSurface
,MediaTrackConstraints.noiseSuppression
, andMediaTrackConstraints.echoCancellation
.InputDeviceInfo.getCapabilities
.DoubleRange
:DoubleRange
page (make it a redirect?)I would add an extra step to prevent them to come back to haunt us in the future:
ConstrainDouble
,ConstrainDOMString
,ConstrainBoolean
,DoubleRange
words (and maybe other similar typedef that weren't used yet).The text was updated successfully, but these errors were encountered: