-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add to generate Plone image scales on save (opt-in) #43
Conversation
@datakurre thanks for creating this Pull Request and help improve Plone! To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass. Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:
With this simple comment all the jobs will be started automatically. Happy hacking! |
@jenkins-plone-org please run jobs |
@jenkins-plone-org please run jobs |
@jenkins-plone-org please run jobs |
a853452
to
3224846
Compare
@jenkins-plone-org please run jobs |
@plone/framework-team we would like to get feedback on this PR if possible. It is non-intrusive, non-breaking and the feature is purely optional. IMHO there is no risk in merging it and no need for an FWT vote IMHO. Though, a quick feedback/discussion would be nice. |
Motivation for this in brief: • for the current web, more and bigger scales are needed (Also more fixes for scaling is possible. I recall that scale ids are now random, not deterministic, which may lead to broken images on strongly cached html. I have local patch for that, but no proper pull request. And also scaling itself could be made faster by making it async and parallel [there’s an experimental branch on plone.namedfile].) |
+1 from me on this. |
@frapell if this is something that the FWT should vote on, we should vote (or wait for the vote). I don't mind either way. :) |
As a reminder the @plone/framework-team has received an invitation for the next meeting on Tue 29 Jun 2021 15:00 – 16:00 (CEST). Let's make it happen that day |
BTW this functionality can easily be incorporated in an addon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, I just added some remarks to avoid having too many functions in the datamanager module.
On the last meeting, the @plone/framework-team talked about this PR. |
Alessandro's review has good ideas for making this pull better before merge. |
@jenkins-plone-org please run jobs |
8b6b440
to
aff00ee
Compare
@jenkins-plone-org please run jobs |
1 similar comment
@jenkins-plone-org please run jobs |
I wonder what this
is. I think I saw that already before the latest changes. |
PIL 8+ now raises more specific errors. This is fixed on master, rebase this branch. |
4a85bc9
to
b7676cb
Compare
@jenkins-plone-org please run jobs |
@jenkins-plone-org please run jobs |
I noticed that master targets >= 3.0.0 with Plone 4 no longer being supported, so I removed the compatibility code from this pull. |
Branch: refs/heads/master Date: 2021-07-07T08:00:26+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@83fc204 Add to generate Plone image scales on save when environment variable PLONE_SCALE_GENERATE_ON_SAVE=1 is set Files changed: A plone/formwidget/namedfile/datamanager.py M plone/formwidget/namedfile/configure.zcml M plone/formwidget/namedfile/interfaces.py M plone/formwidget/namedfile/tests.py Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T08:00:28+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@380e12e Add changelog entry Files changed: A news/43.feature Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T08:00:29+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@47023e8 Update changelog item Files changed: M news/43.feature Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T08:00:29+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@29c6172 Apply comments from review for plone/plone.formwidget.namedfile#43 Files changed: M plone/formwidget/namedfile/datamanager.py M plone/formwidget/namedfile/utils.py Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T08:00:30+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@b7676cb Change get_scales_info to not depend on _IMREALLYPLONE5-hint Files changed: M plone/formwidget/namedfile/utils.py Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T09:13:25+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@3714ae0 Change to set the feature flag attribute on class definition Files changed: M plone/formwidget/namedfile/datamanager.py Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T09:19:21+03:00 Author: Asko Soukka (datakurre) <asko.soukka@iki.fi> Commit: plone/plone.formwidget.namedfile@0026d0f Remove Plone 4 compatibility Files changed: M plone/formwidget/namedfile/utils.py Repository: plone.formwidget.namedfile Branch: refs/heads/master Date: 2021-07-07T08:59:04+02:00 Author: Alessandro Pisa (ale-rt) <alessandro.pisa@gmail.com> Commit: plone/plone.formwidget.namedfile@7ee1f45 Merge pull request #43 from plone/datakurre-generate-scales-on-save Add to generate Plone image scales on save (opt-in) Files changed: A news/43.feature A plone/formwidget/namedfile/datamanager.py M plone/formwidget/namedfile/configure.zcml M plone/formwidget/namedfile/interfaces.py M plone/formwidget/namedfile/tests.py M plone/formwidget/namedfile/utils.py
when environment variable PLONE_SCALE_GENERATE_ON_SAVE=1 is set