Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AS-4428] Adding event to track list privacy #485

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/Schema/Events/ArtworkLists.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,27 @@ export interface ViewedArtworkList {
context_owner_type: OwnerType.saves
owner_id: string
}

/**
* User clicks on the toggle to edit artworks list privacy
*
* This schema describes events sent to Segment from [[editedArtworkListPrivacy]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daytavares The current design requires clicking the "Save Changes" button to save the list privacy update. It means:

  • When collector toggles the list privacy for individual list, nothing is really saved, until clicking the "Save Changes" button. And it's possible that collector can toggle the privacy, dismiss the modal, and does not save the changes.
  • When clicking "Save Changes", we'll update the list privacy for all lists in a batch.

So I want to double check that

  • The event would only be sent when collector clicks "Save Changes", and would not be sent when collector toggles the privacy for individual list.
  • We'll fire x number of events when collector saves the changes, with x being the total number of lists.
    • I wonder if it's better to just fire 1 event, with all the list privacy value in an array or something.

Let me know if I can pair and clarify things together!

*
* @example
* ```
* {
* action: "editedArtworkListPrivacy",
* context_owner_type: "saves",
* owner_id: "770fa47d-8cc8-4267-93e7-2808544d2a98",
* privacy: "Private"
* artwork_list_id: "b9725f09-9369-4e1a-9e8a-bc0fe9da9645"
* }
* ```
*/
export interface EditedArtworkListPrivacy {
action: ActionType.editedArtworkListPrivacy
context_owner_type: OwnerType.saves
owner_id: string
privacy: string
artwork_list_id: string
}
6 changes: 6 additions & 0 deletions src/Schema/Events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
CreatedArtworkList,
DeletedArtworkList,
EditedArtworkList,
EditedArtworkListPrivacy,
ViewedArtworkList,
} from "./ArtworkLists"
import {
Expand Down Expand Up @@ -325,6 +326,7 @@ export type Event =
| DeletedSavedSearch
| EditCollectedArtwork
| EditedArtworkList
| EditedArtworkListPrivacy
| EditedAutocompletedAddress
| EditedSavedSearch
| EditedUserProfile
Expand Down Expand Up @@ -857,6 +859,10 @@ export enum ActionType {
* Corresponds to {@link EditedArtworkList}
*/
editedArtworkList = "editedArtworkList",
/**
* Corresponds to {@link EditedArtworkListPrivacy}
*/
editedArtworkListPrivacy = "editedArtworkListPrivacy",
/**
* Corresponds to {@link editedAlert}
*/
Expand Down