-
Notifications
You must be signed in to change notification settings - Fork 31
[APP-9815] Part 2: Viam Mobile - Displaying sensor data improvements #457
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
base: main
Are you sure you want to change the base?
Conversation
| testWidgets('displays data', (tester) async { | ||
| final widget = TestableWidget(child: ViamRefreshableDataTable(getData: FakeSensor('sensor').readings)); | ||
| await tester.pumpWidget(widget); | ||
| await tester.pumpAndSettle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to wait for async getReadings to complete so we added this
| columns: const <DataColumn>[DataColumn(label: Text('Reading')), DataColumn(label: Text('Value'))], | ||
| rows: readings.keys.map((e) => DataRow(cells: [DataCell(Text(e)), DataCell(Text(readings[e].toString()))])).toList()), | ||
| if (readings.isEmpty) | ||
| const Text('No sensor readings available') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
| child: Align( | ||
| alignment: Alignment.centerLeft, | ||
| child: SingleChildScrollView( | ||
| child: Text(readings[e].toString()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] consider adding some padding around this so it's not so close to the divider
This PR is part 2 for this ticket: https://viam.atlassian.net/browse/APP-9815 . Part 1 can be found here: https://github.com/viamrobotics/viam-mobile/pull/360. This PR does two things:
- It makes the data cell scrollable if the text is overflowing, here is a video below:
ScreenRecording_11-25-2025.11-09-39_1.MP4
- It adds in clear text indicating when there are no sensor readings available. Previously we just displayed nothing and I believe a message indicating that there are no readings is more helpful. Here is a photo: