scenebuilder icon indicating copy to clipboard operation
scenebuilder copied to clipboard

Update dialog should be extracted into a non-intrusive notification

Open AlmasB opened this issue 3 years ago • 4 comments

Expected Behavior

  • [ ] Update notification is shown elsewhere in the SB workflow
  • [ ] It also seems the "Check for Updates..." menu item crashes

Current Behavior

Update dialog is shown if necessary at the end of welcome dialog workflow

Context

AlmasB avatar Jan 23 '22 20:01 AlmasB

For the "It also seems the Check for Updates... menu item crashes", are you referring to every now and again it just doesn't seem to do anything?

paul-court avatar Feb 20 '22 11:02 paul-court

I found that the if/else code branch when version was up-to-date was not wrapping the call to display the alert in Platform.runLater() - So I've pushed a quick fix for that here

Do you want to take that as a separate fix?

Otherwise, given this is an enhancement, I am also seeing a lot of duplicated code that can probably be re-factored and I'm also not sure why all this logic needs to be in SceneBuilderApp anyway. Am I missing some design pattern or something (I'm very new to desktop programming in general and still finding my feet with Java and JavaFX).

I was thinking all the update logic could be rolled into an overhauled "About" dialog which I have some ideas about and was going to start a discussion topic on.

Am I going too deep with this?

paul-court avatar Feb 20 '22 12:02 paul-court

For this issue, fixing the above two check boxes is sufficient. Visually, I'd probably go for a red dot / circle near "Update" in the menu bar to indicate that an update is available.

About and update dialogs should probably stay separate.

As for refactoring, I'm in the middle of #473 so don't worry too much about the architecture of existing code -- it will be updated.

AlmasB avatar Feb 20 '22 12:02 AlmasB

OK. I see what I can do to add a visual indicator.

paul-court avatar Feb 20 '22 12:02 paul-court