-
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
Gallery block: Refactor "Settings" panel to use Toolspanel #67957
base: trunk
Are you sure you want to change the base?
Gallery block: Refactor "Settings" panel to use Toolspanel #67957
Conversation
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. |
Working on fixing unit test |
@Mayank-Tripathi32 looks like there is already a PR for this one #67904 But that one also has the same issue with the unit tests. So feel free to collaborate in case you already have a solution for the tests :) |
I tried to figure it out, but most issues occur on mobile, and I'm unsure how to fix them. If you have any resources, I'd be happy to try again. |
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.
Thanks for the PR!
I think the unit test failure is based on the fact that ToolsPanel
and ToolsPanelItem
are not available in the React Native version. There are two solutions:
- Split the
Edit
component into a web version and a React native version. That is, create aedit.native.js
file for the React Native version. Leave theEdit
component unchanged in the React native version. - Render the component conditionally using
Platform.isWeb
orPlatform.isNative
.
I think the latter approach is better for the Gallery block, since the Platform
is already used for block controls etc.
part of #67813
resolves #67893
Before
After