Skip to content
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

85/add sslp gutenberg blocks #104

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

brettshumaker
Copy link
Owner

Adds a single Staff Member Gutenberg block.

This is a big commit. Adds a functional single Staff Member block. There are still a few bugs to work out and still some work to do on the admin rendering, but it's a pretty good start.
Ok, this seems to be working now.

A dynamic block that renders the shortcode on the front-end and also uses `<ServerSideRender />` to render the shortcode in the admin area too.
Accidentally introduced a bug where the block would automatically select the first search result with no interaction from the user.
The code used to assume that all staff members would have photos (i.e. that response._embedded would exist) and this is not the case. Now it handles the case of a staff member without a photo.
brettshumaker added a commit that referenced this pull request Jun 20, 2019
This adds a Gutenberg-first (not utilizing the shortcode) dynamic block. And likely renders the legacy block from #104 useless because I added the "Staff Loop Template" for a layout option.

It contains 3 layout options:
- image left, content right
- content left, image right
- image top, content bottom

You can control the fields that are shown on each Single Staff Member block via toggle switches in the `Content Options` panel. **TODO: make these filterable? Would allow users/plugin developers to add their own custom fields.**

All functions that handle the layouts, and all block field render functions are pluggable in that a user can add a function with the same name to their theme and it will be used instead of the function contained in Simple Staff List.
Base automatically changed from master to main March 16, 2021 13:20
brettshumaker added a commit that referenced this pull request Mar 16, 2021
This adds a Gutenberg-first (not utilizing the shortcode) dynamic block. And likely renders the legacy block from #104 useless because I added the "Staff Loop Template" for a layout option.

It contains 3 layout options:
- image left, content right
- content left, image right
- image top, content bottom

You can control the fields that are shown on each Single Staff Member block via toggle switches in the `Content Options` panel. **TODO: make these filterable? Would allow users/plugin developers to add their own custom fields.**

All functions that handle the layouts, and all block field render functions are pluggable in that a user can add a function with the same name to their theme and it will be used instead of the function contained in Simple Staff List.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant