Skip to content
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

Update GUI to look like our final product #150

Merged
merged 6 commits into from
Oct 29, 2023

Conversation

wujy28
Copy link

@wujy28 wujy28 commented Oct 29, 2023

Update GUI to look like our final product

Made changes to the GUI so that it looks more like our initial mockup. Also fixed the bug whereby the GUI does not update when record is edited.

Key changes

Update GUI of the app

  1. Reformatted some components so that the interface looks cleaner and less cluttered
  2. Styled the interface with the correct fonts and colors used in the mockup

Fix GUI bug

  1. Fixed the bug whereby Record Card does not update when the record or patient details are edited

Note: after editing patient details, due to how Patient is implemented (a new Patient object is created and it replaces the old one), the card gets deselected after the command and so it is no longer displayed in the Record Panel on the right. I wasn't quite sure how to fix this, but if you guys want I can try to make it such that after commands like add, edit, assign, view etc, the card corresponding to the patient gets displayed immediately if it was not already displayed. That way, the user can easily view the patient of interest without additional steps.

Currently, when you edit a patient's details, the GUI
does not update with the new details unless you reselect
the patient in the list.

We must fix this bug so that the user can view the new
details easily.

Let's edit the RecordPanel class to handle the event
when the patient's details changes properly.
The record fields in the GUI currently do not update
when the user edits the record using the record
command. There is also the remark field in the GUI
even though we do not intend for the user to edit it.

We should fix the bug and remove the remark so that the
program works like intended.

Let's
* Wrap the Record fields in SimpleStringProperty so that
changes to them can be observed by listeners in the GUI.
* Change the container type of record fields in the GUI
from TextFlow to TextArea.
* Add the GUI components as listeners to the events of the
Record Card fields.
* Remove the remark box from the GUI."
The changes needed for the GUI to update when record
is edited previously involved the refactoring of
String attributes in Record into SimpleStringProperty.

However, such changes in Record were not required for
the bug fix we need for the GUI.

Let's simplify the changes so that we can avoid
modifying what we have previously done as much
as possible.
Currently, the GUI still looks different from the
intended UI.

We should update it to match.

Let's modify the CSS and layout of the UI components
so that they resemble the initial design.
When running the application, there are many warnings about
the wrong JavaFX version that show up in the console.

We should remove these warnings so that the application can
run as smoothly as possible.

Let's fix these warnings and also make some final changes
to the GUI of the application.
@wujy28 wujy28 added type.Enhancement An enhancement to an existing story priority.Medium Nice to have labels Oct 29, 2023
@wujy28 wujy28 added this to the v1.3b milestone Oct 29, 2023
@wujy28 wujy28 self-assigned this Oct 29, 2023
@wujy28 wujy28 removed the request for review from longnguyentan October 29, 2023 07:21
Copy link

@thienmy0 thienmy0 left a comment

Choose a reason for hiding this comment

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

LGTM! Good job on enhancing our GUI and fixing the GUI bug as well! 👍

Copy link

@AaronJT1 AaronJT1 left a comment

Choose a reason for hiding this comment

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

Impressive Ui changes!

@AaronJT1 AaronJT1 merged commit a725167 into AY2324S1-CS2103T-T14-2:master Oct 29, 2023
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.Medium Nice to have type.Enhancement An enhancement to an existing story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants