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

Show user friendly attribute names in picker #7337

Merged
merged 8 commits into from
Nov 10, 2020

Conversation

spacegaier
Copy link
Member

@spacegaier spacegaier commented Oct 13, 2020

Breaking change

Proposed change

Follow-up to #7313.

  1. Fix regex for "id" to "ID" replacement by using word boundaries (to not convert "humidity" to "humIDity") => already covered by Fix capitalization of state attributes #7448
  2. Use the same conversion logic to show user friendly attribute names in the picker. The actual returned value to the card / editor / dialog is still the original real snake_case attribute name. Only the visual display part is changed. Works both in the newly changed weather card editor (Use attribute picker for sec. info in weather card editor #7335) as well as in the existing use cases such as the automation editor.
  3. Fixes the attribute display, that previously broke attribute names into multiple lines due to missing flex-grow (see "Warning 1").
  4. Allowed the attribute values to use up to half the popup size for the non-narrow display.
  5. Prevent capitalization in more-info-sun (Previously showed "Setting In x hours", now "Setting in x hours").

image

image

Before:
image

After:
image

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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:

@spacegaier spacegaier marked this pull request as ready for review November 10, 2020 11:10
@bramkragten bramkragten merged commit 7f56add into home-assistant:dev Nov 10, 2020
@spacegaier spacegaier deleted the attr-name-formatting branch November 10, 2020 14:40
@bramkragten bramkragten mentioned this pull request Nov 11, 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.

4 participants