Hi all!
I’m trying to make my forge app use the new design tokens. But I can’t seem to get it working.
My dev user profile is set to dark mode (and the theme is applied to jira) but when I read the theme via themeObserver or just get the values of the token with getTokenValue it seems to be returning light mode.
So my app ends up having a white background when jira is set to dark mode and everything else’s is styled in dark mode.
**token value #FFFFFF
**theme: {dark: ‘legacy-dark’, light: ‘light’, colorMode: ‘light’}
I was expecting to receive dark mode since It was set to auto and the user profile is set to dark mode. Am I missing something here? What else should be doing to get the actual theme?
Is there currently an issue with Jira Forge App Dark theme?
I cannot get it to work and in the console these errors show up:
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
_hostname_foo.atlassian.net/:1 Refused to load the stylesheet 'https://forge.cdn.prod.atlassian-dev.net/atlaskit-tokens_dark.css' because it violates the following Content Security Policy directive: "style-src 'unsafe-inline' 'self'". Note that 'style-src-elem' was not explicitly set, so 'style-src' is used as a fallback.
Hi fabien,
Thanks. I thought about something like this too. But I have that exact permission in place from the start. My app is listed in the marketplace for one year now with this permission in place.
I opened ECOHELP-42632 and hope to get this resolved.
Do you have a jira forge custom ui app with a globalPage module that works with dark mode?
Don’t know exactly what line in the manifest is making theming working.
Please also note that if you are running on macOS and using Safari, then tunneling does not work. Safari considers page content from tunnel unsecure and blocks the content.
I advise to debug with tunnel using Google Chrome.
Hi,
If I want to change my Custom UI component to dark modee when jira users change the
theme from light to dark, then can we listen to the theme change event and then change
the theme mode of my Forge App to dark mode?
Thanks,
YY1
Hi @anguila
May I know if there’s anything else that needs to be done with thw 2 lines of code?
My Forge App has supported dark mode. After theme switch from light to dark, the app is not automatically updated and I have to refresh the whole page to get the dark app working.
I’m still struggling with this issue. Please help me take a look.
Thanks,
YY1