Skip to content
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

[BUG] Web Features API omits mobile support information #996

Open
jamesnw opened this issue Dec 18, 2024 · 1 comment
Open

[BUG] Web Features API omits mobile support information #996

jamesnw opened this issue Dec 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jamesnw
Copy link

jamesnw commented Dec 18, 2024

Describe the bug

The get_feature endpoint uses the defaultBrowsers set.

This omits mobile browsers, which are taken into account for baseline status.
https://github.com/GoogleChrome/webstatus.dev/blob/main/backend/pkg/httpserver/server.go#L106-L113

To Reproduce
Steps to reproduce the behavior:

  1. Load https://api.webstatus.dev/v1/features/paint-order
  2. See that mobile browser information is not included

Expected behavior
Support information for android_chrome, firefox_chrome and safari_ios should be included.

Additional context
This is causing issues with the baseline-status web component, which renders paint-order as limited availability, but with all green checkmarks, as Safari iOS does not support it.

image

web-platform-dx/baseline-status#46

@jcscottiii
Copy link
Collaborator

jcscottiii commented Dec 19, 2024

Notes for self

We also need to ingest the data before we can actually show it.

We still get browser release info from BCD

const (
Chrome BrowserName = "chrome"
Edge BrowserName = "edge"
Firefox BrowserName = "firefox"
Safari BrowserName = "safari"
)

Then when we need to handle the mobile cases here when we get the data from web features

func extractBrowserAvailability(
featureData web_platform_dx__web_features.FeatureValue) []gcpspanner.BrowserFeatureAvailability {
var fba []gcpspanner.BrowserFeatureAvailability
support := featureData.Status.Support
if support.Chrome != nil {
fba = append(fba, gcpspanner.BrowserFeatureAvailability{
BrowserName: "chrome",
BrowserVersion: *support.Chrome,
})
}
if support.Edge != nil {
fba = append(fba, gcpspanner.BrowserFeatureAvailability{
BrowserName: "edge",
BrowserVersion: *support.Edge,
})
}
if support.Firefox != nil {
fba = append(fba, gcpspanner.BrowserFeatureAvailability{
BrowserName: "firefox",
BrowserVersion: *support.Firefox,
})
}
if support.Safari != nil {
fba = append(fba, gcpspanner.BrowserFeatureAvailability{
BrowserName: "safari",
BrowserVersion: *support.Safari,
})
}
return fba
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants