-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add label to location selector #17402
Conversation
@@ -26,6 +26,7 @@ export class HaLocationSelector extends LitElement { | |||
|
|||
protected render() { | |||
return html` | |||
${this.label ? this.label : ""} |
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.
I think it was omitted on purpose, as this is kinda assumed at this point?
@matthiasdebaat WDYT?
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.
I agree. Why do you want to add this @joostlek?
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.
I found it strange that we do define this label in core, but it isn't shown. For example at Tankerkoenig, you just get a map without any context
(of course this would be solved with a description or something).
And maybe for integrations that require 2 locations (google travel time might be an example) it would be useful to add some context.
But personally I just noticed that this wasn't consistent so I am also fine if we just keep it as is.
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.
I think it makes sense to add this, the user of the form should make the decision if the label is needed or not, for example if there are multiple locations to be picked
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.
Fair point. It's strange that the name doesn't show up when you set one. Though in the example of Tankerkoenig, the name is required and not a decision of the user.
I am going to close and re-open since that should restart the stuck CI checks |
Styling wise I am wondering if we shouldn't follow the style of "Fuel types" since the map is basically just a form input and not a separate section like logbook or history? Space between label and map looks good to me. |
I was thinking the same, but I am definitely not an UIUX expert |
I agree. Had a bad assumption that it was the same font as |
27f177f
to
323108c
Compare
Co-authored-by: Bram Kragten <[email protected]>
Proposed change
Before this change, the label of a location selector wasn't used even tho an integration might have given a label to support the type of data going in.
Before:
After:
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: