-
Notifications
You must be signed in to change notification settings - Fork 32
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
#6945: add a props block to sync mentions to wp.org #400
base: trunk
Are you sure you want to change the base?
Conversation
I've used |
This PR is closed. Is that correct? I'm under the impression that it should still be open. |
@@ -64,5 +64,7 @@ | |||
"selector-class-pattern": null | |||
} | |||
}, | |||
"dependencies": {} | |||
"dependencies": { | |||
"classnames": "^2.3.1" |
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 would avoid importing classnames
. It don't think we need it for the block.
@StevenDufresne |
👍 Okay. I've added this to my list of things :) |
Adds a "props" block as mentioned in #6945.
How
wporg/props
which is based on the core paragraph block (and similar to the notice block already existing in this repo).save_post
it checks for existance of this block (also supports nested blocks) and parses all mentions in this props block.WordPressdotorg\Profiles\add_activity
.classnames
dependency since its used in gutenberg and it's my go-to. But wasn't added in this package until yet and I don't think the DependencyExtractionPlugin of core handles that package. If we want to avoid this package for the simple two lines in this block, I can remove that.Questions:
add_activity
call? Is there a test instance or a local instance I can get when running via wp-env?type
parameter ofadd_activity
allow?bbp_find_mentions
to parse mentions. I'm reusing this function and provide a fallback if this is not available. If bbPress and this function will always be available, we can remove the fallback.remove_activity
function?save_post
hook here but if we only want to support the post post type, I can switch that tosave_post_post
.How to test:
npm start
+npm run wp-env start
WordPressdotorg\Profiles\add_activity
does not exist_wporg_props
does exist and has the correct values in itScreenshots: