How to change the default theme

Hey There
I was trying to modify the default theme for all users
I tried to edit constants.jsx then recompile again with make build and make package
and nothing changed
I like to change something like the left side bar color for all users
can anyone point me to which part I should change?
thnx

1 Like

Hi @ashraffouda! Thank you for this question!

Would there be anything in these 2 docs that would help with what you are looking for:
https://docs.mattermost.com/deployment/customize-mattermost.html?highlight=customize
https://docs.mattermost.com/help/settings/theme-colors.html?highlight=theme

Please let me know if this helps!

Hey @amy.blais thanks for replying.
I found out that I should change the webclient from mattermost-redux repo not from mattermost-webapp repo.
so I changed https://github.com/mattermost/mattermost-redux/blob/master/src/constants/preferences.js
instead of https://github.com/gigforks/mattermost-webapp/blob/master/utils/constants.jsx
btw, it is very confusing this should be either document or removed from webapp if it is not used

1 Like

Hi @ashraffouda,

Apologies for the confusion and thank you for the feedback!

I will check with our engineers whether the repo you referenced can be removed.

Hi @ashraffouda,

The code is a bit confusing right now since some work has been done to move that over to the redux repo so that it is accessible from the mobile apps, but that work hasn’t been finished yet. For now, you’ll want to change the themes in both places to make sure they apply correctly.

It’s not possible to do once already installed? Didn’t find preferences.js nor constants.jsx in /opt/mattermost folder

No, you’d have to compile the web app yourself to change those. In the installed version, those values are somewhere in the JavaScript bundle. If you were to compile the web app though, adding that to an installed version is as simple as replacing the existing files though.

Can I just change the Desktop app theme to e.g light ? It seems to have picked some dark blue theme which looks a little irritating (like a gaming chat app), i could not find an option for other themes to be chosen by a user.