plone / plone.scale

Contains image scaling logic for use in Zope environments. It supports Zope 2, Pyramid and other systems build on using the Zope ToolKit (ZTK).
https://pypi.org/project/plone.scale
2 stars 16 forks source link

Use "scale" mode as default. #66

Closed mauritsvanrees closed 2 years ago

mauritsvanrees commented 2 years ago

This cleans up more confusion between mode and direction. See also https://github.com/plone/plone.namedfile/issues/102. Previously our definition of the IImageScaleFactory interface had the deprecated direction="thumbnail". Other parts used mode="contain" by default, which does cropping, where in Plone we are used to simple scaling almost everywhere.

Depending on your point of view, you could call this a bug fix (fixing the default to what Plone expects, to avoid surprises). Or you could call this a breaking change, because the default changes. It is beta stage, so I am okay with it either way.

mister-roboto commented 2 years ago

@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

mauritsvanrees commented 2 years ago

The gh-actions pass. Now I test these two PRs together:

https://github.com/plone/plone.scale/pull/66
https://github.com/plone/plone.namedfile/pull/130

They are not dependent on each other, but they change similar things, so it is good to test them in combination.

mauritsvanrees commented 2 years ago

Testing these two again on Jenkins 6.0:

https://github.com/plone/plone.scale/pull/66
https://github.com/plone/plone.namedfile/pull/130
mauritsvanrees commented 2 years ago

That should be:

https://github.com/plone/plone.scale/pull/66
https://github.com/plone/plone.namedfile/pull/131

Trying again.