Skip to content

Conversation

@jdsmithsos
Copy link
Contributor

Jira ticket: https://ikmdev.atlassian.net/browse/IIA-1896

Summary of changes:

  • Refactored the Confirm Clear dialog to be a generic Confirmation dialog that contains a title, message, Cancel and Confirm buttons
  • Created a SimpleViewModel for the title and message properties

Recommend expanding on this an adding a refactor story to create a common, global, dialog class that is responsible for creating the standard Komet application dialog which uses the GlassPane.

Before change:

No Confirm Reset dialog.

After change:

Confirm Reset dialog is displayed.

image

Copy link
Contributor

@bhharsh13 bhharsh13 left a comment

Choose a reason for hiding this comment

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

small text fix. Rest looks good to me

doTheClearOrResetForm();
ConfirmationDialogController.showConfirmationDialog(this.cancelButton,
"Confirm Reset Form",
"You're changes will be lost if you reset the form. Are you sure you want to continue?")
Copy link
Contributor

Choose a reason for hiding this comment

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

requires correction in the message displayed - Your

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

requires correction in the message displayed - Your

done

@jdsmithsos jdsmithsos requested a review from bhharsh13 June 18, 2025 18:45
Copy link
Contributor

@bhharsh13 bhharsh13 left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link
Contributor

@dholubek dholubek left a comment

Choose a reason for hiding this comment

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

had one minor request, but looks fine to me.

/**
* Creates the dialog, providing the CompletableFuture that provides the modal behavior of the dialog.
* @param parentNode The node to start at to determine the topmost Pane, which is required for the GlassPane
* @return CompletableFuture with a Boolean type, Boolean value of true is returned when the confirm button is pressed
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add the other two method arguments to the javadoc also?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can we add the other two method arguments to the javadoc also?

done

Copy link
Contributor

@swaroopsalvi swaroopsalvi left a comment

Choose a reason for hiding this comment

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

Have minor comments.


final JFXNode<Pane, ConfirmClearDialogController> githubInfoNode = FXMLMvvmLoader
.make(ConfirmClearDialogController.class.getResource("confirm-clear-dialog.fxml"));
final JFXNode<Pane, ConfirmationDialogController> githubInfoNode = FXMLMvvmLoader
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this named as githubInfoNode ? shouldn't it be javaFxNode instead ? Can we change this variable name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was from copy and paste. Renamed to confDialogNode.

} else {
doTheClearOrResetForm();
ConfirmationDialogController.showConfirmationDialog(this.cancelButton,
"Confirm Reset Form",
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency in code, can we declare the text as final like we did for CLEAR ? or make both local to the if -else conditions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chose not to use static final here because this text is only used in one place for reset.
The clear text for title and message are used in two places in the code, so static final is necessary to use the same text in both places.

@jdsmithsos jdsmithsos requested review from bhharsh13 and dholubek June 19, 2025 15:27
@jdsmithsos jdsmithsos requested a review from swaroopsalvi June 19, 2025 15:31
Copy link
Contributor

@dholubek dholubek left a comment

Choose a reason for hiding this comment

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

looks good

@dholubek dholubek merged commit 4d452cb into ikmdev:main Jun 19, 2025
2 checks passed
@jdsmithsos jdsmithsos deleted the feature/finished/IIA-1896-added-confirm-reset-dialog branch June 23, 2025 19:21
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.

4 participants