Skip to content

Interop feature badges #1488

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions frontend/src/static/js/components/webstatus-overview-cells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
import {BROWSER_ID_TO_ICON_NAME, FeatureSortOrderType} from '../api/client.js';
import {ifDefined} from 'lit/directives/if-defined.js';
import {
INTEROP_FEATURES,
TOP_CSS_INTEROP_ISSUES,
TOP_HTML_INTEROP_ISSUES,
} from '../utils/constants.js';
Expand Down Expand Up @@ -202,6 +203,13 @@ function getFeatureBadges(featureId: string): TemplateResult[] {
></webstatus-feature-badge>`,
);
}
if (INTEROP_FEATURES.includes(featureId)) {
extraIdentifiers.push(
html`<webstatus-feature-badge
.badgeType=${'interop'}
></webstatus-feature-badge>`,
);
}
return extraIdentifiers;
}

Expand Down
33 changes: 32 additions & 1 deletion frontend/src/static/js/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,36 @@ export const TOP_HTML_INTEROP_ISSUES: string[] = [
'web-bluetooth',
];

// This focus area to web feature mapping is defined at
// https://github.com/web-platform-tests/interop/blob/main/web-features.json
export const INTEROP_FEATURES: string[] = [
'backdrop-filter',
'largest-contentful-paint',
'anchor-positioning',
'details',
'flexbox',
'grid',
'subgrid',
'json-modules',
'navigation',
'pointer-events-api',
'mouse-events',
'mutation-events',
'scope',
'scrollend',
'storage-access',
'text-decoration',
'urlpattern',
'view-transitions',
'view-transitions-class',
'wasm-string-builtins',
'appearance',
'zoom',
'list-style',
'webrtc-encoded-transform',
'writing-mode',
];

export const DEFAULT_GLOBAL_SAVED_SEARCHES: GlobalSavedSearch[] = [
{
name: 'Baseline 2025',
Expand Down Expand Up @@ -251,7 +281,8 @@ export const BADGE_PARAMS_BY_TYPE = {
interop: {
name: 'INTEROP',
url: 'https://wpt.fyi/interop',
description: 'This feature is a focus area for the Interop 2025 effort.',
description:
'This feature is part of a focus area for the Interop 2025 effort.',
variant: 'neutral',
},
} as const satisfies Record<string, BadgeConfig>;
Expand Down