-
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)
![zmi_cusomize_item0](https://private-user-images.githubusercontent.com/29705216/260335026-82c23c75-87d9-4e1c-bce6-ee4d91141ed9.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ0NzI2MzAsIm5iZiI6MTcyNDQ3MjMzMCwicGF0aCI6Ii8yOTcwNTIxNi8yNjAzMzUwMjYtODJjMjNjNzUtODdkOS00ZTFjLWJjZTYtZWU0ZDkxMTQxZWQ5LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDA0MDUzMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA3NDc0MDYyMTA2OTNiMDU1NWYxOTE2YTg0ZTQ1NzcxMzQwOGI5NzVmYjBiODJhOWQ3MmM1NTg2YmI2MGE1YjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FleTBjqvJ0-sC8rwiBoGdQNQAUMtba6L9Hun8XRBRAw)
[2] New ZMI status
![zmi_cusomize_item3](https://private-user-images.githubusercontent.com/29705216/260438902-d27c2113-ae89-48db-9875-d5725425cd5b.gif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