ruler
ruler copied to clipboard
Granular resource file categorization
Feature description
Hi! First off, thank you for open-sourcing such an amazing tool. The ease of integration and the amount of insight Ruler provides is just chef's kiss. Kudos!
That said, I feel like FileType.RESOURCE
is too broad of a category. Would it be feasible to make it more granular? So instead of having one umbrella type that is FileType.RESOURCE
, we'd have FileType.DRAWABLE
, FileType.LAYOUT
, FileType.FONT
, etc.
Reasoning
In a setup where size is being periodically tracked through Ruler, having granular resource types could help addressing regression faster.
Hey, @MrHadiSatrio Thanks for the great suggestion! We are going to take a look at this and get back to you!
Definitely! And you're most welcome. 😄
To illustrate this request better, I thought of making a small change to highlight a Drawable
I've added to :sample
.
Great idea! One thought I had - should they be differentiated at the same level as all other files (like you showed in your example)? Or should there be another graph inside the insights tab that only shows resources and their distribution? I'm thinking that the second option might be easier to use, since the first option could potentially overload the graphs (if you have a lot of different resource types) and make them harder to read. What do you think?
Now that you mentioned it, I guess the approach of having "sub-types" makes more sense when we're talking about visualization. Otherwise, there could only be so much we're adding to these graphs before it becomes too cluttered to glance at.
Though I think it can be made as an implementation detail on the front-end. The model hierarchy can stay as is to keep the type structure flat and downstream processing easy.
Hey @MrHadiSatrio @simonschiller I picked up this ticket yesterday.
I've added a few resource types: Drawable, Layout, Raw, Values, Font & Other. Do you think we should add something more to the list or this is good, to begin with?
I'm also sharing the example of the front end:
What do you think?
Fixed in #97, feel free to open another issue if there are resource types that are missing 😄
Wow, thanks a lot guys! This is amazing. ❤️