-
Notifications
You must be signed in to change notification settings - Fork 82
Implements Heading Customization for the Reactions Block #1657
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
base: trunk
Are you sure you want to change the base?
Implements Heading Customization for the Reactions Block #1657
Conversation
Implements heading customization for the Reactions block using InnerBlocks, allowing users to: - Edit heading text - Change heading level (H1-H6) - Remove heading if desired - Apply standard Gutenberg heading styles Similar to Jetpack's Related Posts block implementation. Fixes Automattic#1096
src/reactions/reactions.js
Outdated
</div> | ||
); | ||
export function Reactions({ | ||
postId = null, |
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.
please use tabs instead of spaces.
Thanks for your contribution @vk17-starlord Can you please use |
ok @pfefferle will implement those changes |
@pfefferle - when i run 'NPM RUN BUILD' it still generated build files for all blocks and other unnecessary files which I haven't touched |
@pfefferle - Have converted spaces to tabs using vscode shortcut please check formatting and logic once |
@vk17-starlord I just ran the npm script on your branch and it removed all the map files and minified the JS/CSS as it should. Have you stopped the |
Yes I had stopped NPM RUN DEV before running NPM RUN BUILD . The NPM RUN BUILD script is building all blocks which haven't been changed |
That should be fine, it should just update the hashes. Please go ahead and just run |
@obenland - have already pushed the code you can check it out and review |
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 is pretty close. There are quite a few whitespace changes currently, would you mind reverting these to stay closer to WP coding standards?
setLoading(false); | ||
}) | ||
.catch(() => setLoading(false)); | ||
}, [postId, providedReactions, namespace]); |
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.
I'm not sure we need to add namespace
here? It should be constant.
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 your contribution! I left some comments below.
@@ -18,12 +18,7 @@ | |||
} | |||
} | |||
}, | |||
"attributes": { |
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 problematic as it will create validation errors for existing users of the block, whenever they try to visualize the block in the site editor.
I would recommend implementing deprecation to avoid that.
key={key} | ||
items={group.items} | ||
label={group.label} |
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.
Your editor doesn't seem to pick up the configuration from this project's .editorconfig
file. Could you keep the spaces inside brackets and parenthesis in the file?
This PR introduces enhancements to the Reactions block, enabling users to customize the heading using Gutenberg's InnerBlocks. The updates provide flexibility and control over the heading display.
Key Features:
This implementation is inspired by Jetpack's Related Posts block and aims to provide a similar level of customization.
Fixes:
Proposed Changes:
Changelog Entry:
Significance:
Type: