-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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] - Remove themes
from supported endpoints
#63183
Conversation
… with the Android implementation
themes
from supported endpoints
Size Change: +168 B (+0.01%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing this issue! 🙇🏻
I tested these changes on a physical Samsung Galaxy S20 and iPhone 15 simulator. The test plan succeeded and I did not encounter any issues related to theme colors — both with and without an activated Gutenberg plugin.
- Expect to see the default theme colors in the Color palettes (Text/Background color)
To avoid any confusion, I interpreted this to be mean default colors packaged with WordPress core. I.e., the colors are not from/associated with the active theme. With that understanding, the expectation was met.
After activating the Gutenberg plugin, the theme's color were expectedly then present and available in the block editor.
💡 We might consider adding a change log entry.
// Don't add /themes endpoint due to an issue on Android | ||
// with the wp.org API implementation for React Native. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be worth publishing a comment on wordpress-mobile/WordPress-Android#21005 capturing the identified issue and linking to it within this code comment. Alternative, inlining an explanation in the code comment would work well too. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! I'll update it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 7a5d33c
That's it, the expected colors are the default ones from core 👍
I'll add it now 🚀 Thanks for the review and testing! |
* Mobile - Remove themes from the allowed API endpoints due to an issue with the Android implementation * React Native Editor - Update CHANGELOG * Native API Fetch setup - Update comment for disabling the themes endpoint Co-authored-by: geriux <geriux@git.wordpress.org> Co-authored-by: dcalhoun <dpcalhoun@git.wordpress.org>
* Mobile - Remove themes from the allowed API endpoints due to an issue with the Android implementation * React Native Editor - Update CHANGELOG * Native API Fetch setup - Update comment for disabling the themes endpoint Co-authored-by: geriux <geriux@git.wordpress.org> Co-authored-by: dcalhoun <dpcalhoun@git.wordpress.org>
Related PRs:
themes
from the allowed API endpoint list wordpress-mobile/gutenberg-mobile#6967What?
Due to recent changes, the editor now fetches the
/themes
endpoint when it opens, this is causing an issue on Android devices.Note: The theme endpoint was added in #33654 to be able to show the
Resize for smaller devices
block option for the Embed block but I haven't been able to see this option with a testing site I have, same on the Web editor.Why?
This is currently affecting self-hosted sites preventing them from using the editor which freezes after attempting to call this endpoint.
The native host apps already fetch the themes data and sends the information the editor needs. It appears there are some issues with how the native editor makes the GET request through the bridge and the host app.
How?
By removing
themes
from theSUPPORTED_ENDPOINTS
list for now.Testing Instructions
Testing Instructions for Keyboard
Note
Use the following build to test:
Screenshots or screencast
Before-Android.mov
After-Android.mp4