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

Use "mode" parameter for scaling (direction is deprecated in plone.scale) #102

Closed
petschki opened this issue Oct 12, 2021 · 0 comments · Fixed by #130 or #131
Closed

Use "mode" parameter for scaling (direction is deprecated in plone.scale) #102

petschki opened this issue Oct 12, 2021 · 0 comments · Fixed by #130 or #131

Comments

@petschki
Copy link
Member

No description provided.

mauritsvanrees added a commit to plone/plone.scale that referenced this issue Aug 12, 2022
This cleans up more confusion between mode and direction.  See also plone/plone.namedfile#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 pushed a commit to plone/buildout.coredev that referenced this issue Aug 13, 2022
Branch: refs/heads/master
Date: 2022-08-12T16:09:48+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.namedfile@7b9ed92

Use mode parameter instead of deprecated direction and warn user about it.

Fixes plone/plone.namedfile#102

Files changed:
A news/102.bugfix
M plone/namedfile/adapters.py
M plone/namedfile/scaling.py
M plone/namedfile/test.pt
M plone/namedfile/tests/test_adapters.py
M plone/namedfile/tests/test_scaling.py
M plone/namedfile/usage.rst
Repository: plone.namedfile

Branch: refs/heads/master
Date: 2022-08-13T17:01:00+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.namedfile@d95b1cd

Merge pull request #130 from plone/petschki-mode-scaling-take-2

Use mode parameter instead of deprecated direction

Files changed:
A news/102.bugfix
M plone/namedfile/adapters.py
M plone/namedfile/scaling.py
M plone/namedfile/test.pt
M plone/namedfile/tests/test_adapters.py
M plone/namedfile/tests/test_scaling.py
M plone/namedfile/usage.rst
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 29, 2022
Branch: refs/heads/master
Date: 2022-08-12T16:16:24+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.scale@85874eb

Use "scale" mode as default.

This cleans up more confusion between mode and direction.  See also plone/plone.namedfile#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.

Files changed:
A news/102.bugfix
M plone/scale/interfaces.py
M plone/scale/scale.py
M plone/scale/storage.py
M plone/scale/tests/test_scale.py
M plone/scale/tests/test_storage.py
Repository: plone.scale

Branch: refs/heads/master
Date: 2022-09-29T12:34:49+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.scale@b1ba10f

No longer test Plone 5.2 on 3.6 and Plone 6.0 on 3.7.

Files changed:
A news/3637.breaking
M .github/workflows/tests.yml
M tox.ini
Repository: plone.scale

Branch: refs/heads/master
Date: 2022-09-29T20:50:04+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.scale@79f2f13

Merge pull request #66 from plone/maurits-direction-versus-mode

Use "scale" mode as default.

Files changed:
A news/102.bugfix
A news/3637.breaking
M .github/workflows/tests.yml
M plone/scale/interfaces.py
M plone/scale/scale.py
M plone/scale/storage.py
M plone/scale/tests/test_scale.py
M plone/scale/tests/test_storage.py
M tox.ini
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 29, 2022
Branch: refs/heads/master
Date: 2022-09-29T12:20:54+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.namedfile@d845513

Use mode parameter instead of deprecated direction and warn user about it.

Fixes plone/plone.namedfile#102

Files changed:
A news/102.bugfix
M plone/namedfile/adapters.py
M plone/namedfile/scaling.py
M plone/namedfile/test.pt
M plone/namedfile/tests/test_adapters.py
M plone/namedfile/tests/test_scaling.py
M plone/namedfile/usage.rst
Repository: plone.namedfile

Branch: refs/heads/master
Date: 2022-09-29T12:20:55+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.namedfile@6fb9077

In DefaultImageScalingFactory call, get rid of the direction parameter early.

Otherwise it ends up in hashes and it negates the next condition.
Some plone.restapi tests fail without this fix.

Files changed:
M plone/namedfile/scaling.py
Repository: plone.namedfile

Branch: refs/heads/master
Date: 2022-09-29T12:20:55+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.namedfile@40b8977

No longer test Plone 5.2 on 3.6 and Plone 6.0 on 3.7.

Files changed:
A news/3637.breaking
M .github/workflows/tests.yml
M tox.ini
Repository: plone.namedfile

Branch: refs/heads/master
Date: 2022-09-29T20:50:11+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.namedfile@c0a681c

Merge pull request #131 from plone/petschki-mode-scaling-take-3

Use mode parameter instead of deprecated direction (take 3)

Files changed:
A news/102.bugfix
A news/3637.breaking
M .github/workflows/tests.yml
M plone/namedfile/adapters.py
M plone/namedfile/scaling.py
M plone/namedfile/test.pt
M plone/namedfile/tests/test_adapters.py
M plone/namedfile/tests/test_scaling.py
M plone/namedfile/usage.rst
M tox.ini
Gomez added a commit to starzel/collective.modules that referenced this issue Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant