Closed ericras closed 4 years ago
And I think we want the photo used within the hero to appear in the hero's teaser view
My vote is a custom block type. IEF would be a good idea to help keep the UI sane.
Complex widget:
It looks like with IEF we need to use the complex widget even though we probably don't want to allow existing heroes to be referenced. The simple IEF widget requires the Block Description to be filled out and would create a (sometimes empty) hero for every node.
Simple widget:
Actually, the "Block description" can be hidden on "manage form display".... but then the custom block list has a blank space for it. We probably want to hide the "Block description" but auto populate it on save with a default value like: "Hero for node 84".
Edit: this is not included in this PR. For now, it is blank. See https://github.com/unlcms/project-herbie/issues/86 for follow-up issue.
Dependent on #44
This PR:
When I add a hero to a Builder Page, nothing prints in the Hero region and the hero block prints inside the Content region.
Expected:
Actual:
This is on a fresh install
I just did a fresh install and it doubles up for me. I'll work on it
Last commit should fix the hero printing inside content. IDK why nothing is showing in your hero region. With my fresh install that wasn't an issue.
For images used in structured content (i.e. anywhere other than media embedded in a rich text field), I think should use image fields. When we use images in structured content, that content provides context that does not exist for embedded media. In the case of a hero image, we know the resolutions and ratio that will be used on display. As a result, we can enforce a minimum resolution at upload. We can also provide a preview using an appropriate image style. This is also true for images used in card blocks. The minimum upload resolution will be different from the one we use for hero images. This context doesn't exist for embedded media. On other projects, I've used this distinction, and it seems to click for users.
I'm fine deferring for now. We should investigate conditionally applying image styles based on the hero size.
We need to grant the following permissions to Editors and Administrators:
The current behavior is that a user can create a Hero block with IEF but cannot edit it after it's been created.
Currently, IEF does not support entity reference revisions. When a hero is updated, the reference is to the block entity, not a revision of the block entity. I'm not sure how important this is to us, but here's the issue on Drupal.org: Support entity revision references
What do you think about removing the Revision log message field?
Can we add human-readable labels for the Hero size select list?
For example, either "Large" or "Large (dcf-hero-lg)" in place of "dcf-hero-lg".
The auto-collapse behavior of IEF is a little aggressive. For example, if a user expands the details element and clicks on the 'Edit' button for an existing Hero block, then the edit form loads but the details element collapses immediately. This is something that needs fixed in IEF. We can spin that off to a separate issue, but I wanted to first document with this pull request.
Reference media entity or Image field upload -- needs discussion Image Styles -- #87 Permissions -- committed Revisions -- #117 Remove Revision log message field -- non-blocker, follow up in #116 Add human-readable labels for Hero size select list -- committed Auto-collapse Behavior -- committed
b_hero_media (media ent ref) has been converted to an image field (b_hero_image).
Ready for review
Blocks #86
The hero region exists in the page template and the fields need to "lifted" up to that level with code.
I'm thinking about:
Alternatives: