-
Notifications
You must be signed in to change notification settings - Fork 7
fix(posts): Post Button interactions (Like, Boost, Respond, Share, Report) [MOSOWEB-44] #75
Conversation
…es feed, local feed, and federated feed
toggleReblog() | ||
} | ||
|
||
function favourite() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using the UK English version of "favorite" to match the called toggleFavourite
, even though there's a useStarFavoriteIcon
elsewhere in this file 😠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grumble grumble, i really dislike that these have been mixed throughout the entire repo but one problem at a time i suppose
|
||
const props = defineProps<{ | ||
status: mastodon.v1.Status | ||
feedName?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional prop bc used by StatusCard and StatusDetail
|
||
const props = defineProps<{ | ||
status: mastodon.v1.Status | ||
details?: boolean | ||
command?: boolean | ||
feedName?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional prop bc used by StatusCard and StatusDetail
@@ -23,14 +26,36 @@ const { | |||
toggleReblog, | |||
} = $(useStatusActions(props)) | |||
|
|||
function recordEngagement(engagementAction: String) { | |||
const analyticsId = feedName ? `${feedName}.post.${engagementAction}` : `post.${engagementAction}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda messy ternary. I am open to suggestions here.
components/status/StatusActions.vue
Outdated
function reblog() { | ||
recordEngagement('reblog') | ||
toggleReblog() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if data/product wants to have events for undoing a reblog, favorite or bookmark? Since these functions are toggles, if you un-reblog/favorite/bookmark something it just sends the same engagement event and I'm curious if anyone has mentioned wanting to have the false toggle cases tracked too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me and Aly talked to Kirill. We are going to use separate ui_identifiers
and for the "undo" actions, the engagement_type
will be general
Pushed up making |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work on this!
Goal
Adding glean events for Post Button interactions (Like, Boost, Respond, Share, Report)
MOSOWEB-44
To Do:
mastodon_post_id
I'd love feedback/perspectives on:
Did I miss any other feeds?
Should I rename "post.reblog" to "post.boost" to match the
engagement_type
?Implementation Decisions
The feed names are defined in the "Timeline" components. I did some light prop drilling instead of doing something involving the page URL.
For example, here's Home
Obligatory list of new events
5 action types, multiplied by the 4 feeds + standalone page