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

Widen history panel entity picker #14938

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/ha-target-picker.ts
Expand Up @@ -367,6 +367,7 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
case "entity_id":
return html`
<ha-entity-picker
class=${this.horizontal ? "horizontal-entity-picker" : ""}
.hass=${this.hass}
id="input"
.type=${"entity_id"}
Expand Down Expand Up @@ -657,6 +658,10 @@ export class HaTargetPicker extends SubscribeMixin(LitElement) {
opacity: var(--light-disabled-opacity);
pointer-events: none;
}
.horizontal-entity-picker {
flex-basis: 400px;
max-width: 400px;
}
`;
}
}
Expand Down
16 changes: 5 additions & 11 deletions src/panels/history/ha-panel-history.ts
Expand Up @@ -130,7 +130,7 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
</app-header>

<div class="flex content">
<div class="filters flex layout horizontal narrow-wrap">
<div class="filters flex layout horizontal wrap">
<ha-date-range-picker
.hass=${this.hass}
?disabled=${this._isLoading}
Expand Down Expand Up @@ -445,7 +445,7 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
height: 100%;
}

:host([narrow]) .narrow-wrap {
:host .wrap {
flex-wrap: wrap;
}

Expand Down Expand Up @@ -493,15 +493,9 @@ class HaPanelHistory extends SubscribeMixin(LitElement) {
transform: translate(-50%, -50%);
}

ha-entity-picker {
display: inline-block;
flex-grow: 1;
max-width: 400px;
}

:host([narrow]) ha-entity-picker {
max-width: none;
width: 100%;
ha-target-picker {
flex: 1;
flex-basis: 400px;
}

.start-search {
Expand Down