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

Allow picture element options change from twig function #2351

Merged
merged 1 commit into from
Nov 20, 2023
Merged

Conversation

haivala
Copy link
Contributor

@haivala haivala commented Dec 2, 2022

Subject

I am targeting this branch, because this streamlines twig functions for src.

Closes #2342.

Changelog

### Changed
How `picture` element twig options are merged, making them work same way as `srcset`

@VincentLanglet
Copy link
Member

Can you add a test about the change ? This will prevent regressions

@haivala
Copy link
Contributor Author

haivala commented Dec 5, 2022

Can you add a test about the change ? This will prevent regressions

I would need help to do that. I don't know where to begin

@VincentLanglet
Copy link
Member

VincentLanglet commented Dec 5, 2022

Can you add a test about the change ? This will prevent regressions

I would need help to do that. I don't know where to begin

A unit test need to be added for getHelperProperties in this class
https://github.com/sonata-project/SonataMediaBundle/blob/4.x/tests/Provider/ImageProviderTest.php

You wanted to change the way properties are merged.
So if you call getHelperProperties with a title, prior to this change the title is not used, and now it will.
Write a test to reproduce the behavior you want

  • without your change the test fail
  • with your change the test succeed

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 3, 2023
@github-actions github-actions bot closed this Jun 10, 2023
@haivala
Copy link
Contributor Author

haivala commented Jun 12, 2023

I hope this would not be closed.

@VincentLanglet
Copy link
Member

I hope this would not be closed.

Feel free to finish it. PR with 6 months inactivity are automatically closed.

@github-actions github-actions bot removed the stale label Jun 12, 2023
@VincentLanglet VincentLanglet merged commit 574340b into sonata-project:4.x Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Twig helper function does not set title
2 participants