From a53b1380d2d4de84c5d2dd519576a94a498b7552 Mon Sep 17 00:00:00 2001 From: Jazzy Gasper Date: Sat, 14 Dec 2024 15:12:38 -0800 Subject: [PATCH 1/3] feat(compatibility-table): add browser name to compatibility table tooltip --- .../ingredients/browser-compatibility-table/feature-row.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a3cd6a805948..18d7d388788e 100644 --- a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx +++ b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx @@ -221,7 +221,7 @@ const CellText = React.memo( bc-level-${supportClassName} icon icon-${supportClassName}`} - title={title} + title={`${title}\n${browser.name} ${added ? added : ""}`} > {title} From bf9bfebef243a069aa11bdcfaaf5923931432b06 Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 27 Jan 2025 23:35:51 +0100 Subject: [PATCH 2/3] chore(bcd): prefix title with browser name --- .../browser-compatibility-table/feature-row.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 18d7d388788e..30034244b90c 100644 --- a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx +++ b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx @@ -198,16 +198,18 @@ const CellText = React.memo( break; case "preview": - title = "Preview browser support"; + title = "Preview support"; label = status.label || browser.preview_name; break; case "unknown": - title = "Compatibility unknown; please update this."; + title = "Support unknown"; label = "?"; break; } + title = `${browser.name} – ${title}`; + return (
{title} From 66614ec08f6e910854da86e5e003f8df1c8c5a4b Mon Sep 17 00:00:00 2001 From: Claas Augner Date: Mon, 27 Jan 2025 23:44:39 +0100 Subject: [PATCH 3/3] enhance(bcd): prefix release date title --- .../browser-compatibility-table/feature-row.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 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 30034244b90c..0ed42fd36302 100644 --- a/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx +++ b/client/src/document/ingredients/browser-compatibility-table/feature-row.tsx @@ -48,15 +48,6 @@ function getSupportClassName( return className; } -function getSupportBrowserReleaseDate( - support: SupportStatementExtended | undefined -): string | undefined { - if (!support) { - return undefined; - } - return getCurrentSupport(support)!.release_date; -} - function StatusIcons({ status }: { status: BCD.StatusBlock }) { const icons = [ status.experimental && { @@ -139,7 +130,7 @@ const CellText = React.memo( const added = currentSupport?.version_added ?? null; const lastVersion = currentSupport?.version_last ?? null; - const browserReleaseDate = getSupportBrowserReleaseDate(support); + const browserReleaseDate = currentSupport?.release_date; const supportClassName = getSupportClassName(support, browser); let status: @@ -235,7 +226,7 @@ const CellText = React.memo( className="bc-version-label" title={ browserReleaseDate && !timeline - ? `Released ${browserReleaseDate}` + ? `${browser.name} ${added} – Released ${browserReleaseDate}` : undefined } >