-
Notifications
You must be signed in to change notification settings - Fork 847
Block List HOC: Ensure className is preserved #14738
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
Conversation
As the HOC was used as part of a filter, the className was getting set by the last filter that was run. This was a lucky accident for OpenTable as it meant that it wasn't affected by the bug being fixed in #14732 This change passes through the className prop when the block names don't match, which means that if it's been set by a previous filter, it is preserved.
|
Caution: This PR has changes that must be merged to WordPress.com |
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: March 3, 2020. |
jeherve
left a comment
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.
This seems to work well in my tests on Jetpack and on WordPress.com.
scruffian
left a comment
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.
This "fixes" the issue on WPCOM. Great work 👍 ![]()
|
r203262-wpcom |
As the HOC was used as part of a filter, the className was getting set
by the last filter that was run. This was a lucky accident for OpenTable
as it meant that it wasn't affected by the bug being fixed in #14732
Changes proposed in this Pull Request:
This change passes through the className prop when the block names don't
match, which means that if it's been set by a previous filter, it is
preserved.
Is this a new feature or does it add/remove features to an existing part of Jetpack?
This is a bug fix
Testing instructions:
block-editor-block-list__blockdiv has thehas-warningandis-interactiveclasses for the blocksThis is dependent on #14732, which should be merged first or OpenTable will break for free WPCOM sites.
Proposed changelog entry for your changes:
This only affects WPCOM sites, so I don't think it requires a changelog.