Skip to content

Conversation

@rubenp02
Copy link
Contributor

@rubenp02 rubenp02 commented Dec 5, 2025

Use number dashes for invalid value placeholders

Description

Replaced hyphens with number/en dashes in Fact::invalidValueString, as well as in all invalid-value placeholder strings. Also changed instances of 2 hyphens into a single en dash. En dashes are visually wider and more uniform with numeric characters, improving readability and preventing confusion with minus signs.

Checklist:

Related Issue

#13698

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Replaced hyphens with number/en dashes in Fact::invalidValueString, as
well as in all invalid-value placeholder strings. Also changed instances
of 2 hyphens into a single en dash. En dashes are visually wider and
more uniform with numeric characters, improving readability and
preventing confusion with minus signs.
Copilot AI review requested due to automatic review settings December 5, 2025 12:39
Copilot finished reviewing on behalf of rubenp02 December 5, 2025 12:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves UI readability by replacing hyphens with en dashes (–) in all invalid value placeholder strings throughout the codebase. En dashes are visually wider and more uniform with numeric characters, making them more distinguishable from minus signs and improving overall readability when displaying unavailable or invalid data.

Key Changes:

  • Updated the core Fact::invalidValueString() method to use en dashes for all value types
  • Replaced hardcoded invalid value strings in both C++ and QML files with en dash equivalents
  • Changed time format placeholders from --:--:-- to ––:––:–– and decimal placeholders from --.-- to –.––

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/FactSystem/Fact.cc Updated core invalidValueString() method to return en dashes for all fact types (float, double, elapsed time, default)
src/Vehicle/FactGroups/VehicleFactGroup.cc Changed Hobbs meter initialization placeholder from ----:--:-- to ––––:––:––
src/Vehicle/FactGroups/BatteryFactGroupListModel.cc Updated battery time remaining placeholder from --:--:-- to ––:––:––
src/UI/toolbar/EscIndicatorPage.qml Changed ESC indicator N/A value from -- to
src/QmlControls/InstrumentValueValue.qml Updated instrument value fallback from -- to
src/QmlControls/GPSIndicatorPage.qml Changed GPS value placeholder from --.-- to –.––
src/FlightDisplay/ProximityRadarValues.qml Updated proximity radar no-value string from --.-- to –.––

@rubenp02
Copy link
Contributor Author

rubenp02 commented Dec 5, 2025

By the way, I've also tried using em dashes for the non-numeric types as well as the integer part of numeric types (basically the places where we are currently using 2 hyphens), and it doesn't look too bad at all:

imagen

@DonLakeFlyer
Copy link
Contributor

I don't think this looks better. I like the existing look better.

@rubenp02
Copy link
Contributor Author

rubenp02 commented Dec 7, 2025

I don't think this looks better. I like the existing look better.

That's fair. You mean the em dashes, or using number dashes in general? That last screenshot is with the further change to em dashes, this PR just does the switch to number dashes. You can see how this one looks in the screenshot in issue #13698.

@DonLakeFlyer
Copy link
Contributor

You mean the em dashes

Correct

QString(decimalPlaces, QChar(u''));
case FactMetaData::valueTypeElapsedTimeInSeconds:
return QStringLiteral("--:--:--");
return QStringLiteral("––:––:––");
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to be clear, using this as an example. Since I think I said it wrong. I like the original version better where the indicator is made up of dashes or negative signs which show up as individual digits and don't blend together as a single bloc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think they just blend together because of the font, they look separate both in QtCreator and in QGC. They're just like hyphens, but wider (average digit width). Check the screenshot in #13698 to see how they look. To me it's much better than master, makes the fields jump less in size when they finally become valid. Also removes the inconsistency of using 2 dashes since these don't really look like a minus sign.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think they just blend together because of the font,

Yeah, seem right. I just built it and it looks like this:
Screenshot 2025-12-08 at 8 16 05 AM
which seems fine to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait how come the vertical speed and ground speed are 0? Should be invalid and using the placeholder string.

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.

2 participants