Staff-List-Plugin icon indicating copy to clipboard operation
Staff-List-Plugin copied to clipboard

Staff member Gutenberg Block

Open svenkaemper opened this issue 6 years ago • 5 comments

Playing around with the new Gutenberg editor I noticed that it would be really (really!) nice to have a Gutenberg block accompanying the Simple Staff list plugin.

Being able to just place a member profile anywhere on a page or post would be very useful. Author profiles, contact information, etc. And as blocks can be moved around one could easily create a sort of "list" within a page or post and skip the grouping and ordering within the plugin altogether.

svenkaemper avatar Sep 12 '18 11:09 svenkaemper

I really like this idea as well and have been thinking about it. With Gutenberg just a few weeks away, I'll start working on this to see what I can come up with.

brettshumaker avatar Oct 26 '18 19:10 brettshumaker

@brettshumaker If you need someone to test the Gutenberg block and provide feedback, just let me know ;)

svenkaemper avatar Nov 22 '18 13:11 svenkaemper

I just wanted to check in on this enhancement. I've started to mess with the block code and hopefully I'm not doubling the work if it's currently being worked on. It's off to a good start but it seems like other settings and enhancements are needed before completing:

Multiple templates If there will be multiple templates for the staff loop or a single staff loop, this will also need to be implemented in the settings before the block can be completed.

Single staff member shortcode To me, this would be the most practical way to store the block information into the database.

Staff Loop Block Pulls either all or by group and selected templates. Stores into the database using the [simple-staff-list] shortcode.

iamleese avatar Feb 20 '19 22:02 iamleese

Hey @iamleese -

I've started messing around a little bit, but haven't had much time and not really sure where I left off. So, feel free to work on this feature if you like. I'm happy to give feedback and test as well.

Multiple templates

While I think there will eventually be multiple template options for the staff loop, I think the block could be built before this feature is complete. We could always add in a block setting to choose a template once that feature is built.

Single staff member shortcode

I've been meaning to add support for displaying single staff members for a long time so I took a bit of time tonight and added it. It uses the id shortcode parameter to allow a user to display a specific staff member. You can find that feature in this branch for now. I'll try and get it merged in and released this weekend sometime.

Staff Loop Block

This sounds good. With the addition of the id shortcode attribute it would also cover the single staff member block unless you wanted a separate single staff member block that just uses the [simple-staff-list id=12] format. This could make it a bit clearer that displaying a single staff member is now possible.

Thanks again for contributing!

brettshumaker avatar Feb 22 '19 04:02 brettshumaker

@iamleese @svenkaemper

I've got a working version of the Single Staff Member block in #104 Check it out if you have time and let me know what you think.

Thanks!

brettshumaker avatar Jun 07 '19 18:06 brettshumaker