-
Notifications
You must be signed in to change notification settings - Fork 801
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
Stats: make nudges collapsible #20765
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
…yet. * Remove the collapse_nudges setting when Jetpack is updated.
@@ -2670,6 +2670,13 @@ public static function get_updateable_data_list( $selector = '' ) { | |||
'validate_callback' => __CLASS__ . '::validate_posint', | |||
'jp_group' => 'stats', | |||
), | |||
'collapse_nudges' => array( | |||
'description' => esc_html__( 'Collapse upsell nudges', 'jetpack' ), |
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.
I'd suggest using "upgrade" instead of "upsell" everywhere, to remain consistent.
'description' => esc_html__( 'Collapse upsell nudges', 'jetpack' ), | |
'description' => esc_html__( 'Collapse upgrade nudges', 'jetpack' ), |
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.
Good suggestion - fixed in c9d0b67.
projects/plugins/jetpack/modules/stats/class-jetpack-stats-upgrade-nudges.php
Outdated
Show resolved
Hide resolved
@@ -3390,6 +3390,13 @@ public static function do_version_bump( $version, $old_version ) { | |||
|
|||
// If an admin page is visited after the update, the 'current_screen' action will fire. | |||
add_action( 'current_screen', 'Jetpack::set_update_modal_display' ); | |||
|
|||
// Expand stats page nudges. |
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.
What do you think about hooking into updating_jetpack_version
action and keeping all the logic in the Nudges class, instead of adding this code here?
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.
I think it's much better to keep this logic in the Nudges class as you suggested. I made that change in commit c9d0b67.
I had to set up the updating_jetpack_version
hook in the stats_load
method, because the Nudges initialization happens too late.
* Make text consistent: upsell -> upgrade. * Move version update hook to the stats module files.
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.
Tests well for me with the latest changes
* master: (34 commits) Fix issue templates (#20880) Social Icon Widget: Fix Icons Not Saving (#20862) Dashboard: Add a specific message for a site that is too new to have a rewind status (#20863) Add additional properties to WC Analytics events (#20812) Connection: add spinner for the "Connect" button (#20872) Update storybook monorepo to v6.3.7 (#20877) Lightweight PHPCS (#20876) Recommendations: Add Jetpack Product Suggestions step (#20814) Update babel monorepo (#20875) Update wordpress monorepo (#20873) cli: Check subprocess exit statuses in docker commands (#20861) Facebook Widget: Fix URL error when adding widget (#20864) Stats: make nudges collapsible (#20765) Remove temporary Newspack block override css (#20868) Allow ZIP uploads via Calypso (#20860) Sync Package Release v1.26.0 (#20870) Connection: remove in-place in secondary flows (#20739) BUILD_DIR -> BUILD_BASE in initial checks (#20857) E2E tests: Fix missing action for atomic workflow (#20866) Boost: Fix skip proxy origins to load css during critical CSS generation (#20793) ...
Changes proposed in this Pull Request:
Jetpack product discussion
pbNhbs-189-p2#comment-3564
Does this pull request change what data or activity we track or use?
Testing instructions:
Update Jetpack
If Jetpack is updated, the nudges collapse state will be reset.
jetpack.php
file here.Screenshots
Expanded
Collapsed