-
Notifications
You must be signed in to change notification settings - Fork 0
Feature: Movie post meta panels #1
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?
Conversation
|
Still to do:
|
|
@fabiankaegy I think this is ready for a review. Basically I've done the following:
The blocks that use peoples names such as "Director" are still hardcoded. This would be perfect for WP Content Connect to handle the relationships between post types but let me know if you have other thoughts on that. Next steps would be working on the People single and figuring out what blocks/items we'd want users to complete as training tasks. What does a People single look like though? Also, the trailer in the Movies template is still a hardcoded image. Should we make tied to a YouTube embed instead to add trailers? Probably lots more to discuss but that's all I got for now, thanks! |
fabiankaegy
left a comment
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.
Very nice! I left some small suggestions inline but feel free to merge first and address in follow ups :)
|
|
||
| const { tenup_movie_plot = '' } = meta || {}; | ||
|
|
||
| let RenderedUI = ( |
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.
Instead of reassigning the renderedUI multiple times I would simply use early returns for these cases
| @@ -0,0 +1,211 @@ | |||
| <?php | |||
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.
Can we update this to use the 10up-framework like in the scaffold today?
| import { __ } from '@wordpress/i18n'; | ||
| import { usePost } from '@10up/block-components'; | ||
|
|
||
| export const BlockEdit = () => { |
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 actually make this editable inline. When the block is then used in a template we can make it editable using the following filter:
addFilter('editor.postContentBlockTypes', 'namespace/example', (blockTypes) => {
return [...blockTypes, 'tenup/example-block'];
});WIP Feature: Person single template
Description of the Change
How to test the Change
Create a new movie or select an existing one to edit their meta fields. Changes should be visible on the frontend.
Changelog Entry
Credits
Props @colinswinney
Checklist: