Add Baseline banner to Fullscreen API pages#43478
Conversation
|
Preview URLs (2 pages) External URLs (1)URL: (comment last updated: 2026-03-20 04:20:18) |
These pages were referencing the `browser-compat` data for the deprecated `api.Document.fullscreen` feature, which doesn't have a corresponding feature ID in `web-features`. As a result, these pages weren't displaying a Baseline banner. By removing that key from `browser-compat`, the features will show the correct Baseline status banner.
89260c4 to
e05f150
Compare
| - api.Document.fullscreenEnabled | ||
| - api.Document.exitFullscreen | ||
| - api.Element.requestFullscreen | ||
| - api.Document.fullscreen |
There was a problem hiding this comment.
Thanks. It works but I'm not sure this is the "right" fix.
@caugner Is there any reason we can't add "a corresponding feature ID in web-features" for api.Document.fullscreen?
There was a problem hiding this comment.
I think my PR is the right fix (though I'm not 100% sure there isn't a better solution)… but I know that adding a web-features ID for api.Document.fullscreen is not the right fix.
-
The
web-featuresbuild will not allow you to create a feature forapi.Document.fullscreen; if you try, its CI will fail with this error.error: fullscreen: contains deprecated compat feature api.Document.fullscreen. This is forbidden for non-discouraged published features.
(I did try that approach before filing this PR!)
-
Let's suppose we somehow made an exception for
api.Document.fullscreen, giving it its own separatelegacy_fullscreenfeature. Well, even then,fredwould refuse to show a Baseline banner on this page, because pages whosebrowser-compatsection lists references multiple differentweb-featuresnever show Baseline banners. "Web components" page missing Baseline status fred#1391
There was a problem hiding this comment.
@dfabulich Sorry, perhaps I should have just been more clear: it is not the right fix.
Baseline needs to be made to work with the docs: we don't mess with docs to get baseline to work.
The right thing to to do is raise an issue against that infrastructure. I've only left this open to keep it visible until @caugner can look. IF you want to create an issue against the https://github.com/mdn/fred (I think?) then we can close this.
There was a problem hiding this comment.
I strongly disagree with your characterization of this PR as "messing with docs to get baseline to work." Removing api.Document.fullscreen from these pages is the right thing to do, regardless of Baseline.
- https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API/Guide doesn't mention or document
api.Document.fullscreenat all. It is completely wrong forapi.Document.fullscreento appear in thebrowser-compatlist on this guide page; removing it is the right thing to do, and it would be the right thing to do even if that had no effect on the Baseline banner. - https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API only links to
api.Document.fullscreento say that it's legacy/deprecated. This page isn't aboutapi.Document.fullscreen; it should be removed from this page also.
Cleaning up invisible metadata wouldn't really be worth filing. The fact that removing api.Document.fullscreen also makes Baseline work is what made this cleanup PR worth filing.
More deeply, Baseline is not allowed to show a banner when there are multiple web features, one of which is deprecated.
- I'm not allowed to add
api.Document.fullscreentoweb-features, so as long asapi.Document.fullscreenappears in thebrowser-compatof this page, it won't have a Baseline banner. There is no reasonable issue anyone could file onfredthat could possibly make that work. - I've already filed "Web components" page missing Baseline status fred#1391 and fixed it in feat(baseline): show banner when all BCD keys have baseline High rari#582 but it's labeled "needs content decision" so it's not allowed to merge.
- But even that PR would only affect pages with multiple web-features where all of them are "Widely Available." There is no issue I can correctly file on
fredthat would show a banner on pages referring to multipleweb-featuresIDs where one of them is "Limited Availability" and one of them is deprecated.
In #43480 (comment) you wrote:
- if a page has more than one browser compat entry then the compatibility is not shown. I'd argue that it would be useful to be able to note that parts of an API are very stable and parts are not.
Good thinking! But, I already tried that, in mdn/rari#527 and it was closed without merging, with this explanation:
As written, this would show a "Limited availability" banner on https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API, which is not really what I think we want.
I can't fix Baseline because it would show the wrong results on Fetch API, but I can't fix Fetch API because I should have fixed Baseline instead.
I'm not sure it's possible to fix bugs in this system. Every part of the system says that it must not be solved here it must be solved somewhere else, anywhere but here.
There was a problem hiding this comment.
I don't have concerns about removing the deprecated feature from browser-compat here, but it would be good to have a second opinion from @LeoMcA.
| browser-compat: | ||
| - api.Document.fullscreenEnabled | ||
| - api.Document.fullscreen | ||
| browser-compat: api.Document.fullscreenEnabled |
There was a problem hiding this comment.
Is it normal for guides to have compat tables? And if it is, shouldn't this guide have the same browser-compat values as the parent page?
| - api.Document.fullscreenEnabled | ||
| - api.Document.exitFullscreen | ||
| - api.Element.requestFullscreen | ||
| - api.Document.fullscreen |
There was a problem hiding this comment.
I don't have concerns about removing the deprecated feature from browser-compat here, but it would be good to have a second opinion from @LeoMcA.
These pages were referencing the
browser-compatdata for the deprecatedapi.Document.fullscreenfeature, which doesn't have a corresponding feature ID inweb-features. As a result, these pages weren't displaying a Baseline banner.By removing that key from
browser-compat, the features will show the correct Baseline status banner.