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