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

Device release page #60

Merged
merged 5 commits into from Sep 20, 2022
Merged

Device release page #60

merged 5 commits into from Sep 20, 2022

Conversation

d-loose
Copy link
Member

@d-loose d-loose commented Sep 20, 2022

Show the release dialog as a page in the new layout. Design updates will follow.

  • add DeviceBodyPage - renders the right pane in the master detail layout for each device
  • add DeviceModel - view model for DeviceBodyPage
    • provides install(), verify() for the device by calling the respective methods of the FirmwareModel
    • keeps track of the currently selected release, DeviceBodyPage will respond accordingly

@d-loose d-loose marked this pull request as ready for review September 20, 2022 12:37
State<FirmwareBodyPage> createState() => _FirmwareBodyPageState();
}

class _FirmwareBodyPageState extends State<FirmwareBodyPage> {
Copy link
Contributor

Choose a reason for hiding this comment

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

FirmwareBodyPage could be a StatelessWidget?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, yes of course.. that was kind of the point 😆

});

test('verify', () async {
final device = testDevice(id: '');
Copy link
Contributor

Choose a reason for hiding this comment

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

same here, could you set a non-empty id please :)

Copy link
Member Author

Choose a reason for hiding this comment

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

will do

});

test('install release', () async {
final device = testDevice(id: '');
Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to specify a non-empty ID so it wouldn't match any default-constructed device below

Copy link
Member Author

Choose a reason for hiding this comment

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

will do

lib/device_model.dart Show resolved Hide resolved
test/device_model_test.dart Show resolved Hide resolved
Copy link
Contributor

@jpnurmi jpnurmi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@d-loose d-loose merged commit 92c0a30 into canonical:main Sep 20, 2022
@d-loose d-loose deleted the device_release_page branch September 20, 2022 14:23
@d-loose d-loose mentioned this pull request Sep 20, 2022
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.

None yet

2 participants