Skip to content

Conversation

@levkropp
Copy link
Contributor

@levkropp levkropp commented Apr 7, 2025

resolves #4028

image

This pull request introduces a new feature to the LaunchForm in the src/client/gui/lib/catalogue/launch_form.dart file, 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:

  • Added a launchAndConfigureNextButton to the form, which allows users to launch the current item and immediately configure the next one. [1] [2]

Modifications to the launch method:

  • Updated the launch method to accept an optional configureNext parameter, which controls whether the form should reset after launching.

Form reset behavior:

  • Adjusted the form reset logic to only reset the form and close the drawer if configureNext is false. [1] [2]

@levkropp levkropp force-pushed the gui-launch-and-configure-next branch from f50d526 to 4d34925 Compare April 7, 2025 13:55
@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.56%. Comparing base (f064787) to head (da46703).
⚠️ Report is 3427 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@levkropp levkropp force-pushed the gui-launch-and-configure-next branch from 4d34925 to 2b00f25 Compare April 7, 2025 14:26
@levkropp levkropp requested a review from andrei-toterman April 7, 2025 15:17
Comment on lines 327 to 332
formState.reset();
mountFormState?.reset();
setState(() {
mountRequests.clear();
addingMount = false;
});
Copy link
Contributor

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();?

@levkropp levkropp force-pushed the gui-launch-and-configure-next branch from 2b00f25 to 75b5e3b Compare April 10, 2025 15:43
Copy link
Contributor

@andrei-toterman andrei-toterman left a comment

Choose a reason for hiding this comment

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

Yup, LGTM!

Copy link
Contributor

@andrei-toterman andrei-toterman left a 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(),
);

@levkropp levkropp force-pushed the gui-launch-and-configure-next branch from 75b5e3b to 90aaf69 Compare April 10, 2025 17:18
@ricab ricab requested a review from Sploder12 April 14, 2025 14:57
Copy link
Contributor

@Sploder12 Sploder12 left a 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

@levkropp levkropp force-pushed the gui-launch-and-configure-next branch from ad2310b to fb8f325 Compare April 14, 2025 18:36
Sploder12
Sploder12 previously approved these changes Apr 14, 2025
Copy link
Contributor

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

LGTM!

@sharder996 sharder996 force-pushed the gui-launch-and-configure-next branch from fb8f325 to 7df5aaf Compare April 22, 2025 02:56
@sharder996 sharder996 enabled auto-merge April 22, 2025 02:58
@levkropp levkropp changed the title [gui] add 'Launch & Configure Next' button to launch form [gui] add 'Launch & Configure next' button to launch form Apr 24, 2025
@levkropp levkropp requested a review from Sploder12 April 24, 2025 15:27
Copy link
Contributor

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

LGTM!

@levkropp levkropp force-pushed the gui-launch-and-configure-next branch from 6765f07 to da46703 Compare May 6, 2025 16:56
@sharder996 sharder996 added this pull request to the merge queue May 6, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 7, 2025
@levkropp levkropp added this pull request to the merge queue May 7, 2025
Merged via the queue into main with commit c166538 May 8, 2025
15 checks passed
@levkropp levkropp deleted the gui-launch-and-configure-next branch May 8, 2025 01:57
@ricab ricab added this to the 1.16.0 milestone Jun 13, 2025
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.

Add "Launch and Configure next" button

4 participants