spotify-player
spotify-player copied to clipboard
Implementation of adjustable widget sizes
While working on #278 I have come across two different way to implement the setting of different widget sizes in the config.
Option 1
Have two config values album width
& playlist width
and have them be the percentage values used in the layout.
Pros
- Super simple to understand
Cons
- Having two values to configure the size of the widgets seems very unclean
- It is easily possible to write values which are too large and would then cause errors, which need to be checked for
Option 2
Add a ration to the config such as 3:2:4
, which will define the size of the different widgets. See: CSS-Flex
Pros
- One value to define the size of all relevant widgets
- Errors can be entirely avoided
- Easier to scale to different places in the app
Cons
- A tiny bit harder to understand
- Will require adding a new "type" to the config