Skip to content

Adds an info text if the campaign has overdelivered to inform user about the max budget to be charged #102230

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

Conversation

therocket-gr
Copy link
Contributor

@therocket-gr therocket-gr commented Mar 31, 2025

closes 3099-gh-tumblr/a8c-dsp

Proposed Changes

This is a simple PR to add a notice to the user if the campaign has over-delivered (only in evergreen campaigns) to inform the user about the maximum charged amount

UPDATE

please ignore the below.. the proposed changes would look like the below - we changed a bit the wording

Screenshot 2025-04-14 at 11 17 18

first attempt

the result looks like this

Screenshot 2025-03-31 at 17 39 53

Testing Instructions

to test in localhost you can override this line

const weeklySpend =

(line 274 of the same file client/my-sites/promote-post-i2/components/campaign-item-details/index.tsx to a number greater then the total budget)

you should see the info text right below the weekly spend area (as shown above in the ss)

do a CR

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@therocket-gr therocket-gr requested a review from timur987 March 31, 2025 14:46
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 31, 2025
Copy link

github-actions bot commented Mar 31, 2025

@therocket-gr therocket-gr requested a review from sbarbosa March 31, 2025 14:47
@therocket-gr therocket-gr self-assigned this Mar 31, 2025
@matticbot
Copy link
Contributor

matticbot commented Mar 31, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~59 bytes added 📈 [gzipped])

name             parsed_size           gzip_size
promote-post-i2       +185 B  (+0.0%)      +59 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

matticbot commented Mar 31, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • command-palette-wp-admin
  • help-center
  • notifications
  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug vdimitrakis/3099-inform-user-about-max-weekly-budget-to-charge on your sandbox.

@bo2
Copy link

bo2 commented Mar 31, 2025

Thanks @therocket-gr !

Can we make it more calm? These marketing messages are good when user see them rarely, but make everyday UI element sound that excessive may be too intense.

@therocket-gr
Copy link
Contributor Author

Thanks @therocket-gr !

Can we make it more calm? These marketing messages are good when user see them rarely, but make everyday UI element sound that excessive may be too intense.

what do you think about this

"Your campaign performed well this week. You’ll still only be charged your set weekly budget of $35."

Copy link
Contributor

@timur987 timur987 left a comment

Choose a reason for hiding this comment

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

Thanks @therocket-gr!

LGTM and works as advertised.

Copy link
Contributor

@sbarbosa sbarbosa left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@bo2
Copy link

bo2 commented Apr 1, 2025

I asked Bart to take a look, as we plan to add another message there for the CPC experiment

@bartoszbak
Copy link

Messaging sounds good although I'd shorten it so it says necessary things.

From: Great news! Your campaign did really well this week,, but don't worry - we won't charge you more that your weekly budget.

To: Your campaign outperformed this week! You’ll only be charged up to your budget.

I'd also visually higher so people don't confuse this information with a simple subtitle :)

image

@therocket-gr therocket-gr merged commit 5b1e6e4 into trunk Apr 14, 2025
14 checks passed
@therocket-gr therocket-gr deleted the vdimitrakis/3099-inform-user-about-max-weekly-budget-to-charge branch April 14, 2025 08:43
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 14, 2025
@a8ci18n
Copy link

a8ci18n commented Apr 14, 2025

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/17397315

Some locales (Hebrew) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Thank you @therocket-gr for including a screenshot in the description! This is really helpful for our translators.

JessBoctor pushed a commit to JessBoctor/wp-calypso that referenced this pull request Apr 15, 2025
…out the max budget to be charged (Automattic#102230)

* Adds an info text if the campaign has overdelivered to inform user about the max budget to be charged

* Addressing PR comments
JessBoctor pushed a commit to JessBoctor/wp-calypso that referenced this pull request Apr 17, 2025
…out the max budget to be charged (Automattic#102230)

* Adds an info text if the campaign has overdelivered to inform user about the max budget to be charged

* Addressing PR comments
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.

7 participants