From 1870927261ba6502ed66c44f00ce65046797f126 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Mon, 12 Apr 2021 15:53:16 +0200 Subject: [PATCH 1/2] Treat BCD ranges as exact versions to avoid confusion for the reader --- .../browser-compatibility-table/feature-row.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx index 34173e96940a..0f11b7611000 100644 --- a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx +++ b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx @@ -105,16 +105,11 @@ function labelFromString(version: string | boolean | null | undefined) { if (typeof version !== "string") { return <>{"?"}; } - if (!version.startsWith("≤")) { - return <>{version}; + // Treat BCD ranges as exact versions to avoid confusion for the reader + if (version.startsWith("≤")) { + return <>{version.slice(1)}; } - const title = `Supported in version ${version.slice(1)} or earlier.`; - return ( - - ≤  - {version.slice(1)} - - ); + return <>{version}; } const CellText = React.memo( From f1bb058df8207396b766aa3067e6f1c35c076673 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 13 Apr 2021 16:09:06 +0200 Subject: [PATCH 2/2] Update client/src/document/ingredients/browser-compatibility-table/feature-row.tsx Co-authored-by: Peter Bengtsson --- .../ingredients/browser-compatibility-table/feature-row.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx index 0f11b7611000..52de03ae4425 100644 --- a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx +++ b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx @@ -106,6 +106,7 @@ function labelFromString(version: string | boolean | null | undefined) { return <>{"?"}; } // Treat BCD ranges as exact versions to avoid confusion for the reader + // See https://github.com/mdn/yari/issues/3238 if (version.startsWith("≤")) { return <>{version.slice(1)}; }