Skip to content

Conversation

@jckras
Copy link
Member

@jckras jckras commented Nov 25, 2025

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:

Screenshot 2025-11-25 at 12 56 31 PM

@jckras jckras marked this pull request as ready for review November 25, 2025 18:08
@jckras jckras requested a review from a team as a code owner November 25, 2025 18:08
testWidgets('displays data', (tester) async {
final widget = TestableWidget(child: ViamRefreshableDataTable(getData: FakeSensor('sensor').readings));
await tester.pumpWidget(widget);
await tester.pumpAndSettle();
Copy link
Member Author

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')
Copy link
Contributor

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()),
Copy link
Contributor

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

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