Skip to content

Add Baseline banner to Fullscreen API pages#43478

Open
dfabulich wants to merge 1 commit intomdn:mainfrom
dfabulich:fullscreen-baseline
Open

Add Baseline banner to Fullscreen API pages#43478
dfabulich wants to merge 1 commit intomdn:mainfrom
dfabulich:fullscreen-baseline

Conversation

@dfabulich
Copy link
Contributor

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.

@dfabulich dfabulich requested a review from a team as a code owner March 17, 2026 15:50
@dfabulich dfabulich requested review from hamishwillee and removed request for a team March 17, 2026 15:50
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Mar 17, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

Preview URLs (2 pages)

External URLs (1)

URL: /en-US/docs/Web/API/Fullscreen_API
Title: Fullscreen API

(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.
@dfabulich dfabulich force-pushed the fullscreen-baseline branch from 89260c4 to e05f150 Compare March 20, 2026 04:18
- api.Document.fullscreenEnabled
- api.Document.exitFullscreen
- api.Element.requestFullscreen
- api.Document.fullscreen
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

  1. The web-features build will not allow you to create a feature for api.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!)

  2. Let's suppose we somehow made an exception for api.Document.fullscreen, giving it its own separate legacy_fullscreen feature. Well, even then, fred would refuse to show a Baseline banner on this page, because pages whose browser-compat section lists references multiple different web-features never show Baseline banners. "Web components" page missing Baseline status fred#1391

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.fullscreen to web-features, so as long as api.Document.fullscreen appears in the browser-compat of this page, it won't have a Baseline banner. There is no reasonable issue anyone could file on fred that 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 fred that would show a banner on pages referring to multiple web-features IDs 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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants