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

Fit width of sensor according to width of text #2200

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

bfmvsa
Copy link
Contributor

@bfmvsa bfmvsa commented Sep 23, 2024

This PR truncates text in the sensors block.

Before:
screenshot 2024-09-22 at 11 11 06

After:
screenshot 2024-09-22 at 11 17 38

@MrD-RC
Copy link
Collaborator

MrD-RC commented Sep 23, 2024

I don't think this is the best way to get around that problem. I think that there should be alternative language css files which can change the size of elements. IMHO the sensor boxes should be made a little wider. So that the text can fit. Truncating isn't readable.

@bfmvsa
Copy link
Contributor Author

bfmvsa commented Sep 23, 2024

@MrD-RC No problem, please check this version of the last commit:
screenshot 2024-09-23 at 10 13 46
screenshot 2024-09-23 at 10 13 55

@bfmvsa bfmvsa changed the title Truncate text in sensors block Fit width of sensor according to width of text Sep 23, 2024
@MrD-RC
Copy link
Collaborator

MrD-RC commented Sep 23, 2024

Looks good to me 👍🏻

@MrD-RC MrD-RC added this to the 8.0 milestone Sep 23, 2024
@MrD-RC MrD-RC merged commit 5492ab3 into iNavFlight:master Sep 23, 2024
5 checks passed
@bfmvsa bfmvsa deleted the truncate-text-in-sensors-block branch September 23, 2024 10:30
@sensei-hacker
Copy link
Collaborator

@MrD-RC No problem, please check this

This is the way, thank you!
The browser already knows how much space the text needs. The right thing is for the CSS to NOT force a size. "Don't prevent the browser from laying out the boxes so things fit".

This is so much smarter than piling on more CSS trying to manually do what the browser was made to do, and will do by default if you let it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants