-
Notifications
You must be signed in to change notification settings - Fork 736
[gui] add 'Launch & Configure next' button to launch form #4029
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
Conversation
f50d526 to
4d34925
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4029 +/- ##
=======================================
Coverage 89.56% 89.56%
=======================================
Files 261 261
Lines 14767 14767
=======================================
Hits 13226 13226
Misses 1541 1541 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4d34925 to
2b00f25
Compare
| formState.reset(); | ||
| mountFormState?.reset(); | ||
| setState(() { | ||
| mountRequests.clear(); | ||
| addingMount = false; | ||
| }); |
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.
Do you really need to clear those? Won't they just go away with the Scaffold.of(context).closeEndDrawer();?
2b00f25 to
75b5e3b
Compare
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.
Yup, LGTM!
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.
Nope, does not LGTM! I approved a bit too early apparently 😅 I found a bug.
Sometimes I forget that Dart is not like C++ and every object is passed by reference all the time. And since we're reusing the launch request and mount list objects, reassigning their values messes with places that already use them. So we need to copy them before passing them to the launching code. You'll need to replace this
initiateLaunchFlow(ref, launchRequest, mountRequests);with this
initiateLaunchFlow(
ref,
launchRequest.deepCopy(),
mountRequests.map((r) => r.deepCopy()).toList(),
);75b5e3b to
90aaf69
Compare
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.
Code looks good but it doesn't build for me or CI
ad2310b to
fb8f325
Compare
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.
LGTM!
fb8f325 to
7df5aaf
Compare
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.
LGTM!
6765f07 to
da46703
Compare
resolves #4028
This pull request introduces a new feature to the
LaunchFormin thesrc/client/gui/lib/catalogue/launch_form.dartfile, allowing users to launch and configure the next item without closing the form. The most important changes include adding a new button, modifying the launch method to support the new functionality, and adjusting the form reset behavior.New feature for launching and configuring the next item:
launchAndConfigureNextButtonto the form, which allows users to launch the current item and immediately configure the next one. [1] [2]Modifications to the launch method:
launchmethod to accept an optionalconfigureNextparameter, which controls whether the form should reset after launching.Form reset behavior:
configureNextisfalse. [1] [2]