Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[Explore] Add index to view metric (#8124)

* add index to view metric

* supply index

* always return a number

authored by

Samuel Newman and committed by
GitHub
0004e274 ceb51c7e

+3 -2
+1
src/logger/metrics.ts
··· 330 330 | 'suggestedFeeds' 331 331 | 'suggestedStarterPacks' 332 332 | `feed:${FeedDescriptor}` 333 + index: number 333 334 } 334 335 'explore:module:searchButtonPress': { 335 336 module: 'suggestedAccounts' | 'suggestedFeeds'
+2 -2
src/screens/Search/Explore.tsx
··· 888 888 viewableItems: ViewToken<ExploreScreenItems>[] 889 889 changed: ViewToken<ExploreScreenItems>[] 890 890 }) => { 891 - for (const {item} of viewableItems.filter(vi => vi.isViewable)) { 891 + for (const {item, index} of viewableItems.filter(vi => vi.isViewable)) { 892 892 let module: MetricEvents['explore:module:seen']['module'] 893 893 if (item.type === 'trendingTopics' || item.type === 'trendingVideos') { 894 894 module = item.type ··· 905 905 } 906 906 if (!alreadyReportedRef.current.has(module)) { 907 907 alreadyReportedRef.current.set(module, module) 908 - logger.metric('explore:module:seen', {module}) 908 + logger.metric('explore:module:seen', {module, index: index ?? -1}) 909 909 } 910 910 } 911 911 },