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

Site Settings API: add jetpack search controls #10079

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

dereksmart
Copy link
Member

Differential Revision: D17676-code

This commit syncs r180015-wpcom and brings these three files in sync. It has already been merged to wpcom.

Changes proposed in this Pull Request:

Summary:

  • indicator of if jp search supported
  • enable/disable flag

Testing instructions:

Test Plan:

  • TeamCity Tests (done)
  • Apply the patch and ensure that /sites/%site/settings is returning the correct value for the given site. And no errors.

Proposed changelog entry for your changes:

  • Either none or... "API: add flags to determine if Jetpack Search is enabled and supported."

Summary:
- indicator of if jp search supported
- enable/disable flag

Test Plan: - TeamCity Tests

Differential Revision: D17676-code

This commit syncs r180015-wpcom.
@jetpackbot
Copy link
Collaborator

That's a great PR description, thank you so much for your effort!

Generated by 🚫 dangerJS

Copy link
Member

@mdawaffe mdawaffe left a comment

Choose a reason for hiding this comment

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

Looks fine. I'm just not sure how the endpoint works in general :) @gibrown, is jetpack_search_supported supposed to be settable?

@@ -45,6 +45,8 @@
'jetpack_relatedposts_show_headline' => '(bool) Show headline in related posts?',
'jetpack_relatedposts_show_thumbnails' => '(bool) Show thumbnails in related posts?',
'jetpack_protect_whitelist' => '(array) List of IP addresses to whitelist',
'jetpack_search_enabled' => '(bool) Enable Jetpack Search',
'jetpack_search_supported' => '(bool) Jetpack Search is supported',
Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to be part of the request_format or just the response_format?

@gibrown
Copy link
Member

gibrown commented Aug 31, 2018

@mdawaffe ya jetpack_search_supported is not supposed to be settable. It is read only. If someone does try to set it then it will just get ignored. I'm not sure that adding more complexity to the code to handle this case would make sense though.

@mdawaffe
Copy link
Member

mdawaffe commented Sep 1, 2018

It is read only

Does it belong in site settings then? Do you know if there is other read only things in there?

Perhaps the ship has already sailed on this one.

@gibrown
Copy link
Member

gibrown commented Sep 4, 2018

Ya, I think the ship has sailed. For instance, lang_id doesn't seem settable unless I am missing something. I see ~38 settable fields and 55+ gettable ones.

Agree with your point, but I also don't see another endpoint that exists that has read-only fields. I guess what we should maybe have is some documentation of which fields are read-only.

@mdawaffe
Copy link
Member

mdawaffe commented Sep 4, 2018

I think we can just rework the request/response format properties.

Let's just get this merged for now, though.

@mdawaffe mdawaffe 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 Sep 4, 2018
@zinigor zinigor merged commit 434d2da into master Sep 4, 2018
@zinigor zinigor deleted the sync/dereksmart/r180015-wpcom-1535643213 branch September 4, 2018 17:53
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 4, 2018
jeherve added a commit that referenced this pull request Sep 14, 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
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.

7 participants