sirrus233 / twilight-imperium-helper

Game assistant for Twilight Imperium
1 stars 0 forks source link

Label sidebar menu button and add minimal styling #13

Closed chelseaSchmidt closed 2 months ago

chelseaSchmidt commented 3 months ago

I tried installing MUI icons and using a hamburger icon, but it only allowed this style of import, which would unnecessarily inflate the bundle size (I think?):

import { Menu } from "@mui/icons-material";

whereas I wanted to use:

import Menu from "@mui/icons-material/Menu";

The docs say it should allow both import types, so I think the problem may be: https://github.com/mui/material-ui/issues/35535

I haven't gone deeper on it yet, but just adding this change in the meantime so it's not a blank button!

chelseaSchmidt commented 3 months ago

image

sirrus233 commented 3 months ago

Not sure I understand the difference/implications of the import you're talking about? Would be happy to learn!

chelseaSchmidt commented 3 months ago

@sirrus233 Just a developer experience thing, like it takes longer to create the bundle and the bundle itself is larger because every single MUI icon is imported when you use the named import, instead of only the exact icon you need when you use the default import. We might not notice an impact from it at all, so it's very possible I'm over-optimizing? Anyway this is more detail from MUI:

image