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
Introduce a BP Search Block as a BuddyPress Add-on #62
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit also include Activity search which requires an upstream change.
This commit also fixes some translation issues: the name and description of the block were not translatable.
If v2 of the Block API was introduced in WP 5.6, using a `block.json` Metadata file was introduced in 5.8.
This makes sure people don't get confuse with the WP Block Search.
renatonascalves
approved these changes
Dec 30, 2021
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.
Looks good!
Thanks a lot for your feedbacks @renatonascalves 😍 . I'll improve the "posts in post" thing 👍 |
Take in account Renato's feedback an avoid "posts in post".
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've decided during the 10.0.0 development cycle that new BuddyPress blocks would be packaged as BuddyPress Add-ons and published into the WordPress Blocks/Plugins directory.
Here's the first block as BuddyPress add-on: BP Search Block. It's a block that uses a very old feature that was available when the BP Default theme was our main front-end playground. A search form with search options to look for members, groups, blogs or posts. Here's how it looks into a regular WordPress page:
As you can see, I've added the possibility to search for Activities. BuddyPress doesn't support this for now, but I'll open a ticket to quickly add this support into 10.0.0. I believe being able to search in activities from this block is a must have!
Here's how it looks into the Blocks editor:
From the Sidebar settings, you can select which component can be listed into the "Search for" radio group. Using this radio group, you can switch the default selected radio item.
This block requires WordPress 5.8 because it uses the block.json Metadata. It also uses version 2 of the Block API.
I've also adapted the BP Blocks plugin, so that it's easier to build these "standalone" blocks in the future.
My idea is to request a WordPress.org repository for this block so that it can be listed into the BuddyPress Add-ons tab we've added to the Plugins/Add new Administration screen.