-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add promote posts button to stats entries, with feature flag #66024
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~354 bytes added 📈 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
c0b385b
to
50b9e5f
Compare
1d44c0b
to
bc19b17
Compare
bc19b17
to
13f99b8
Compare
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.
Thanks @benzhu56 spotted this too. My thoughts were that we should still send show the user the promote button - but send them to a blank widget (not pre-populated). Then we need the widget just to handle I created a follow on ticket for that here: (350-gh-tumblr/wordads-picard). The other part of this longer term would be the post picker in the widget - I think this is maybe being discussed but not ticketed yet. |
* Add promote post to my home swipeable * Use wpcom-proxy for requests Co-authored-by: Ben Zhu <ben.zhu@a8c.com>
The button appears after the "external" link icon - these both appear on hovering the post title
13f99b8
to
bb8e92f
Compare
bb8e92f
to
b262a2f
Compare
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.
This LGTM
@@ -572,6 +572,7 @@ describe( 'utils', () => { | |||
) | |||
).toEqual( [ | |||
{ | |||
id: 0, |
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.
Just a heads up that the home page post ID isn't always going to be 0 (you can switch any post with a post_type of page
to be the home page too, and these will all have an ID)
Also there are other URLs, like taxonomy pages or the blog page, that also might not have IDs.
I have tested this and, while it's clearly part of a work-in-progress, it doesn't break anything and is required to unblock further work so I'm going to merge it. |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7462764 Thank you @jamesgill3 for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Proposed Changes
Hi Team, this is my first calypso PR and part of a series to add entrypoints in calypso for a new post promotion widget. Which will allow wordpress.com users to pay for advertising and serve the posts as ads on various A8C products.
Info specifically on these tasks here (pbpazC-3cN-p2) and the wider project thread here (pbpazC-2Pd-p2)
The majority of this feature is done outside of WP.com as a standalone widget, here we only need to add buttons to Calypso to show the widget and to pass it the site & post id's.
Note: We will be iterating on a bunch of PRs to complete this feature, but to keep these smaller we will be merging one-by-one under a feature flag.
Here are our provided designs:
And here is the screenshot in my development environment:
Testing Instructions
promote-posts
either on startup or via url using the?flags=promote-post
query string on the following urlshttp://calypso.localhost:3000/stats/day/something.wordpress.com
widget.js
- this will repeatedly fail. In a working dev environment - it only ever loads the script once.widget.js
is not loaded in the f12 -> network tab and that the speaker button does not appear on hover.Without local instance of the widget running
With local instance of the widget running
Pre-merge Checklist
Related to #