Skip to content
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

Introduce dark mode and primary color picker #6430

Merged
merged 29 commits into from Aug 3, 2020
Merged

Introduce dark mode and primary color picker #6430

merged 29 commits into from Aug 3, 2020

Conversation

bramkragten
Copy link
Member

@bramkragten bramkragten commented Jul 18, 2020

Proposed change

theme-settings

home-assistant/core#37967

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@bramkragten bramkragten marked this pull request as ready for review July 22, 2020 11:30
@bramkragten bramkragten requested a review from balloob July 22, 2020 11:30
@zsarnett
Copy link
Contributor

zsarnett commented Jul 22, 2020

Playing around with this. I don't know how often it would be used but something I just tried to find was a reset button. To reset the Primary and Accent colors to default. Not this PR stuff just thinking out loud

@bramkragten
Copy link
Member Author

Playing around with this. I don't know how often it would be used but something I just tried to find was a reset button. To reset the Primary and Accent colors to default. Not this PR stuff just thinking out loud

Just clear your local storage, or log out, or use incognito mode, or I'll add a button for that.

></paper-input>
<paper-input
.value=${this.hass!.selectedTheme?.accentColor || "#ff9800"}
type="color"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

dark = true;
break;
}
fireEvent(this, "settheme", { dark });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So one thing that we're going to get feedback on is that people will want to share their theme with other users. I guess we can facilitate that in a future PR (probably needs support in frontend integration)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is just 2 colors?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but the other people in my house won't take the time to configure a theme, but maybe my Lovelace setup requires that. I guess we can do that in backend selected still 🤷

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you mean users in your HA, I was thinking users as the community. I understand it now :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could add these vars to the set theme service call, and add a button in the frontend to set the current settings as default.

We should make sure these settings are stored on the backend btw, as it now doesn't survive a restart?

@zsarnett
Copy link
Contributor

No color library that is small? Bram: "Screw it. I'll make my own library, with blackjack and hookers" 😄 (Futurama Reference for anyone who doesn't know)

@bramkragten
Copy link
Member Author

No color library that is small? Bram: "Screw it. I'll make my own library, with blackjack and hookers" 😄 (Futurama Reference for anyone who doesn't know)

It is more mix and match ;-)

Copy link
Contributor

@mrand mrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bramkragten curious - is this depreciating using hsl in themes? Just need to know if I need to start working on updating my theme :-) thanks for bringing dark mode up to major league status!

@bramkragten
Copy link
Member Author

@bramkragten curious - is this depreciating using hsl in themes? Just need to know if I need to start working on updating my theme :-) thanks for bringing dark mode up to major league status!

No, nothing will change for existing themes.

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove debug console log

@balloob balloob merged commit 4ca13c4 into dev Aug 3, 2020
@balloob balloob deleted the dark-color-theme branch August 3, 2020 00:07
@bramkragten bramkragten mentioned this pull request Aug 3, 2020
@SeanPM5 SeanPM5 mentioned this pull request Aug 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants