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

Feature: implement sponsored product badge and wrapper #381

Closed
wants to merge 5 commits into from

Conversation

hcaula
Copy link
Contributor

@hcaula hcaula commented Aug 24, 2023

What problem is this solving?

This PR adds the "Sponsored" badge in sponsored products, as well as adds some data-properties.

To collect sponsored product metrics, the Activity Flow script will observe for specific data-properties in the HTML.

This PR adds these data-properties in a wrapper. When a product is not sponsored, the wrapper simply returns the children.

How to test it?

TBD: we're creating a test workspace with mocked sponsored products. When it's ready, I'll add it here.

To test it, search for a term and inspect a sponsored product. The data-properties should be there.

Screenshots

The badge style can be manipulated with CSS in the classes sponsoredBadgeContainer and sponsoredBadge.

image

Related to / Depends on

vtex-apps/product-summary-context#24

@hcaula hcaula requested a review from hiagolcm August 24, 2023 18:42
@hcaula hcaula self-assigned this Aug 24, 2023
@hcaula hcaula requested a review from a team as a code owner August 24, 2023 18:42
@hcaula hcaula requested review from filipewl, hellofanny and lariciamota and removed request for a team August 24, 2023 18:42
@vtex-io-ci-cd
Copy link
Contributor

vtex-io-ci-cd bot commented Aug 24, 2023

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@hcaula hcaula requested a review from a team as a code owner August 25, 2023 18:27
@hcaula hcaula changed the title Feature: implement sponsored product wrapper Feature: implement sponsored product badge and wrapper Aug 25, 2023
@hcaula hcaula requested a review from a team as a code owner September 18, 2023 18:05
@hcaula hcaula requested review from camilavcoutinho and removed request for a team September 18, 2023 18:05
@hcaula
Copy link
Contributor Author

hcaula commented Oct 6, 2023

Closing in favor of this new app I've made:

https://github.com/vtex-apps/sponsored-products

@hcaula hcaula closed this Oct 6, 2023
@hcaula hcaula deleted the feat/ads-wrapper branch October 6, 2023 17:06
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.

1 participant