Skip to content

Conversation

dereksmart
Copy link
Contributor

@dereksmart dereksmart commented Feb 21, 2017

This PR adds a new component DevCard to the mix, which is rendered in the footer only if Jetpack is running in a development version.

Right now it only allows you to toggle between different Jetpack plans so that you're able to view the UI differences.

Toggling between these is not actually changing your plan, it is only updating the state for viewing/testing purposes of the UI -- aka: Your plan is expected to revert back to your actual plan when the /site endpoint is queried next, so that is NOT a bug.

There is no doubt that this can be improved/expanded a great deal in the future (and it will), but for now this PR is meant to be a quick win for designers/growth when they are testing differences between plans.

To Test:

  • Checkout and view the /wp-admin/admin.php?page=jetpack#/plans tab.
  • Toggle between the plans. The view should reflect accordingly.
  • Navigate to the dashboard. Your plan should be updated along with the /site endpoint response.
  • Change the Jetpack version in jetpack.php to 4.8, make sure the component does not render.

switchplan

@dereksmart dereksmart added [Status] Needs Review This PR is ready for review. [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Janitorial labels Feb 21, 2017
* Internal dependencies
*/
import { isDevVersion as _isDevVersion } from 'state/initial-state';
import { switchMichaelsPlan } from 'state/dev-version';
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not use people's names in our codebase?

}
};

export const switchMichaelsPlan = ( slug ) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

How about "previewAnotherPlan" or something like that?

@samhotchkiss
Copy link
Contributor

Noice!

Should we just be showing this to all users running a dev version? Our goal over the next few months is to get many more beta testers, and this seems like it might be a bit unnecessary/confusing. What about a little footer link to turn this thing on? Or...

@dereksmart
Copy link
Contributor Author

dereksmart commented Feb 21, 2017

Our goal over the next few months is to get many more beta testers.

Ha, the eternal quest of MOAR testers. I was thinking of putting it behind a filter.

@dereksmart
Copy link
Contributor Author

dereksmart commented Feb 21, 2017

I've decided against using a filter, and instead updated this to add state/actions to be able to toggle the devcard. I've added a link to toggle it specifically in the footer in dev versions only, similar to how we have reset options.

This is what it looks like
switchplan-toggle

@samhotchkiss
Copy link
Contributor

Love it!

@samhotchkiss samhotchkiss added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Feb 21, 2017
@dereksmart dereksmart merged commit 3bbccb4 into feature/settings-overhaul Feb 21, 2017
@dereksmart dereksmart deleted the add/switch-plan-view branch February 21, 2017 15:36
@dereksmart dereksmart removed the [Status] Ready to Merge Go ahead, you can push that green button! label Feb 21, 2017
@jeherve jeherve added this to the Settings UI milestone Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Janitorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants