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

feat(sdk): add item generics to analytics types for easy customization #1101

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

icazevedo
Copy link
Contributor

What's the purpose of this pull request?

This PR adds generics to the analytics events so users can control which type is used for the Item property. This makes it easier for additional properties to be included inside an item, which is a common use case.

How it works?

It defaults to the regular Item type but allows users to override it to include additional properties.

How to test it?

it shouldn't affect how the code behaves, only the dev experience.

base.store Deploy Preview

I'll link it here as soon as I have it

@icazevedo icazevedo self-assigned this Jan 6, 2022
@icazevedo icazevedo requested a review from a team as a code owner January 6, 2022 19:01
@netlify
Copy link

netlify bot commented Jan 6, 2022

✔️ Deploy Preview for faststoreui ready!

🔨 Explore the source changes: a3a05f7

🔍 Inspect the deploy log: https://app.netlify.com/sites/faststoreui/deploys/61d73c76afbc44000735feeb

😎 Browse the preview: https://deploy-preview-1101--faststoreui.netlify.app

@netlify
Copy link

netlify bot commented Jan 6, 2022

✔️ Deploy Preview for faststore ready!

🔨 Explore the source changes: a3a05f7

🔍 Inspect the deploy log: https://app.netlify.com/sites/faststore/deploys/61d73c76e6ec080007de9177

😎 Browse the preview: https://deploy-preview-1101--faststore.netlify.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 6, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a3a05f7:

Sandbox Source
Store UI Typescript Configuration

@icazevedo icazevedo changed the title feat: add item generics to analytics types for easy customization feat(sdk): add item generics to analytics types for easy customization Jan 7, 2022
Copy link
Contributor

@heitorado heitorado left a comment

Choose a reason for hiding this comment

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

Looks good! That really seems to make things easier when sending extra attributes, now that all data structures accept generic items. Nice work 👍🏼

@icazevedo icazevedo merged commit 51e9d96 into master Jan 7, 2022
@icazevedo icazevedo deleted the feat/add-item-generics-to-analytics-types branch January 7, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants