Theme change from the connect app

Hello,

I try to change the Jira’s global theme (dark/light) from my connect application when users presses the button. I use setGlobalTheme but it only changes inside my app and not outside of iframe in Jira itself.Anyone knows what can be a problem here? I have this code in my app.js file.

 const theme = useThemeObserver();
  const nextTheme = theme.colorMode === "dark" ? "light" : "dark";

  const onClick = () =>
    setGlobalTheme({
      colorMode: nextTheme
    });

You can’t change Jira’s theme from inside your app.

1 Like

Hi @NinoKezherashvili, I can confirm that @marc is correct, it is not possible to change Jira’s theme from inside your app.

If you wish to share your use-case, it would be interesting to know more and to see if there case to raise a feature request.

1 Like