Skip to content

Use attribute picker for sec. info in weather card editor#7335

Merged
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:sec-attr-weather-card
Oct 14, 2020
Merged

Use attribute picker for sec. info in weather card editor#7335
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:sec-attr-weather-card

Conversation

@spacegaier
Copy link
Member

@spacegaier spacegaier commented Oct 13, 2020

Breaking change

Proposed change

Use attribute picker in the weather card editor.

There are a few somewhat related challenges:

image

  1. Due to the flex shrinking, the "suffix" slot of the used <paper-input> gets too narrow and stacks the clear and menu icons. I wasn't able to get that sorted out via CSS so far with the mixins (--paper-input-suffix). I only could verify via the browser dev tools, that with flex-shrink: 0 applied to the "suffix" <span> the issue disappears.

  2. The <ha-switch> is too far to the left as you can see by the shown helper lines. I am unsure whether just moving that instance a bit to the right is the correct approach. I haven't found other places with the same issue, but then again all other usages of <ha-switch> that I found use the some code.

@bramkragten Can you provide some guidance / ideas here?

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

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:

.value=${this._value}
.allowCustomValue=${this.allowCustomValue}
.renderer=${rowRenderer}
attr-for-value="bind-value"
Copy link
Member Author

Choose a reason for hiding this comment

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

Without that line, the value was not shown in the input until you clicked into the field. All existing usages of <ha-entity-attribute-picker> in the code base set the attribute allow-custom-value. With that set, it works fine, but without this additional option was required.

@bramkragten
Copy link
Member

bramkragten commented Oct 14, 2020

The 2 issues in your description are not specific for this PR right? They are general issues? Could you create an issue for them?

@bramkragten
Copy link
Member

Check #7343 for fixing the first.

The second could be fixed with some padding, but please check the material guidelines first.

@spacegaier
Copy link
Member Author

The 2 issues in your description are not specific for this PR right? They are general issues? Could you create an issue for them?

Yes, generic. Is the rest of this PR good from your point of view?

For the other topics I will have a look if I can fix them based on the PR and hint you mentioned. If not, I will create the separate issues.

@bramkragten bramkragten merged commit 4a7fb3d into home-assistant:dev Oct 14, 2020
@spacegaier spacegaier deleted the sec-attr-weather-card branch October 15, 2020 07:51
@spacegaier spacegaier mentioned this pull request Oct 15, 2020
9 tasks
@bramkragten bramkragten mentioned this pull request Oct 21, 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.

Dropdown for attribute on Weather Forecast card editor

3 participants