Optimise and improve label icons#398
Conversation
I meant the overall list of labels. It's only a single package that has each of those labels, I don't think it's worth downloading 85KB for individual packages. |
The first screenshot I posted is from the labels page.
The current download size is 85kB total; your 85kB refer the uncompressed diff. The savings are roughly 37kib. |
The screenshot is from the search, not from the overall list of labels.
Hmm, could've sworn I checked the gzipped size, but I clearly didn't. Still don't think that's a price worth paying for the label icons; we're considering removing the icons all-together for the official site. |
Interesting, it does not look clickable haha
I disagree, the C++ icon is hard to read as text but still looks awful next to C++ as text. Having only the icons also makes it invisible to native search.
Fwiw it was Jon's idea to remove the icons entirely after I showed him the C/C++ ones. |
31aed28 to
3f9e938
Compare
They also aren't included in the list of labels, so no reason to bloat the icons for insignificant labels. Additionally, this improves exclusions and aliases of icons. C, C# and C++ icons look very silly next to their names, so exclude those.
3f9e938 to
5562d79
Compare






This makes the following changes to improve/optimise labels:
Label icons with one usage are not included, saving 85KB compressed. These labels are already excluded from the label list, so there's not much point having the icon.
Excluded some label icons that are just the label in a fancy color. Having the label for C++ read as "C++ C++" just doesn't look good.
Deduplicated labels based on capitalization. "C" and "c" should not be different labels.