-
Notifications
You must be signed in to change notification settings - Fork 343
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
Make recursive icon lookup work with size == 0 #1302
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1302 +/- ##
=======================================
Coverage 65.52% 65.52%
=======================================
Files 48 48
Lines 7997 7997
=======================================
Hits 5240 5240
Misses 2757 2757
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Looking back at it maybe it's better to print an error if recursive lookup is enabled with min_size = 0? |
Yeah, i think it's best to get rid of min size. It doesn't make much sense with the new icon lookup, since it only uses one size. |
Honestly I don't know if it is better to ignore the min size for icon lookup. Because at the moment it is used for determining the size of non scalable icons. In this pr I made it so that if minsize is 0 we get whatever size we found. Which seems sensible... but i don't know if some warning should be issued or something 🤔 |
What I mean is that having a max and min size doesn't make much sense right now, since only one size is used for the lookup. So it's best to rename this setting or somehow use both sizes again |
proposal = make a |
Yeah, but what are you doing with scalable icons? Are you making them as big as possible? In practice most icons are scalable, so only the biggest size is used. So in what case would you want a min and max size? |
I guess you are referring to making an icon_size length value. The option is to have a value (min, max) like for width. Or alternatively a single value that makes min =max and in practice would mean that the icon has a fixed size. This latter part could be achieved by setting icon_max_size = icon_min_size but that would change the semantics of those in another way. So the idea is to implement this more versatile single option that has also a sane behavior if you want fixed size icons and is tailored to work with recursive lookup. The old options can obviously be deprecated at a later date. |
I will have to redo this based on #1365 |
Only works with scalable icons, but at least it works.
@fwsmit do you think this is a good enough solution for #1094?