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

Update/Settings ui #9952

Merged
merged 19 commits into from
Sep 17, 2018
Merged

Update/Settings ui #9952

merged 19 commits into from
Sep 17, 2018

Conversation

enejb
Copy link
Member

@enejb enejb commented Jul 26, 2018

Adds the the same wrapper of the admin to the shareing settings.

Before:
Stats Screen
screenshot_2018-07-25 site stats aaaaa test site will wordpress

Shareing Settings Screen
screenshot_2018-07-25 sharing settings aaaaa test site will wordpress

Debug screen in wp-admin
screenshot_2018-07-25 aaaaa test site will wordpress

After:
screenshot_2018-07-25 site stats enejdev wordpress

screenshot_2018-07-25 sharing settings enejdev wordpress

screenshot_2018-07-25 enejdev wordpress

Changes proposed in this Pull Request:

Testing instructions:

Check out the different wp-admin pages now.
Click around. Resize the window. Try in it on different devices.

  • Jetpack > Stats
  • Jetpack > Stats > Settings
  • Jetpack > Bulk settings > wp-admin/admin.php?page=jetpack_modules
  • Settings > Sharing
  • Jetpack (footer) Debug link
  • Network Admin (need to create a MULTI SITE FOR THIS) PROTIP: (Use https://jurassic.ninja/specialops/ )
    -- Network > Jetpack > Sites
    -- Network > Jetpack > Settings

Proposed changelog entry for your changes:

@enejb enejb requested review from joanrho, zinigor and dereksmart July 26, 2018 04:23
@enejb enejb requested a review from a team as a code owner July 26, 2018 04:23
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Please review this diff before merging: D16513-code. (newly created revision)

@enejb enejb added [Status] Needs Review This PR is ready for review. [Status] Needs Design Review Design has been added. Needs a review! Admin Page React-powered dashboard under the Jetpack menu [Feature] Sharing Post sharing, sharing buttons [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. labels Jul 26, 2018
@enejb enejb added this to the 6.4 milestone Jul 26, 2018
@enejb enejb requested a review from kraftbj as a code owner July 26, 2018 04:33
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Please review this diff before merging: D16513-code. (updated diff)

1 similar comment
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Please review this diff before merging: D16513-code. (updated diff)

Copy link
Contributor

@joanrho joanrho left a comment

Choose a reason for hiding this comment

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

tested all and LGTM (except the two mobile viewports we chatted about: https://cloudup.com/cIwrylYHUnP)! But we can cover that once we do a full sweep of all our admin interfaces.
Thanks @enejb!

@oskosk
Copy link
Contributor

oskosk commented Jul 31, 2018

This one needs a rebase @enejb

@enejb enejb force-pushed the update/publicize-settings-ui branch from ea0a509 to c12775c Compare August 1, 2018 16:30
@brbrr brbrr added the [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it label Aug 3, 2018
@oskosk oskosk modified the milestones: 6.4, 6.5 Aug 7, 2018
@oskosk
Copy link
Contributor

oskosk commented Aug 7, 2018

This one needs a rebase again. Sorry :(

@enejb enejb changed the title Update/publicize settings ui Update/Settings ui Aug 8, 2018
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Please review this diff before merging: D16513-code. (updated diff)

@enejb enejb force-pushed the update/publicize-settings-ui branch from c12775c to d31578c Compare August 8, 2018 17:02
@brbrr
Copy link
Contributor

brbrr commented Aug 14, 2018

Hey @enejb,
This PR looks like contains a bug. When I opening ‘Sharing’ settings as not connected user (wp-admin > Settings > Sharing ) I see a blank page (empty, no content). No JS errors, no wp-error.log entries. (it seems like WPOD)

more details (internal ref): p8oabR-fW-p2

@brbrr brbrr removed the [Status] Needs Review This PR is ready for review. label Aug 14, 2018
@enejb
Copy link
Member Author

enejb commented Aug 17, 2018

I am not sure how you are testing this but I see the following
screen shot 2018-08-17 at 2 39 14 pm

@brbrr
Copy link
Contributor

brbrr commented Aug 23, 2018

Sorry. I mixed up PRs, This PR looks good

Copy link
Contributor

@brbrr brbrr left a comment

Choose a reason for hiding this comment

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

Functionally tested. LGTM.

I'd like to ask @zinigor / @mdawaffe to check the code changes since they are quite big.

@@ -715,6 +686,7 @@ function stats_reports_page( $main_chart_only = false ) {
die();
}
}
error_log( print_r( $get, 1) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this debug statement needed here?

@enejb
Copy link
Member Author

enejb commented Sep 11, 2018

Can you explain a bit how the fatal might happen here? I don't quite understand it.

The way I understand it is the file would never be loaded as far as I can tell. Since there is nothing that would try to load it. With the debug module file. that is not the case since the module would try to be loaded from options. Since that value might be stored in the option.

@enejb enejb removed the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Sep 11, 2018
@enejb enejb dismissed jeherve’s stale review September 11, 2018 17:41

answer the question.

@jeherve
Copy link
Member

jeherve commented Sep 12, 2018

Can you explain a bit how the fatal might happen here? I don't quite understand it.

I unfortunately was never able to reproduce the issue, but we've had it happen on a few updates when removing different files. From our tests when that happened, it often seemed like a caching issue.

$rtl = is_rtl() ? '.rtl' : '';
wp_enqueue_style( 'dops-css', plugins_url( "_inc/build/admin.dops-style{$rtl}.css", JETPACK__PLUGIN_FILE ), array(), JETPACK__VERSION );
wp_enqueue_style( 'components-css', plugins_url( "_inc/build/style.min{$rtl}.css", JETPACK__PLUGIN_FILE ), array(), JETPACK__VERSION );
$custom_css = '
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a particular reason for this CSS to be written here? If possible, it should be moved to a stylesheet.

<span class="dops-button-group">
<?php
if ( current_user_can( 'jetpack_network_sites_page' ) ) {
?><a href="<?php echo esc_url( network_admin_url( 'admin.php?page=jetpack' ) ); ?>" type="button" class="<?php echo esc_attr( $highlight_current_sites ); ?> dops-button is-compact" title="<?php esc_html_e( 'Manage your network\'s Jetpack Sites.', 'jetpack' ); ?>"><?php echo esc_html_x( 'Sites', 'Navigation item', 'jetpack' ); ?></a><?php
Copy link
Contributor

Choose a reason for hiding this comment

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

To make it easier for translators, this string should be within double quotes so there's no need to use a backslash:

"Manage your network's Jetpack Sites."

if ( current_user_can( 'jetpack_network_sites_page' ) ) {
?><a href="<?php echo esc_url( network_admin_url( 'admin.php?page=jetpack' ) ); ?>" type="button" class="<?php echo esc_attr( $highlight_current_sites ); ?> dops-button is-compact" title="<?php esc_html_e( 'Manage your network\'s Jetpack Sites.', 'jetpack' ); ?>"><?php echo esc_html_x( 'Sites', 'Navigation item', 'jetpack' ); ?></a><?php
} if ( current_user_can( 'jetpack_network_settings_page' ) ) {
?><a href="<?php echo esc_url( network_admin_url( 'admin.php?page=jetpack-settings' ) ); ?>" type="button" class="<?php echo esc_attr( $highlight_current_settings ); ?> dops-button is-compact" title="<?php esc_html_e( 'Manage your network\'s Jetpack Settings.', 'jetpack' ); ?>"><?php echo esc_html_x( 'Network Settings', 'Navigation item', 'jetpack' ); ?></a><?php
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, using double quotes would help translation.

<a href="https://wordpress.com/tos/" target="_blank" rel="noopener noreferrer" title="<?php esc_html__( 'WordPress.com Terms of Service', 'jetpack' ); ?>" class="jp-footer__link"><?php echo esc_html_x( 'Terms', 'Navigation item', 'jetpack' ); ?></a>
</li>
<li class="jp-footer__link-item">
<a href="<?php echo esc_url( $jetpack_admin_url . '#/privacy' ); ?>" rel="noopener noreferrer" title="<?php esc_html_e( 'Automattic\'s Privacy Policy', 'jetpack' ); ?>" class="jp-footer__link"><?php echo esc_html_x( 'Privacy', 'Navigation item', 'jetpack' ); ?></a>
Copy link
Contributor

@eliorivero eliorivero Sep 13, 2018

Choose a reason for hiding this comment

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

Use double quotes in translatable string to avoid backslash.

</li>
<?php if ( is_multisite() && current_user_can( 'jetpack_network_sites_page' ) ) { ?>
<li class="jp-footer__link-item">
<a href="<?php echo esc_url( network_admin_url( 'admin.php?page=jetpack' ) ); ?>" title="<?php esc_html_e( 'Manage your network\'s Jetpack Sites.', 'jetpack' ); ?>" class="jp-footer__link"><?php echo esc_html_x( 'Network Sites', 'Navigation item', 'jetpack' ); ?></a>
Copy link
Contributor

@eliorivero eliorivero Sep 13, 2018

Choose a reason for hiding this comment

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

Use double quotes in translatable string to avoid backslash.

<?php } ?>
<?php if ( is_multisite() && current_user_can( 'jetpack_network_settings_page' ) ) { ?>
<li class="jp-footer__link-item">
<a href="<?php echo esc_url( network_admin_url( 'admin.php?page=jetpack-settings' ) ); ?>" title="<?php esc_html_e( 'Manage your network\'s Jetpack Settings.', 'jetpack' ); ?>" class="jp-footer__link"><?php echo esc_html_x( 'Network Settings', 'Navigation item', 'jetpack' ); ?></a>
Copy link
Contributor

@eliorivero eliorivero Sep 13, 2018

Choose a reason for hiding this comment

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

Use double quotes in translatable string to avoid backslash.

<?php } ?>
<?php if ( current_user_can( 'manage_options' ) ) { ?>
<li class="jp-footer__link-item">
<a href="<?php echo esc_url( admin_url() . 'admin.php?page=jetpack-debugger' ); ?>" title="<?php esc_html_e( 'Test your site\'s compatibility with Jetpack.', 'jetpack' ); ?>" class="jp-footer__link"><?php echo esc_html_x( 'Debug', 'Navigation item', 'jetpack' ); ?></a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use double quotes in translatable string to avoid backslash.

Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This looks good to me now.

@jeherve jeherve added the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 17, 2018
@enejb enejb merged commit 97a669d into master Sep 17, 2018
@enejb enejb deleted the update/publicize-settings-ui branch September 17, 2018 16:10
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 17, 2018
@@ -173,6 +180,10 @@ public function output_service( $id, $service, $show_dropdown = false ) {
<?php
}

public function wrapper_admin_page() {
Jetpack_Admin_Page::wrap_ui( array( &$this, 'management_page' ), array( 'is-wide' =>true ) );
Copy link
Member

Choose a reason for hiding this comment

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

Jetpack_Admin_Page::wrap_ui is only available in Jetpack - this file cannot be synced back as-is

Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to add this on the WP.com side since additional wp-admin pages in the future will likely adopt using this function?

@jeherve jeherve added [Status] Needs Testing We need to add this change to the testing call for this month's release [Status] Has Changelog and removed [Status] Needs Changelog labels Sep 20, 2018
jeherve added a commit that referenced this pull request Sep 24, 2018
jeherve added a commit that referenced this pull request Sep 25, 2018
* Readme: add boilerplate for next release, 6.6

* Add 6.5 to the changelog.txt file

* Set boilerplate testing list for 6.6

* Readme: update stable tag to 6.5

* Add bullets to 6.5 changelog items

* Readme: add link to previous changelogs

This will help folks who want to know more about past releases,
while keeping the readme.txt short so as to not overwhelm translators and site owners only looking for information about the last release.

* Changelog: add information at the top of the changelog file.

* Changelog: add #10054

* Changelog: add #10078

* Changelog: add #10079

* Changelog: add #10064

* Changelog: add #10094

* Changelog: add #10096

* Testing list: add more information based on #10087

* Changelog: add #9847

* Changelog: add #10084

* Changelog: add #9918

* Changelog: add #7614

* Changelog: add #10116

* Changelog: add #10108

* Changelog: add #10041

* Changelog: add #10121

* Changelog: add #10134

* Changelog: add #10130

* Changelog: add #10109

* changelog: add #10137

* changelog: add #9952

* changelog: add #10120

* changelog: add #10162

* Changelog: add #10163

* Changelog: add #10092

* changelog: add #10156

* Changelog: add #10154

* changelog: add #10122

* Changelog: add #10101

* changelog: add #10105

* changelog: add #10190

* Changelog: add #10196

* changelog: add #10152

* Changelog: add #10153

* Testing list: add more details to Site Verification testing steps.

@see #10143 (comment)

* changelog: add #10194

* Changelog: add #10193
@jeherve jeherve removed the [Status] Needs Testing We need to add this change to the testing call for this month's release label Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin Page React-powered dashboard under the Jetpack menu [Feature] Sharing Post sharing, sharing buttons [Feature] Stats Data Feature that enables users to track their site's traffic and gain insights on popular content. [Status] Design Review Complete Touches WP.com Files [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.