[Bug] File name overflows in dashboard if too long
moebis opened this issue · comments
This is a home assistant bug so you'll need to log a bug on the home assistant github. This integration has no involvement in what's rendered in the dashboard - it just provides the data.
@AdrianGarside ...nope, this is a bug with your code. Everything else respects the truncation in Home Assistant. Its just your add on that has this issue out of dozens that I run:
![image](https://private-user-images.githubusercontent.com/3595244/307522955-04228c12-cc14-48e8-a7ab-43d60c8ae61e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzMTc1NzMsIm5iZiI6MTcxOTMxNzI3MywicGF0aCI6Ii8zNTk1MjQ0LzMwNzUyMjk1NS0wNDIyOGMxMi1jYzE0LTQ4ZTgtYTdhYi00M2Q2MGM4YWU2MWUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjVUMTIwNzUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGFlNGEzNzliMTQ0Y2Y1Mzg5Y2U5YmNiOGQ5NzFkMDhiMDMxYTJlNjM3MzhjMTk5NWIyMWQ4NDU2MzYxMzFkMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.CcOyt6UEn1JYKaTa0DT1TVBs64VrBVDDl76IujiN14s)
Those aren't the same thing. The strings being truncated there are the sensor names not the sensor content. And home assistant is the one doing that. There is literally not a single line of code in the integration that has any direct control over the home assistant UX. All it does is provide data.
It's because you're not using a property name, just a cloud icon and then the 1st element is the filename, try adding "File:" in the 1st column, and move the filename to the 2nd. If you see how you have "X1C Print..." and then the 3rd element "Smooth PEI" it's fine. I think this is the reason the text-overflow and white-space properties are being ignored from the base CSS.
![Screenshot 2024-02-24 at 2 20 52 PM](https://private-user-images.githubusercontent.com/3595244/307524527-0a4479f3-65e2-4ab7-aaab-4b8bee970cc8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzMTc1NzMsIm5iZiI6MTcxOTMxNzI3MywicGF0aCI6Ii8zNTk1MjQ0LzMwNzUyNDUyNy0wYTQ0NzlmMy02NWUyLTRhYjctYWFhYi00YjhiZWU5NzBjYzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjVUMTIwNzUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGY1NmFmMjZlN2EzMTY1NDlhZDY5MGQ4MzEyNDkyMDVlZTRhOWY1ZmNjYzNlZjYzODM0Y2NhNDdlYjU5MmZjNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.HrDMAK5WMdAG6Yb0N2A-1RHsan6pCFsqFZk6qi60OCA)
That's also why there is a blank space in front of "Optimized...." you just skipped a css block.
Again, the integration has literally zero lines of code to control the UX. There Is no CSS in the integration.
The reason you aren't seeing the sensor name in your example is because home assistant has truncated it down to non-existant. The integration has zero involvement or control over that.
Your top sensor example is HA handling something it can line wrap (has spaces in the string) differently. This integration can provide a string - it doesn't have any control over columns in the UX.