CS2113-AY1819S1-F09-1 / main

NUSSU Connect
https://cs2113-ay1819s1-f09-1.github.io/main/
MIT License
0 stars 4 forks source link

Main App shows Not Responding if user clicks away from login screen #106

Closed nus-pe-script closed 5 years ago

nus-pe-script commented 5 years ago

Describe the bug Main NUSSU Connect App shows Not Responding

To Reproduce Steps to reproduce the behavior:

  1. Click on the jar file.
  2. When the login screen opens, click away from the login screen.
  3. The app main app will show not responding.
  4. If the user attempts to close the main app, an error message showing Java Platform SE binary not responding will appear

Expected behavior I expected the Main App to not show a Not Responding message. For example, if I open the app (but never login), but I do something else on another window or got to desktop for a moment, and if I want to come back and close the app, I have to actually close the login screen to close the app. This might not be user-friendly. Perhaps the devs could always make the login screen appear together with the app (i.e. show on top of the app) so as to make it clear to the user that he has to close the login screen to close the app.

Screenshots Window shown if user clicks away and clicks back to main app:

capture

Window shown if user attempts to press the close button on the main app instead of login screen: capture2


Reported by: @brandonccm1996 Severity: Medium

[original: nusCS2113-AY1819S1/pe-1#206]

melvintjc96 commented 5 years ago

As this issue is pertaining to the way how Java applications works with pop up dialog boxes, a rework of the login system is needed such that no more dialog boxes will appear and the user simply needs to login within the application itself. However, due to time constraints, would it be appropriate to just simply point it out in the user guide that the user would have to alt+tab until the dialog box is brought up and they cannot just exit the app by directly clicking on the cross button?

brandonccm1996 commented 5 years ago

Yup you can point it out on the user guide to avoid user confusion. However, I was previously trying something like this out and found something that might help, but I'm not sure if it's applicable to your code. When displaying the login dialog box window, you could initModality for the window to Modality.APPLICATION_MODAL.

Here's a youtube link that could help you out: https://www.youtube.com/watch?v=SpL3EToqaXA&list=PL6gx4Cwl9DGBzfXLWLSYVy8EbTdpGbUIG&index=6&t=0s

This should theoretically prevent the user from interacting with any other windows, but I've not tried it before. Your group can try it out if you guys have spare time, if not you can just tell the user in the user guide not to exit the app by directly clicking on the cross button. Hope this helps.

melvintjc96 commented 5 years ago

As it seems that this method only works for dialog boxes created with JavaFX, and my dialog boxes are created using JOptionPane, it is possible to make it such that the login dialog box always remain on top of every window on your desktop even if the application is minimized. However, this can seem intrusive for the user as the dialog box cannot be minimized and must be dealt with on the spot either by closing the dialog box or by logging in. Would it be bad for user experience if that is the case?

brandonccm1996 commented 5 years ago

Oh I originally thought that initmodality with Modality.APPLICATION_MODAL would make the login window appear only on top of your NUSSUConnect app window, and not on top of other windows as well.

If initmodality will make the login window appear on top of other windows as well, I'm not sure which would be better. I am slightly in favour of having bad UX thru making the login window appear on top of every window, as compared to having bad UX thru the unexpected Not Responding messages (which is what you have currently), but other users might think differently. Maybe you can ask your friends to try it out and ask what they think about it. Or if time is too tight, you can just write in the User Guide to tell the user not to press the main app window if login window is present.

melvintjc96 commented 5 years ago

Ok thank you for your input! Very much appreciated! We will discuss among ourselves and come to a decision soon.

melvintjc96 commented 5 years ago

Updates to Userguide made in latest PR.