Skip to content

Conversation

@geriux
Copy link
Member

@geriux geriux commented Dec 28, 2022

What?

Fix a regression on the mobile block editor settings used from the apps.

Why?

From a recent update removing some code in favor of requiring at least WordPress 6.0 a file used for the mobile endpoint for the editor's settings was missed to update.

How?

By updating the usage to get the global styles from gutenberg_get_global_styles to wp_get_global_styles

Testing Instructions

  • Using a local instance of WordPress with these changes.
  • Using Postman make a request like http://localhost:8888/wp-json/wp-block-editor/v1/settings?context=mobile
  • Expect the endpoint to return the data, check for the following attributes: __experimentalFeatures, and __experimentalStyles

Testing Instructions for Keyboard

N/A

Screenshots or screencast

N/A

@geriux geriux added REST API Interaction Related to REST API Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Dec 28, 2022
@geriux geriux requested a review from oandregal December 28, 2022 10:55
@geriux geriux requested a review from spacedmonkey as a code owner December 28, 2022 10:55
@geriux geriux requested a review from fluiddot December 28, 2022 10:58
@geriux geriux merged commit ab6c6f2 into trunk Dec 28, 2022
@geriux geriux deleted the fix/mobile-endpoint-global-styles branch December 28, 2022 11:43
@github-actions github-actions bot added this to the Gutenberg 14.9 milestone Dec 28, 2022
@noahtallen
Copy link
Member

I'll work to get this into a patch release. I'll try to bundle it with another fix, though.

noahtallen pushed a commit that referenced this pull request Dec 28, 2022
@geriux
Copy link
Member Author

geriux commented Dec 29, 2022

I'll work to get this into a patch release. I'll try to bundle it with another fix, though.

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) REST API Interaction Related to REST API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants