From 83f9b4fe559b691b1125d34b460c20452ab2c1ce Mon Sep 17 00:00:00 2001 From: vineyardbovines Date: Thu, 20 Aug 2026 14:19:10 -0400 Subject: [PATCH] Explain trending topics in options menu --- src/components/TrendingTopics.tsx | 50 ++++++++++++++++++- .../interstitials/FeedTrendingTopics.tsx | 10 ++-- src/locale/locales/en/messages.po | 48 +++++++++--------- .../Search/modules/ExploreTrendingTopics.tsx | 10 ++-- .../shell/desktop/SidebarTrendingTopics.tsx | 10 ++-- 5 files changed, 88 insertions(+), 40 deletions(-) diff --git a/src/components/TrendingTopics.tsx b/src/components/TrendingTopics.tsx index a067545369..e0afef1ea7 100644 --- a/src/components/TrendingTopics.tsx +++ b/src/components/TrendingTopics.tsx @@ -1,16 +1,62 @@ import {useEffect, useMemo} from 'react' import {type AtUri} from '@atproto/syntax' -import {useLingui} from '@lingui/react/macro' +import {Trans, useLingui} from '@lingui/react/macro' import {PressableScale} from '#/lib/custom-animations/PressableScale' import {useCallOnce} from '#/lib/once' // import {makeProfileLink} from '#/lib/routes/links' // import {feedUriToHref} from '#/lib/strings/url-helpers' -import {native} from '#/alf' +import {atoms as a, native, useTheme} from '#/alf' import {Link as InternalLink, type LinkProps} from '#/components/Link' +import * as Prompt from '#/components/Prompt' +import {Text} from '#/components/Typography' import {type Metrics, useAnalytics} from '#/analytics' import {type app} from '#/lexicons' +export function TrendingTopicsPrompt({ + control, + onConfirm, +}: { + control: Prompt.PromptControlProps + onConfirm: () => void +}) { + const t = useTheme() + const {t: l} = useLingui() + + return ( + + + + Trending topics + + + + Trending topics are based on what people are talking about on the + network. Topic titles and descriptions are generated with AI. + + + + + + + You can update this later from your settings. + + + + + ) +} + export function TrendingTopicLink({ topic: raw, metricContext, diff --git a/src/components/interstitials/FeedTrendingTopics.tsx b/src/components/interstitials/FeedTrendingTopics.tsx index 4d3d9fb0fa..e4e81287b9 100644 --- a/src/components/interstitials/FeedTrendingTopics.tsx +++ b/src/components/interstitials/FeedTrendingTopics.tsx @@ -26,7 +26,10 @@ import {Trending3_Stroke2_Corner1_Rounded as TrendingIcon} from '#/components/ic import {Link} from '#/components/Link' import * as Prompt from '#/components/Prompt' import {SubtleHover} from '#/components/SubtleHover' -import {useTrendingTopicSeen} from '#/components/TrendingTopics' +import { + TrendingTopicsPrompt, + useTrendingTopicSeen, +} from '#/components/TrendingTopics' import {Text} from '#/components/Typography' import {useAnalytics} from '#/analytics' import {type app} from '#/lexicons' @@ -162,11 +165,8 @@ function Inner({feedSliceIndex}: {feedSliceIndex: number}) { - { ax.metric('trendingTopics:hide', {context: 'interstitial'}) setTrendingDisabled(true) diff --git a/src/locale/locales/en/messages.po b/src/locale/locales/en/messages.po index e3f3a86bcf..d7a3f9f0de 100644 --- a/src/locale/locales/en/messages.po +++ b/src/locale/locales/en/messages.po @@ -2419,15 +2419,15 @@ msgstr "" msgid "Browse other feeds" msgstr "" -#: src/components/TrendingTopics.tsx:88 +#: src/components/TrendingTopics.tsx:134 msgid "Browse posts about {displayName}" msgstr "" -#: src/components/TrendingTopics.tsx:96 +#: src/components/TrendingTopics.tsx:142 msgid "Browse posts tagged with {displayName}" msgstr "" -#: src/components/TrendingTopics.tsx:105 +#: src/components/TrendingTopics.tsx:151 msgid "Browse starter pack {displayName}" msgstr "" @@ -2437,7 +2437,7 @@ msgstr "" msgid "Browse topic {0}" msgstr "" -#: src/components/TrendingTopics.tsx:142 +#: src/components/TrendingTopics.tsx:188 msgid "Browse topic {displayName}" msgstr "" @@ -3026,6 +3026,7 @@ msgstr "" #: src/components/ProgressGuide/FollowDialog.tsx:462 #: src/components/StarterPack/Wizard/WizardEditListDialog.tsx:119 #: src/components/StarterPack/Wizard/WizardEditListDialog.tsx:125 +#: src/components/TrendingTopics.tsx:54 #: src/components/verification/VerificationsDialog.tsx:146 #: src/components/verification/VerifierDialog.tsx:147 #: src/components/WhoCanReply.tsx:229 @@ -6161,7 +6162,6 @@ msgstr "" msgid "Hidden list" msgstr "" -#: src/components/interstitials/FeedTrendingTopics.tsx:169 #: src/components/interstitials/Trending.tsx:149 #: src/components/interstitials/TrendingVideos.tsx:140 #: src/components/moderation/ContentHider.tsx:217 @@ -6172,8 +6172,6 @@ msgstr "" #: src/lib/moderation/useLabelBehaviorDescription.ts:23 #: src/lib/moderation/useLabelBehaviorDescription.ts:28 #: src/lib/moderation/useLabelBehaviorDescription.ts:33 -#: src/screens/Search/modules/ExploreTrendingTopics.tsx:104 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:173 msgid "Hide" msgstr "" @@ -6239,13 +6237,11 @@ msgid "Hide translation" msgstr "Hide translation" #: src/components/interstitials/Trending.tsx:131 +#: src/components/TrendingTopics.tsx:41 msgid "Hide trending topics" msgstr "" -#: src/components/interstitials/FeedTrendingTopics.tsx:167 #: src/components/interstitials/Trending.tsx:147 -#: src/screens/Search/modules/ExploreTrendingTopics.tsx:102 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:171 msgid "Hide trending topics?" msgstr "" @@ -10830,8 +10826,8 @@ msgstr "" #: src/components/FeedInterstitials.tsx:495 #: src/components/FeedInterstitials.tsx:554 -#: src/components/interstitials/FeedTrendingTopics.tsx:113 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:80 +#: src/components/interstitials/FeedTrendingTopics.tsx:116 +#: src/view/shell/desktop/SidebarTrendingTopics.tsx:83 msgid "See more" msgstr "" @@ -10839,8 +10835,8 @@ msgstr "" msgid "See more suggested profiles" msgstr "" -#: src/components/interstitials/FeedTrendingTopics.tsx:99 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:66 +#: src/components/interstitials/FeedTrendingTopics.tsx:102 +#: src/view/shell/desktop/SidebarTrendingTopics.tsx:69 msgid "See more trending topics" msgstr "See more trending topics" @@ -13083,9 +13079,9 @@ msgstr "Translation to the same language is unavailable on your device." msgid "Tree view" msgstr "" -#: src/components/interstitials/FeedTrendingTopics.tsx:95 -#: src/screens/Search/modules/ExploreTrendingTopics.tsx:69 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:63 +#: src/components/interstitials/FeedTrendingTopics.tsx:98 +#: src/screens/Search/modules/ExploreTrendingTopics.tsx:72 +#: src/view/shell/desktop/SidebarTrendingTopics.tsx:66 msgid "Trending" msgstr "" @@ -13094,12 +13090,20 @@ msgstr "" msgid "Trending GIFs" msgstr "Trending GIFs" -#: src/components/interstitials/FeedTrendingTopics.tsx:122 -#: src/screens/Search/modules/ExploreTrendingTopics.tsx:72 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:90 +#: src/components/interstitials/FeedTrendingTopics.tsx:125 +#: src/screens/Search/modules/ExploreTrendingTopics.tsx:75 +#: src/view/shell/desktop/SidebarTrendingTopics.tsx:93 msgid "Trending options" msgstr "" +#: src/components/TrendingTopics.tsx:30 +msgid "Trending topics" +msgstr "Trending topics" + +#: src/components/TrendingTopics.tsx:33 +msgid "Trending topics are based on what people are talking about on the network. Topic titles and descriptions are generated with AI." +msgstr "Trending topics are based on what people are talking about on the network. Topic titles and descriptions are generated with AI." + #: src/components/interstitials/TrendingVideos.tsx:88 msgid "Trending videos" msgstr "Trending videos" @@ -14658,11 +14662,9 @@ msgstr "You can read chat history but can’t send new messages." msgid "You can select up to {MAX_GALLERY_IMAGES, plural, other {# images}} in total." msgstr "You can select up to {MAX_GALLERY_IMAGES, plural, other {# images}} in total." -#: src/components/interstitials/FeedTrendingTopics.tsx:168 #: src/components/interstitials/Trending.tsx:148 #: src/components/interstitials/TrendingVideos.tsx:139 -#: src/screens/Search/modules/ExploreTrendingTopics.tsx:103 -#: src/view/shell/desktop/SidebarTrendingTopics.tsx:172 +#: src/components/TrendingTopics.tsx:52 msgid "You can update this later from your settings." msgstr "" diff --git a/src/screens/Search/modules/ExploreTrendingTopics.tsx b/src/screens/Search/modules/ExploreTrendingTopics.tsx index 6bbb6e1e54..e8bfeed54a 100644 --- a/src/screens/Search/modules/ExploreTrendingTopics.tsx +++ b/src/screens/Search/modules/ExploreTrendingTopics.tsx @@ -24,7 +24,10 @@ import {Link} from '#/components/Link' import * as Prompt from '#/components/Prompt' import {RichText} from '#/components/RichText' import {SubtleHover} from '#/components/SubtleHover' -import {useTrendingTopicSeen} from '#/components/TrendingTopics' +import { + TrendingTopicsPrompt, + useTrendingTopicSeen, +} from '#/components/TrendingTopics' import {Text} from '#/components/Typography' import {useAnalytics} from '#/analytics' import {type app} from '#/lexicons' @@ -97,11 +100,8 @@ function Inner() { })} - { ax.metric('trendingTopics:hide', {context: 'explore:trending'}) setTrendingDisabled(true) diff --git a/src/view/shell/desktop/SidebarTrendingTopics.tsx b/src/view/shell/desktop/SidebarTrendingTopics.tsx index 7d0c60fbc1..25f2510798 100644 --- a/src/view/shell/desktop/SidebarTrendingTopics.tsx +++ b/src/view/shell/desktop/SidebarTrendingTopics.tsx @@ -16,7 +16,10 @@ import {DotGrid3x1_Stroke2_Corner0_Rounded as EllipsisIcon} from '#/components/i import {Trending3_Stroke2_Corner1_Rounded as TrendingIcon} from '#/components/icons/Trending' import {Link} from '#/components/Link' import * as Prompt from '#/components/Prompt' -import {TrendingTopicLink} from '#/components/TrendingTopics' +import { + TrendingTopicLink, + TrendingTopicsPrompt, +} from '#/components/TrendingTopics' import {Text} from '#/components/Typography' import {useAnalytics} from '#/analytics' @@ -166,11 +169,8 @@ function Inner() { )} -