Skip to content
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

Moved image-related method into ImageHelpers #707

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

zachgarwood
Copy link
Member

The short version:
A change in how Twill renders blocks necessitates us moving a method out of the our App\Model\Vendor\Block override model and into a helper.

The long version:
When using Twill 2, we created VendorServiceProvider to swap our override Block model for the Twill Block model during dependency injection. (See https://laravel.com/docs/11.x/container#binding-interfaces-to-implementations for details on how this works.) However, due to this new line in Twill 3, nested blocks (including repeaters) are instantiated inline rather than during injection, so they will always be instances of Twill's Block model. In order to allow repeaters to access the getImgixTileSource function that was defined in our override model, I moved it into a helper.

@zachgarwood zachgarwood self-assigned this Feb 25, 2025
Copy link
Member

@nikhiltri nikhiltri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good sleuthing! ⭐

@zachgarwood zachgarwood merged commit df4dc60 into develop Feb 27, 2025
9 checks passed
@zachgarwood zachgarwood deleted the fix/repeater-rendering branch February 27, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants