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

Check status of dev mode in navigation component and hide plan pages #12142

Merged
merged 3 commits into from
Apr 25, 2019

Conversation

scottsweb
Copy link
Contributor

Check status of dev mode in navigation component and hide plan pages if dev mode is turned on. This was reported in #12119.

Fixes #12119

My first PR against Jetpack so feedback is encouraged.

Changes proposed in this Pull Request:

  • Load the dev mode state from the store
  • Conditionally check the prob and render navigation accordingly

Testing instructions:

  • Go to wp-admin/admin.php?page=jetpack#/dashboard
  • Define define( 'JETPACK_DEV_DEBUG', true );
  • Check the plan related navigation menu items are hidden when enabled.

Before:

56531905-3218dc80-652b-11e9-80df-fec215214f6b

After:

Screenshot 2019-04-24 at 15 49 14

Proposed changelog entry for your changes:

  • Hide plan admin pages when debug mode is enabled

@scottsweb scottsweb added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. Admin Page React-powered dashboard under the Jetpack menu labels Apr 24, 2019
@scottsweb scottsweb requested a review from a team April 24, 2019 14:58
@eliorivero eliorivero added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 24, 2019
@eliorivero
Copy link
Contributor

Great work @scottsweb! Left some comments. Feel free to ping me on Slack for any questions 👍

@jetpackbot
Copy link
Collaborator

jetpackbot commented Apr 24, 2019

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: May 7, 2019.
Scheduled code freeze: April 30, 2019

Generated by 🚫 dangerJS against f53bd1a

@scottsweb scottsweb added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Apr 24, 2019
@eliorivero
Copy link
Contributor

Code is good!
One more question and cc @MichaelArestad too, are we really hiding the My Plan tab?

Captura de Pantalla 2019-04-24 a la(s) 13 38 33

We currently have content there explaining that the site is in Dev Mode. That said, all those buttons are totally broken, they go nowhere.

If we hide it (and I agree with that) we should remove this portion of code that displays the header for My Plan when the site is in Dev Mode since it will never be used again.

https://github.com/Automattic/jetpack/blob/master/_inc/client/my-plan/my-plan-header.jsx#L127-L149

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it Plans labels Apr 24, 2019
@eliorivero eliorivero added this to the 7.3 milestone Apr 24, 2019
@eliorivero eliorivero added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 25, 2019
eliorivero
eliorivero previously approved these changes Apr 25, 2019
Copy link
Contributor

@eliorivero eliorivero left a comment

Choose a reason for hiding this comment

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

🐑

@eliorivero eliorivero force-pushed the update/admin-page-hide-plans-in-dev-mode branch from 5786ace to f53bd1a Compare April 25, 2019 17:31
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.

Works well in my tests. 👍

@jeherve jeherve merged commit f425219 into master Apr 25, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 25, 2019
@jeherve jeherve deleted the update/admin-page-hide-plans-in-dev-mode branch April 25, 2019 20:01
kraftbj added a commit that referenced this pull request Apr 26, 2019
kraftbj added a commit that referenced this pull request Apr 30, 2019
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 Plans [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.

Admin page: Plans shows nothing on Dev Mode
6 participants