-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/dark-app-logo #4786
Feature/dark-app-logo #4786
Conversation
import { getColorSchemePref } from "./get-color-scheme-pref"; | ||
|
||
function getCurrentTheme() { | ||
if (!Array.isArray(themes)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about us missing a check for invalid themes json uploaded to APP_CONFIGS and also about the possibility of missing a default
theme. I don't think you need to address these concerns in this PR but wanted to put it on your radar.
import { themes } from "../react-components/styles/theme"; | ||
import { getColorSchemePref } from "./get-color-scheme-pref"; | ||
|
||
function getCurrentTheme() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a good idea to reuse this function in theme.js (and possibly also move it to that file)?
@@ -0,0 +1,7 @@ | |||
import { themes } from "../react-components/styles/theme"; | |||
|
|||
export function getColorSchemePref() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is the only use of this function, I would suggest we move it inline to the call site.
Gives hubs cloud users the option of uploading an app-logo image for use in their own dark mode. The theme MUST have a
"darkModeDefault": true
in the top level of the object for this to function properly. This value effectively sets that theme to the default dark theme. We use this theme if the user has not specified a theme and prefers a dark color scheme.