tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6k stars 513 forks source link

GUI Module #4463

Open johnbotris opened 2 years ago

johnbotris commented 2 years ago

As part of our goal of extracting parts of the code base to improve code sharing (see: https://github.com/tutao/tutanota/issues/3194) We want to create a module for base GUI components.

This should mostly be moving the contents of src/gui/base into it's own module.

Things to consider as part of this:

charlag commented 2 years ago

While I think CSS variables would be even better (hopefully not slower) I think some singletons don't even hurt that much. styles, theme, sizes can all just live in GUI module. We did the same with crypto and randomizer where it arguably makes even less sense.

I think providing some translation provider to the GUI module during init is also a good idea.

charlag commented 1 year ago

A bit on how themes can be injected into gui library: https://mui.com/joy-ui/customization/approaches/