-
Notifications
You must be signed in to change notification settings - Fork 43
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
Draft: Refactor Image
component to a more composable API
#222
base: develop
Are you sure you want to change the base?
Conversation
Size Change: +961 B (+1%) Total Size: 66.1 kB
|
Just a tiny suggestion that you're completely welcome to ignore. Instead of |
@Antonio-Laguna yeah I hate The reason I didn't go with But maybe we should approach this differently 🤔 Instead of creating a breaking change with this image component here what if we introduce a new Not sure whether it would actually work but may be an option 🤔 Or just |
If we have an |
5 failed tests on run #705 ↗︎
Details:
IconPicker.spec.js • 1 failed test
Image.spec.js • 1 failed test
Link.spec.js • 1 failed test
Repeater.spec.js • 1 failed test
registerBlockExtension.spec.js • 1 failed test
Review all test suite changes for PR #222 ↗︎ |
…ponent-inline-controls Add inline media controls for the Image component
Description of the Change
This is still an early draft and needs more work
Refactor the
Image
component to include thefigure
element in the markup of theImage
component in the editor. This reason for this change is to make it easier to add additional elements inside the image component that are absolutely positioned in relation to the wrappingfigure
. Examples of this include the Image Drop Zone / media replacement controls as explored in #172 and #218Output Before:
Output After:
This however introduces new issues:
figcaption
inside the figurefigure
In order to solve this the
Image
component now also comes with a few child components that can be used to take control over the full markup.Output:
Or alternatively, you can also use a render function to completely take over the rendering:
Closes #
How to test the Change
Changelog Entry
Credits
Props @fabiankaegy @Sidsector9 @ncoetzer
Checklist: