Rename photoEmbed metric fields to postUri/postAuthorDid
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1179,24 +1179,24 @@ export type Events = {
|
||||
'post:photoEmbed:impression': {
|
||||
layout: 'single' | 'grid' | 'carousel'
|
||||
totalImages: number
|
||||
uri: string
|
||||
authorDid: string
|
||||
postUri: string
|
||||
postAuthorDid: string
|
||||
feedDescriptor?: string
|
||||
}
|
||||
'post:photoEmbed:open': {
|
||||
layout: 'single' | 'grid' | 'carousel'
|
||||
fromImage: number
|
||||
totalImages: number
|
||||
uri: string
|
||||
authorDid: string
|
||||
postUri: string
|
||||
postAuthorDid: string
|
||||
feedDescriptor?: string
|
||||
}
|
||||
'post:photoEmbed:carouselSwipe': {
|
||||
fromImage: number
|
||||
toImage: number
|
||||
totalImages: number
|
||||
uri: string
|
||||
authorDid: string
|
||||
postUri: string
|
||||
postAuthorDid: string
|
||||
feedDescriptor?: string
|
||||
}
|
||||
'post:photoEmbed:lightboxSwipe': {
|
||||
@@ -1204,8 +1204,8 @@ export type Events = {
|
||||
fromImage: number
|
||||
toImage: number
|
||||
totalImages: number
|
||||
uri: string
|
||||
authorDid: string
|
||||
postUri: string
|
||||
postAuthorDid: string
|
||||
feedDescriptor?: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,8 +387,8 @@ function ImageView({
|
||||
fromImage: prev + 1,
|
||||
toImage: next + 1,
|
||||
totalImages: images.length,
|
||||
uri: metricsContext.uri,
|
||||
authorDid: metricsContext.authorDid,
|
||||
postUri: metricsContext.postUri,
|
||||
postAuthorDid: metricsContext.postAuthorDid,
|
||||
feedDescriptor: metricsContext.feedDescriptor,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import {type ImageSource} from '#/components/Lightbox/types'
|
||||
|
||||
export type LightboxMetricsContext = {
|
||||
layout: 'single' | 'grid' | 'carousel'
|
||||
uri: string
|
||||
authorDid: string
|
||||
postUri: string
|
||||
postAuthorDid: string
|
||||
feedDescriptor?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ export function ImageEmbed({
|
||||
|
||||
const postContext = rest.post
|
||||
? {
|
||||
uri: rest.post.uri,
|
||||
authorDid: rest.post.author.did,
|
||||
postUri: rest.post.uri,
|
||||
postAuthorDid: rest.post.author.did,
|
||||
feedDescriptor: rest.feedDescriptor,
|
||||
}
|
||||
: undefined
|
||||
|
||||
@@ -58,8 +58,8 @@ interface GalleryProps {
|
||||
// Post context for the in-feed carousel swipe metric. Omit for non-post
|
||||
// contexts (no event will be emitted).
|
||||
metricsPostContext?: {
|
||||
uri: string
|
||||
authorDid: string
|
||||
postUri: string
|
||||
postAuthorDid: string
|
||||
feedDescriptor?: string
|
||||
}
|
||||
}
|
||||
@@ -182,8 +182,8 @@ export function Gallery({
|
||||
fromImage: fromIndex + 1, // convert to 1-based index for easier analysis
|
||||
toImage: toIndex + 1, // convert to 1-based index for easier analysis
|
||||
totalImages: images.length,
|
||||
uri: metricsPostContext.uri,
|
||||
authorDid: metricsPostContext.authorDid,
|
||||
postUri: metricsPostContext.postUri,
|
||||
postAuthorDid: metricsPostContext.postAuthorDid,
|
||||
feedDescriptor: metricsPostContext.feedDescriptor,
|
||||
})
|
||||
}, 200),
|
||||
|
||||
@@ -979,8 +979,8 @@ let PostFeed = ({
|
||||
ax.metric('post:photoEmbed:impression', {
|
||||
layout,
|
||||
totalImages,
|
||||
uri: post.uri,
|
||||
authorDid: post.author.did,
|
||||
postUri: post.uri,
|
||||
postAuthorDid: post.author.did,
|
||||
feedDescriptor: feedFeedback.feedDescriptor || feed,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user