-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Refactor layouts #20
Merged
Merged
Refactor layouts #20
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will allow us to get more flexible layouts
As all of the config needs to be in the main layout class anyway, we're better off just moving all of that logic there to keep it together
If we do it too early, we may not have the other feature available that we're basing it on By resolving this later, we allow the layout class to define all features first before trying to calculate their relative positions
This can be used a pure playground rather than a demo of a given layout setup
This allows us to position the anchor point of text-boxes according to their rendered size without getting caught in an infinite loop
There are a load of breaks in here, but basically needed in order to get closer to that perfect API. It's now possible to define complex relativeTo closure logic and have it respected $pivot was renamed to $anchor
As it's optional, we need to handle that better
No features Updates snapshots because of minor layout improvements
simonhamp
added
the
breaking-change
This PR contains breaking changes, so a new major version will be required
label
Jan 13, 2024
# Conflicts: # src/Traits/RendersFeatures.php # tests/Integration/ImageTest.php # tests/Integration/__snapshots__/ImageTest__test_basic_image with data set basic with background url__1.png # tests/Integration/__snapshots__/ImageTest__test_basic_image with data set different theme with background url__1.png
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR allows for really flexible layouts, allowing you to display whatever text or pictures you want in your image and laying them out relative to each other in more complex ways.
Added
PictureBox
feature: You can now load other pictures into your designs 🖼️Changed
Layout
class, to a fully dynamic set, defined in the childLayout
class.This means you can now define as many features as you like within your
Layout
class and aren't limited to what this library supports by defaultBox
class to a newBox
interfaceFixed
$anchor
) of a box relative to the$anchor
of any other feature.