-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix visual differences between regular and energy dashboards #20654
Conversation
5bcda93
to
8fef80d
Compare
@bramkragten would it be possible to get this into 2024.5? |
@Nezz Can we also use the same structure as regular dashboard for energy dashboard? <hui-view
id="view"
.hass=${this.hass}
.narrow=${this.narrow}
.lovelace=${this._lovelace}
.index=${this._viewIndex}
@reload-energy-panel=${this._reloadView}
></hui-view> becomes <div id="view" @reload-energy-panel=${this._reloadView}>
<hui-view
.hass=${this.hass}
.narrow=${this.narrow}
.lovelace=${this._lovelace}
.index=${this._viewIndex}
></hui-view>
</div> |
Sure, I'll update this branch to see how that looks |
The CSS change is still needed to ensure that the image is on the same element as the padding, but otherwise it should be good to go. |
} | ||
hui-view { |
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.
This should be reverted I think.
The issue is that the background can be set with a theme variable --lovelace-background
that can set on the view or with a config variable in YAML. Putting the background option a level higher means that the view theme can not set the background of the view, because it can not target anything above itself.
You can set the background on both #view
and hui-view
, but that will not give the best experience either when using something different than a solid color.
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.
Or, a bit ugly... #20683
Proposed change
Fix visual differences between regular and energy dashboards. This is an improvement for the blurring introduced in #20473 which will go live in 2024.5.
The energy dashboard is structured like this:
Wheres lovelace is:
This results in the background getting applied differently on the two kinds of dashboards.
In the unscrolled state lovelace looked like this:
With this fix, the background will extend on lovelace behind the header, matching the energy dashboard:
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: