-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Generic picker: show a label for area, category, language #28236
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
base: dev
Are you sure you want to change the base?
Generic picker: show a label for area, category, language #28236
Conversation
timmo001
left a comment
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.
Small code style tweaks
Co-authored-by: Aidan Timson <[email protected]>
Co-authored-by: Aidan Timson <[email protected]>
|
This is great, thanks @ildar170975 🚀 |
|
Guys, thanks a lot for support |
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.
You will also need to resolve the conflicts in the code, sorry I caused this 🙃
|
|
||
| const valueRenderer = this._computeValueRenderer(this.hass.areas); | ||
|
|
||
| let showLabel; |
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.
| let showLabel; | |
| let showLabel = this.showLabel; |
| const area_id = this.value; | ||
| const area = this.hass.areas[area_id]; | ||
| const { floor } = getAreaContext(area, this.hass.floors); | ||
| showLabel = floor ? false : this.showLabel; | ||
| } else { | ||
| showLabel = this.showLabel; |
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.
| const area_id = this.value; | |
| const area = this.hass.areas[area_id]; | |
| const { floor } = getAreaContext(area, this.hass.floors); | |
| showLabel = floor ? false : this.showLabel; | |
| } else { | |
| showLabel = this.showLabel; | |
| const area = this.hass.areas[this.value]; | |
| if (area) { | |
| const { floor } = getAreaContext(area, this.hass.floors); | |
| showLabel = !floor && this.showLabel; | |
| } |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
No problem! I will do it in a few days when be near a PC. SORRY for a delay. |
Breaking change
Proposed change
Changes were made for:
ha-language-picker:ha-category-picker- only forha-dialog-automation-save:ha-area-picker- only for:--
ha-dialog-automation-save--
entity-registry-settings-editor--
dialog-device-registry-detailNote that for
ha-area-pickera label is only shown when a floor is not displayed (to prevent a clutter).In
ha-combo-box-item, styles were defined foroverlineslot to mimic (as possible) a floating label inmdc-select.Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: