Pode.Web icon indicating copy to clipboard operation
Pode.Web copied to clipboard

Allow theme updating to not require a page reload

Open Badgerati opened this issue 2 years ago • 2 comments

This one will need investigating, but with #439 it should hopefully now be more possible to allow updating the theme to not require a page reload.

We could do this by dynamically changing the CSS file to be used, and by having a setTheme() function for some elements in the templates.js - for elements which are more tricky to update, like charts.

Badgerati avatar Apr 22 '23 20:04 Badgerati

It might also be worth investigating CSS variables, so the default-dark.css, etc. files become just variables with colour codes defined 🤔 This would make it a lot easier to add custom themes - bar charts/monaco or anything that current uses "btn-primary" bootstrap styles, these still need thinking about.

Badgerati avatar May 08 '23 21:05 Badgerati

For the bootstrap styles, it might be possible to override their CSS variables 🤔 - https://getbootstrap.com/docs/4.6/getting-started/theming/#sass-options (or if we migrate to v5: https://getbootstrap.com/docs/5.1/customize/css-variables/)

Badgerati avatar May 08 '23 21:05 Badgerati

The PR above has changed a lot to do with how themes work, primarily the dark, terminal, etc. CSS files are now CSS variable files. The concern with btn-primary elements, charts, and monaco have also been resolved as these are also now done via CSS variables as well.

Badgerati avatar Jun 23 '24 19:06 Badgerati