Hi. A question about theming. As I understand it, ...
# ui
w
Hi. A question about theming. As I understand it, in order to customize the theme one needs to rebuild the frontend from source? Is there any way I've missed that one can customize a theme without rebuilding? As in just placing some assets and a config file in some folder? If not, is this something that anyone would find useful. The reason i'm asking is that we are striving to not have to maintain our own fork that has to be kept in sync indefinitely.
b
Yes -- So there's no way for us to inject say "env" variables after build time for the react app, so any customizations need to be applied when we build the version to be served 😕
However you can minimize your chances of a big merge by limiting your changes to well-defined places (like a single added theme file)
w
Ok. Thanks! Just wanted to ensure I hadn't missed this. I agree that this type of diff should not be that hard to maintain.
🙌 1
w
To run with our custom theme, we: • Added our theme to the
theme
directory (datahub git tracked) • Modified the
REACT_APP_THEME_CONFIG
var • Added other assets (company logo, data source logos) to the
public
directory (datahub git tracked) • Run
docker/dev.sh
• Run
yarn start
(since the
dev
override doesn’t include the built
datahub-web-react
files) I wonder if allowing the`REACT_APP_THEME_CONFIG` to be absolute would give more flexibility to version control this file outside of a fork 🤔
c
Rebuilding the frontend is 90% of the work for us, when we upgrade our datahub instance. 😞 I wish we were able to control the theming without rebuilding!
b
Understand that this is painful - we'd be willing to accept contributions in this area but its not a major problem that is widespread, since only few folks doing the customization 😕
c
Alright. I'm afraid I'm not able to make such contributions (yet), but it would just be awesome to be able to mount theme-configs or use ConfigMaps for it.