You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm reading the excellent docs ✨ (thanks @plone/documentation-team 💯 ) and I noticed that when talking about the srcset it does not explicitly mentions what's the actual python API method you should use (I will try to provide a fix for the docs later)...
Issue
So, I opened GitHub and looked at plone/namedfile/scaling.py where I found 2 classes:
ImageScale
ImageScaling
With almost exact docstrings:
view used for generating (and storing) image scales
view used for rendering image scales
Little quiz: which docstring belongs to which class? 🙃
Anyway, they look way too similar to not merge them, deprecate one, or... ? 🤔
The text was updated successfully, but these errors were encountered:
ImageScaling is the @@images view. It generates or gets a scale (so an actual blob file and metadata). And then it passes this info on to the ImageScale class, which can then be downloaded or show a tag.
So ImageScaling does the scaling, and ImageScale is the scale. Simple! :-D Well... perhaps not.
But they do have different purposes, and they are both quite long, so it is probably better to keep them separate.
I sometimes do have the urge to completely redo this package plus plone.scale. Maybe after my pension. ;-)
Context
I'm reading the excellent docs ✨ (thanks @plone/documentation-team 💯 ) and I noticed that when talking about the
srcset
it does not explicitly mentions what's the actual python API method you should use (I will try to provide a fix for the docs later)...Issue
So, I opened GitHub and looked at
plone/namedfile/scaling.py
where I found 2 classes:ImageScale
ImageScaling
With almost exact docstrings:
Little quiz: which docstring belongs to which class? 🙃
Anyway, they look way too similar to not merge them, deprecate one, or... ? 🤔
The text was updated successfully, but these errors were encountered: