-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Implement global dark theme #28445
Implement global dark theme #28445
Conversation
Pinging @elastic/kibana-platform |
Pinging @elastic/kibana-design |
This comment has been minimized.
This comment has been minimized.
@spalger Your memory is pretty good. There's two things that will need to happen as well:
These can be handled in styles.js likely based on the logic you have there. Obviously we still need to deliver those two files, but @cchaos and I are working on that bit next week. Caroline, if you have time, can you just do a brief check of this PR and chat with spencer to make sure we have what we need. Looking at this briefly it looks like we have what we need. |
I checked out the branch using this method:
And the switch to dark mode works, but I can't seem to get passed the Dashboard index page. Neither clicking on a sample data board nor the "Create" button does anything and it doesn't spit out an error either. Also, is it possible to auto-refresh the browser for the user when they turn dark mode on? As for the bootstrap dark theme, I just got the approval on my Final LESS conversion PR, so once I get that into master, I'll build out the bootstrap dark file. |
Since I was able to get my final LESS conversion PR into master, I threw up a WIP PR to address Bootstrap theming. #28528 Right now it compiles both However, maybe you can me figure out how to only import one or the other (or I can wait until this PR is done). |
@cchaos I decided to try pulling in your PR and adapting it to only load one style or the other. Got this working, and integrated with the other style loading. I also got the styles out of the JS and into their own CSS file which is a win win.
I believe the removal of the dashboard dark mode setting is probably causing something to fail, but I haven't tracked it down yet. Will give it a shot tomorrow.
We could, but my personal opinion is that auto-refreshing the page is mildly dangerous. I'd prefer if the user was somehow warned or allowed to opt-out of auto-refreshing the page, but those don't seem worth implementing right now either. I'd much rather be able to transition between styles without reloading the page, which should be do-able after we get this in, and even easier once we have all the styles running through the same pipeline (no more less). Thoughts? |
This comment has been minimized.
This comment has been minimized.
Awesome, I will close my PR then.
Yeah I hear that, since there's all those other settings too. I think it might just be making it more clear by way of text styling for people, like me, who didn't read the description text and therefore didn't read the need to manually refresh. (-_-) |
@spalger im just getting back to work from the offsite. My goal is to get you a KUI PR against this branch by early next week. This is pretty exciting. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
90e8e53
to
c556305
Compare
This comment has been minimized.
This comment has been minimized.
0a5419e
to
0b7f1f6
Compare
This comment has been minimized.
This comment has been minimized.
b6ef01e
to
4547ad3
Compare
💚 Build Succeeded |
💔 Build Failed |
While I'm reviewing ths... a quick one. I noticed that the login page starts as dark, even if Kibana is defaulted to light? Guessing maybe this is tied to Kibana needing the read the adv. setting from auth? If so, and it can't figure out the state, we should probably default to light for login if it can't flip. |
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.
See comment above about the login screen, which needs to be fixed before this is merged.
THIS IS AWESOME.
I did a visual scan of the dark mode and did a scan of the code to make sure I understood how everything worked. Outside of the auth mentioned above, everything works as far as this PR is concerned. There is obviously a lot of work for @cchaos and I to do with the actual dark mode, but those will all be tangental PRs that can be handled after.
Last comment is that baring an auto refresh when you switch modes, we might want to consider popping a toast to say "Theme applied, please refresh your browser to take affect" if possible. I don't consider that critical and is more of a nice to have if it's easy.
Lastly, we'll want to fix #22089 eventually which has been hanging around for too long. Right now we can't flip assets based on mode, and while we don't have many of them, operationally that's the one blocker we have from a design perspective making dark mode awesome.
Done |
Oops, had the default set to false when auth was enabled. Fixed |
This comment has been minimized.
This comment has been minimized.
💚 Build Succeeded |
💚 Build Succeeded |
Yay!
…On Thu, Jan 24, 2019, 5:26 PM Spencer ***@***.*** wrote:
Merged #28445 <#28445> into master.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28445 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AATzp-Pkp7wcNT40VtxdO-rQttt4BzCrks5vGl1UgaJpZM4Z4wQX>
.
|
@spalger is there a way to default to dark? via a kibana.yml feild etc? |
@blacktop currently the only option is to override the uiSetting via kibana.yml, but this will prevent updating the setting via the UI. uiSettings.overrides.theme:darkMode: true |
Fixes #6786
This PR updates the sass build process to automatically create two stylesheets for each of the
uiExport.styleSheetPaths
that point to a.scss
file, one with the.light.css
and one with the.dark.css
extension. These stylesheets are loaded based on thetheme:darkMode
uiSetting. This setting is also exposed to theui_app.pug
template so that the loading screen can include accommodations for dark mode.The dark mode settings from dashboard and the GIS app were removed, as they will now be replaced with the global dark mode setting.
I'm pushing this PR up so that design can take a look and make sure that we're loading the right styles to properly enable dark mode.
Currently we're intercepting imports for
@elastic/eui/src/themes/k6/k6_colors_light
and replacing them with imports for@elastic/eui/src/themes/k6/k6_colors_dark
, which I think is what I discussed with @snide before the holidays but my memory is foggy.