-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Media & Text Block: Add image fill option #14445
Media & Text Block: Add image fill option #14445
Conversation
@@ -0,0 +1,193 @@ | |||
/** |
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.
Moved the deprecated
part to its own file to declutter index.js.
Looks fine! |
This seems pretty solid in my testing, and I think it's a welcome addition to the block. I do wonder if we should rephrase the label though.
This can be a little confusing because if there isn't much text in the "Text" column (or if the image is very tall), the image will already be filling the entire column. I wonder if mentioning "cropping" in some way would be more clear:
|
ce109ac
to
f24e634
Compare
Thanks for the feedback, @kjellr. As per your suggestion, I updated the copy to "Crop image to fill entire column". |
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.
Great work here. Tested and it seems to work really well.
One a11y point which I think we should consider...
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.
Thank you for working on @frontdevde, it is looking good 👍
13ddb6d
to
153fe18
Compare
6286e4a
to
4aea210
Compare
Please note that with the merge of #13989 into master, I had to resolve a couple of conflicts and force push the rebased branch. In addition, I also updated the changelog to reflect the changes in this PR. |
@mapk Thank you for your input!
Personally, I agree.
@jorgefilipecosta @m-e-h Does this work for you? |
A key point.
I'd agree with this too. I concur with many folk here that One question: I'm not clear why the background-image version wouldn't work in IE11. Also, an Issue should be raised regarding object fit for both |
packages/e2e-tests/fixtures/blocks/core__media-text__image-fill-no-focal-point-selected.html
Outdated
Show resolved
Hide resolved
Probably best to not insert I'm sure IE would just ignore |
I've changed the default value for the background position from |
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.
Things looked good on my tests, thank you for iterating on this 👍
Description
This PR aims to add an image fill option as an enhancement to the Media & Text block.
In the Media & Text block it would be nice to have the option to make the image fill the full height of its column. In addition to providing a new creative option, this would allow for a more consistent look of the block across different viewports.
The corresponding issue is #14226
Screenshots
Todo
Let image fill the entire column
How has this been tested?
editor
modeChecklist: