-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Show Cover block placeholder only if it has no inner blocks #31402
Conversation
Size Change: +19 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Thanks so much for your work here! This is before: This is after: As is hopefully evident here, the experience of clearing media is vastly improved here, and it does indeed fix the two tickets mentioned. However there's a recent "update background media" feature that regressed in this PR, that we should strive to keep if we can. Here's what happens if you drag and drop an image onto a cover block in trunk: Here's after: There's a conversation to be had whether you should be able to both replace the image background, in addition to uploading an Image block as an inner-block of a Cover — in trunk you can only do the former at the moment. Perhaps that could be solved by drag/dropping only along the edge of the Cover, whereas if you drag in the center, it becomes an innerblock. But that seems a separate conversation, and that we should probably keep the behavior in trunk at least for now. |
ab1b3e4
to
77ec62f
Compare
Thanks so much for testing and finding that regression @jasmussen. It was easy enough to not break it but my first attempt here was a bit obtuse 😅 . I've pushed another commit to get it working again. |
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, works well for me!
I'd love a sanity check if someone has time to give one, but this is an improtant fix, it's relatively simple code, looks good, and I'd suggest by the law of diminishing returns, it'd be good to merge after a bit if no-one else chimes in. Thank you!
Intended to resolve the apparent disappearance of content when the background is removed (to fix: #31253 and fix: #28888)
How has this been tested?
Manually by adding and removing backgrounds in Cover blocks
Screenshots
It can be seen that removing backgrounds does not return to the placeholder state. An edge case this doesn't work well for can be seen toward the end of the video. If the content color happens to match the fallback background color the content cannot be seen once the background is removed.
cover-block-less-placeholdery.mp4
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).