mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.18k stars 501 forks source link

Baseline component seems to show incorrect Baseline status or BCD is incorrect #10297

Open teoli2003 opened 8 months ago

teoli2003 commented 8 months ago

Summary

Baseline provides information about the status of a feature.

It is displayed on subfeatures too.

This leads to incoherence: a feature can be marked as limited availability on a page where the subfeature is available for a long time. Example: https://developer.mozilla.org/en-US/docs/Web/CSS/:defined

As it is not clear in the banner that the feature and the subfeature are two different things, this leads to confusion to readers (we get report every week of errors)

URL

https://developer.mozilla.org/en-US/docs/Web/CSS/:defined

Reproduction steps

Trivial

Expected behavior

Either the banner should be displayed on the feature only and not the subfeature; or the banner should make it clear it is for the whole feature, to avoid confusion.

Actual behavior

The banner is confusing.

Device

Other (specify below)

Browser

Other (specify below)

Browser version

Other version (specify below)

Operating system

Other (specify below)

Screenshot

No response

Anything else?

No response

Validations

LeoMcA commented 7 months ago

Our current "sticking plaster" fix for this is to add problematic BCD queries to a blocklist, like so:

However, ultimately this is something we need to fix in collaboration with upstream, much discussion about showing per-feature rather than per-group baseline statuses has happened here: https://github.com/web-platform-dx/web-features/issues/495

And publishing code to allow us to do those computations is happening here: https://github.com/web-platform-dx/web-features/issues/544. It may be that we use this code to compute a Baseline banner for the BCD keys shown on each page, or it may be that we use this code to simply hide the group banner if there's a discrepancy - most recent discussion has tended towards the latter.