-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 ImageCrops from DataType if empty #5739
Conversation
Hey @cleversolutions , Welcome here and congratulations on your first PR! We will review the work and get back to you if we need anything more. Watch out this space :-) Regards, |
I added a comment to the change, I felt it needed an explanation. |
Really cool @cleversolutions - I didn't think of dynamically adding these crops if they don't yet exist. I will need to talk to some people at HQ to see if this is a workable solution. Will get back to you! |
…e-edit-view' into v8/feature/AB2913-DataTypeTracking
…e-edit-view' into v8/feature/AB2913-DataTypeTracking
Check if value is null or whitespace before reading grid configuration
…d wires that up to angular
* V8 style preview badge * updates the preview badges in other places * Removes umbraco logo * changes the "click to end" icon * Set flex-shrink to 0 on the badge end element * adds width:1em to the svg
* Adds nametemplates for grid editors
* Removed unused variable * Align usage of C# type keywords vs Universal type names. Now we use C# keywords all over.
…e in the listview unpublish dialog
Hey @nul800sebastiaan is there anything you need from me for this PR? |
…ton (umbraco#6561) * Improves accessability of the three dot tree options button * Updated list view headers styling to have the link/hand cursor visible only if the header is sortable (and hence clicking has an effect) * Allows members to be ordered by additional system fields (umbraco#6575) * Fix ContentType.Alias matching in PublishedContentExtensions an… (umbraco#6577) * Fixes an error in umbraco#6538 by moving the colon character to the sr-only span * V8: Move misplaced colon in language selector (umbraco#6692) * V8: It should be possible to disallow all types at content root (umbraco#6580) * Pick macro parameters in an infinite editor like content type properties (umbraco#6586) * Reload node children after publishing with descendants * Correct URL decoding of macro partial view names (umbraco#6592) * Fix semantics for list views (umbraco#6595) * fixes test * fixing tests * Improved menu context
Thanks for the reminder @cleversolutions - I am not sure if we should do this, it seems like the performance of the |
Hi, this should instead be done in the Since this data is coming from the front-end cache, the way access to a DataType works is that it does hit the DB once but not over and over again so the way you are accessing the DataType is fine. |
# Conflicts: # src/Umbraco.Web/Cache/LanguageCacheRefresher.cs
…-deletion Language variant deletion
Thanks @Shazwazza, I’ll work it in like that instead. |
So it would seem that I did something very wrong while rebasing this pull request. I did a
Then committed, but now this PR is polluted with every other change that's happened in the past few months. Is the best bet now to just close this PR and I'll open a new one? @Shazwazza thanks for tip about looking into the PropertyValueConverters. The code to do this is already there, but it wasn't executing because of some null reference checking. Essentially this can all work with 2 small lines of code change. |
I couldn't figure out how to fix the mess I made of this so I re-created the branch and have submitted a new pull request #6950 |
Prerequisites
This fixes issue #5737
Description
When you add a crop alias to Image Cropper after media already exists in your Media library it doesn't pick up any of the crops. This PR updates ImageCropperTemplateExtensions to check for this condition and configure crops from the DataType.Configuration.
Steps to reproduce
As per issue #5737
With this PR, I've also tested another scenario
<img src='@product.Photos.GetCropUrl("1x1")' />
Caveat
There may be a better way of solving this, I'm new to the Umbraco code base. The fact that the image which was edited has 2 crops in imageCropperValue.Crops the second time makes me wonder if the real issue lies somewhere. Someone with a better understanding of the caching/converters may have a better idea.