Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Add a setOnlyIfEmpty option to the DesignateMobileEditorForAllSites payload#1466

Merged
hypest merged 2 commits intodevelopfrom
issue/gb-rollout-phase2
Dec 31, 2019
Merged

Add a setOnlyIfEmpty option to the DesignateMobileEditorForAllSites payload#1466
hypest merged 2 commits intodevelopfrom
issue/gb-rollout-phase2

Conversation

@maxme
Copy link
Copy Markdown
Contributor

@maxme maxme commented Dec 30, 2019

Make sure to replace "CHANGEME" by an actual Bearer token.

To test:

  • Open a user report card, on at least one site, turn mobile-editor to aztec.
  • Run one of the following command.
  • Refresh the user report card. Check the mobile-editor setting on that site.

3 commands, one is not working as expected (the second one):

  • set_only_if_empty: true, this won't change the mobile-editor setting unless it's "empty" (ie. unset or null).

    curl 'https://public-api.wordpress.com/wpcom/v2/me/gutenberg/' -H 'Authorization: Bearer CHANGEME' -H 'Content-Type: application/json; charset=utf-8' --data '{"editor":"gutenberg","set_only_if_empty":"true","platform":"mobile"}'
  • set_only_if_empty: false, this should change the mobile-editor whatever current value is, but this doesn't work.

    curl 'https://public-api.wordpress.com/wpcom/v2/me/gutenberg/' -H 'Authorization: Bearer CHANGEME' -H 'Content-Type: application/json; charset=utf-8' --data '{"editor":"gutenberg","set_only_if_empty":"false","platform":"mobile"}'
  • Omit set_only_if_empty - This will change the mobile-editor value whatever current value is.

    curl 'https://public-api.wordpress.com/wpcom/v2/me/gutenberg/' -H 'Authorization: Bearer CHANGEME' -H 'Content-Type: application/json; charset=utf-8' --data '{"editor":"gutenberg","platform":"mobile"}'

@hypest
Copy link
Copy Markdown
Contributor

hypest commented Dec 31, 2019

Verified:

The set_only_if_empty: true command is not changing the remote setting if the remote setting is aztec.

The set_only_if_empty: false command is not changing the remote setting but the opposite would be expected.

The "Omit set_only_if_empty" command is indeed changing the remote setting of the sites not already on (mobile) Gutenberg.

Copy link
Copy Markdown
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

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

LGTM!

@hypest hypest merged commit a10939f into develop Dec 31, 2019
@hypest hypest deleted the issue/gb-rollout-phase2 branch December 31, 2019 15:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants