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

Mobile Theme: do not display settings when module is inactive. #14101

Merged
merged 8 commits into from
Dec 18, 2019

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Nov 22, 2019

Fixes #13385
Fixes #7602

Matching Calypso PR: Automattic/wp-calypso#37857

Changes proposed in this Pull Request:

This PR comes as a first step to deprecate the Mobile Theme feature. We'll start by hiding Mobile Theme Settings from the Jetpack UI when the feature is not active. Folks that still use the feature can access its settings and disable it. Folks who do not use it cannot turn it on via the UI.

The Mobile theme was developed 8 years ago, back when responsive themes weren't a thing. It isn't as useful today, and can even be harmful when one enables it on their site without realizing the consequences, as outlined in #7602.

Is this a new feature or does it add/remove features to an existing part of Jetpack?

  • Internal references:
    • p1HpG7-84F-p2
    • p6TEKc-3iM-p2
    • p6TEKc-3jj-p2
    • p6TEKc-3l7-p2

Testing instructions:

  • Run yarn docker:wp jetpack module activate minileven to enable the module on your site.
  • Go to Jetpack > Settings > Writing.
  • Notice that the Mobile Theme settings are there.
  • Note that there is now a mention of the upcoming deprecation in the card.
    image
  • Disable the feature.
  • The settings should turn grey and be disabled.
  • The settings should also be gone from the old module list.
  • When clicking on the "Learn more" link in the notice, the support doc should open in a new window and you should stop a Tracks event if you add localStorage.setItem( 'debug', 'dops:analytics' ); to your browser's console.

Proposed changelog entry for your changes:

  • Mobile Theme: disable settings when feature is inactive.

@jeherve jeherve added [Feature] Mobile Theme aka minileven [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Type] Janitorial [Pri] Normal labels Nov 22, 2019
@jeherve jeherve requested a review from a team as a code owner November 22, 2019 10:27
@jeherve jeherve self-assigned this Nov 22, 2019
@jetpackbot
Copy link

jetpackbot commented Nov 22, 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: January 14, 2020.
Scheduled code freeze: January 7, 2020

Generated by 🚫 dangerJS against 9f59a81

@ChaosExAnima
Copy link
Contributor

Code works, but the transition is very abrupt- it immediately vanishes when I click off. Can we have it so that it's there till the user refreshes the page, perhaps?

keoshi
keoshi previously approved these changes Nov 22, 2019
Copy link
Contributor

@keoshi keoshi left a comment

Choose a reason for hiding this comment

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

This works as expected in my testing!

@jeherve
Copy link
Member Author

jeherve commented Nov 22, 2019

Code works, but the transition is very abrupt- it immediately vanishes when I click off. Can we have it so that it's there till the user refreshes the page, perhaps?

That's a good point. I am not sure what the best approach would be for this, though. Should we fake the deactivation until they move to a different page, or tab?

@jeherve jeherve modified the milestones: 8.1, 8.0 Nov 25, 2019
@dereksmart
Copy link
Member

dereksmart commented Nov 25, 2019

What if instead of a workaround to leave it for the page session, we just add a line of text to the card - something like:

This feature is being discontinued and will be removed from Jetpack in a future release. If you disable this setting, you will not be able to re-activate it.

@jeherve jeherve added [Status] In Progress and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Nov 25, 2019
@jeherve jeherve modified the milestones: 8.0, 8.1 Nov 25, 2019
jeherve added a commit that referenced this pull request Nov 25, 2019
@jeherve
Copy link
Member Author

jeherve commented Nov 25, 2019

Done in afeb464.

@jeffgolenski How does this look to you?

image

You should be able to test on Jurassic Ninja as soon as the tests pass on this PR. 👍

@jeherve jeherve added [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Needs Design Review Design has been added. Needs a review! and removed [Status] In Progress labels Nov 25, 2019
@jeffgolenski
Copy link
Member

@jeherve That looks good to me. I'd personally like to have a little more visual call-out for this, but I don't think it's worth adding extra code to a component just for this notice. 🚢

@kraftbj kraftbj removed the [Status] Needs Design Review Design has been added. Needs a review! label Dec 6, 2019
@kraftbj
Copy link
Contributor

kraftbj commented Dec 6, 2019

I agree with @ChaosExAnima that the transition is harsh, but given the overall intent to remove the feature soon, I'm not going to block merging based on that.

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Dec 6, 2019
@jeherve jeherve added [Status] Blocked / Hold [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Needs Design Review Design has been added. Needs a review! and removed [Status] Blocked / Hold labels Dec 13, 2019
Copy link
Member

@jeffgolenski jeffgolenski left a comment

Choose a reason for hiding this comment

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

Tested with both the theme already active, and inactive. Works great. Let's ship it.

Copy link
Contributor

@kraftbj kraftbj left a comment

Choose a reason for hiding this comment

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

Looks good. No errors in the console.

@kraftbj kraftbj added [Status] Design Review Complete [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Design Review Design has been added. Needs a review! [Status] Needs Review To request a review from Crew. Label will be renamed soon. labels Dec 17, 2019
@jeherve jeherve merged commit a833d24 into master Dec 18, 2019
@jeherve jeherve deleted the rm/minileven-ui branch December 18, 2019 10:19
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Dec 18, 2019
jeherve added a commit that referenced this pull request Dec 20, 2019
zinigor added a commit that referenced this pull request Dec 30, 2019
* Changelog: 8.1 additions

* Changelog: add #13858

* Changelog: add #13963

* Changelog: add #14174

* Changelog: add #14178

* Changelog: add #14175

* Changelog: add #14192

* Changelog: add #14196

* Changelog: add #14182

* Changelog: add #14218

* Changelog: add #14214

* Changelog: add #13757

* Changelog: add #14190

* Changelog: add #14131

* Changelog: add #14101

* Changelog: add #14203

* Changelog: add #14211

* Changelog: add #14224

* Changelog: add #14230

* Changelog: add #14241

* Changelog: add #14249

* Changelog: add #14264

* Changelog: add #14263

* Changelog: add #14256

* Changelog: add #10189

* Changelog: add #14240

* Changelog: add #14239

Also added some new entries to the testing file.

Co-authored-by: Igor Zinovyev <zinigor@gmail.com>
zinigor added a commit that referenced this pull request Dec 30, 2019
* Changelog: 8.1 additions

* Changelog: add #13858

* Changelog: add #13963

* Changelog: add #14174

* Changelog: add #14178

* Changelog: add #14175

* Changelog: add #14192

* Changelog: add #14196

* Changelog: add #14182

* Changelog: add #14218

* Changelog: add #14214

* Changelog: add #13757

* Changelog: add #14190

* Changelog: add #14131

* Changelog: add #14101

* Changelog: add #14203

* Changelog: add #14211

* Changelog: add #14224

* Changelog: add #14230

* Changelog: add #14241

* Changelog: add #14249

* Changelog: add #14264

* Changelog: add #14263

* Changelog: add #14256

* Changelog: add #10189

* Changelog: add #14240

* Changelog: add #14239

Also added some new entries to the testing file.

Co-authored-by: Igor Zinovyev <zinigor@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retire mobile theme (minileven) Mobile Theme: Clarify user-facing wording
8 participants