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

Unnecessary Line Wrapping in Lovelace Light Card #3964

Closed
shbatm opened this issue Oct 8, 2019 · 9 comments
Closed

Unnecessary Line Wrapping in Lovelace Light Card #3964

shbatm opened this issue Oct 8, 2019 · 9 comments
Assignees
Labels
hacktoberfest UX User experience related bug

Comments

@shbatm
Copy link
Contributor

shbatm commented Oct 8, 2019

Home Assistant release with the issue:

Hass: v0.100.0b1
Frontend: 20191002.0

Last working Home Assistant release (if known):

UI (States or Lovelace UI?):

Lovelace

Browser and Operating System:

Chrome / Windows 10

Description of problem:

For longer entity friendly names, the Light entity card is wrapping the name when there is plenty of room in the card to display the whole thing. It appears that there is no 'width' setting set on the name class. Adding something like width: 90%; or width: fit-content; in Chrome DevTools corrects the issue.

Before:

image

After:

image

Javascript errors shown in the web inspector (if applicable):

N/A

Additional information:
Suggest adding width: 90%; at this line

@shbatm
Copy link
Contributor Author

shbatm commented Oct 8, 2019

Thought this might be because I am using the Light card inside a Horizontal Stack, but I confirmed the same issue occurs with a longer name on the full Light Card using the demo site:
image

@iantrich
Copy link
Member

iantrich commented Oct 8, 2019

Sounds like an easy hacktoberfest issue if you want to take a stab at it

@shbatm
Copy link
Contributor Author

shbatm commented Oct 8, 2019

Happy to submit the PR, but wanted to see what the preferred width setting would be--css is not my forte.

Is 90% good enough or should I be using some other variable/keyword?

@iantrich iantrich added card: light hacktoberfest UX User experience related bug labels Oct 8, 2019
@iantrich
Copy link
Member

iantrich commented Oct 8, 2019

I think that's fine. Others might chime in when you submit a PR (css is not my forte either 😄 )

shbatm added a commit to shbatm/home-assistant-polymer that referenced this issue Oct 9, 2019
@JeroenGoddijn
Copy link

You can also just set
max-width: 90%;
Might make it more responsive..

@shbatm
Copy link
Contributor Author

shbatm commented Oct 10, 2019

@JeroenGoddijn -- Tried this in DevTools and it had no effect.

@JeroenGoddijn
Copy link

Sorry, was just going off by what I saw in here... haven't had a chance to change my light dimmers to these cards yet..

Need to make some time to set up new clean dev environment and knock out some Hacktoberfest issues too... ;o)

@shbatm
Copy link
Contributor Author

shbatm commented Oct 10, 2019

NP. I went with @bramkragten's suggestion in the PR (#3972)... Trying to knock out as many of my backlog issues for Hacktoberfest too

@iantrich
Copy link
Member

@shbatm there's no shortage of them :)

@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hacktoberfest UX User experience related bug
Projects
None yet
Development

No branches or pull requests

3 participants