-
Notifications
You must be signed in to change notification settings - Fork 20
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
ZMI: limit number of resulted folderish objects and show SVG as FSImage #130
Conversation
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.
Hi @dataflake , |
Sorry for being nitpicky. Your cleanup work is always appreciated. |
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.
Sorry, count-param was not needed; it works easier with len() of the rval-list.
👍 |
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.
SVG files are considered as images now: a preview and the image dimensions are shown. The image dimensions of SVG files are provided by this Zope PR zopefoundation/Zope#1146
Just make sure that this switch from FSFile to FSImage does not lead to blowups/tracebacks when used with Zope versions from before zopefoundation/Zope#1146 |
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.
Thanks for the hint (#130 (comment)); actually with default width/height=-1 the FSImage-preview does not work (same as FSFile).
This custimage-DTML-template change provides an image preview now, even without zopefoundation/Zope#1146.
Having no image dimensions the SVG pic is shown using the object
-Tag for setting mime-type (!) and an onload-resizing for a best-guess-fit. This is not as perfect as scaling with available dimensions (zopefoundation/Zope#1146) , but it is still an UX-improvement compared to the former status of SVG as FSFile, because formerly the image-preview was not shown at all.
👍 |
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.
for handling unorthodox svg-xml variants
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.
Hi @dataflake , |
The PR author merges after approval, which you already have for both. Next time I would suggest you ask for approval at the very end. I didn't know this was going to hang around for such a long time while you were making tweaks and fixes. |
The manage_main-vIew of FSDirectoryVIew object may extremly slow down the system if the DirectoryView is next to root and the ZODB has a lot of objects. Reason is that all (!) folderish Zope objects are listed in the select-list "customize" (for selecting a copy-target).
Actually the manage_main-view ist primarily used for getting a short glance of the object's code/content (and maybe not so often for replicating its code into a ZODB object).
So I would like to suggest a max-parameter to ensure a quick response of the manage_main view. I propose a default value of 20 that can be adjusted to (50,100.200.500.1000, unlimited) on click, if the long list is really needed.
[1] Former ZMI (master branch)
[2] New ZMI status