Skip to content

Commit

Permalink
Merge pull request #279 from mongj/mingjun/add-line-breaks
Browse files Browse the repository at this point in the history
Add line breaks in UG and DG
  • Loading branch information
AppleJem authored Nov 12, 2024
2 parents dbec80a + 2078242 commit 1cb1e72
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 51 deletions.
45 changes: 21 additions & 24 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ that is adapted from Manuel Moser's implementation [here](https://stackoverflow.

Refer to the guide [_Setting up and getting started_](SettingUp.md).

--------------------------------------------------------------------------------------------------------------------
<div style="page-break-after: always"></div>

## **Design**

Expand Down Expand Up @@ -72,6 +72,8 @@ For example, the `Logic` component defines its API in the `Logic.java` interface

The sections below give more details of each component.

<div style="page-break-after: always"></div>

### UI component

The **API** of this component is specified in [`Ui.java`](https://github.com/AY2425S1-CS2103T-W13-2/tp/blob/master/src/main/java/careconnect/ui/Ui.java)
Expand All @@ -95,6 +97,8 @@ The `UI` component,
* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands.
* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.

<div style="page-break-after: always"></div>

### Logic component

**API** : [`Logic.java`](https://github.com/AY2425S1-CS2103T-W13-2/tp/blob/master/src/main/java/careconnect/logic/Logic.java)
Expand Down Expand Up @@ -126,10 +130,12 @@ How the parsing works:
* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.

<div style="page-break-after: always"></div>

### Model component
**API** : [`Model.java`](https://github.com/AY2425S1-CS2103T-W13-2/tp/blob/master/src/main/java/careconnect/model/Model.java)

<img src="images/ModelClassDiagram.png" width="450" />
<img src="images/ModelClassDiagram.png" width="500" />


The `Model` component,
Expand All @@ -139,12 +145,15 @@ The `Model` component,
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)

<div style="page-break-after: always"></div>

<div markdown="span" class="alert alert-info">:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.<br>

<img src="images/BetterModelClassDiagram.png" width="450" />

</div>

<div style="page-break-after: always"></div>

### Storage component

Expand Down Expand Up @@ -175,6 +184,8 @@ The `LogicManager`, which is a concrete implementation of `Logic`, holds a refer

If a matching suggestion is found, `Autocompleter` returns it. If no match is found, `Autocompleter` throws an `AutocompleteException`. The result—either a valid suggestion or an exception—is then returned to `MainWindow`, where exception handling is managed. If a valid suggestion is provided, `MainWindow` updates the `commandTextField` with the suggested command, appending a space to facilitate further typing. If no suggestion is available (i.e., an exception occurs), feedback is displayed to inform the user that no matching options were found.

<div style="page-break-after: always"></div>

### \[Proposed\] Undo/redo feature

#### Proposed Implementation
Expand Down Expand Up @@ -230,6 +241,8 @@ The following sequence diagram shows how an undo operation goes through the `Log

</div>

<div style="page-break-after: always"></div>

Similarly, how an undo operation goes through the `Model` component is shown below:

![UndoSequenceDiagram](images/UndoSequenceDiagram-Model.png)
Expand Down Expand Up @@ -265,15 +278,8 @@ The following activity diagram summarizes what happens when a user executes a ne
* Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
* Cons: We must ensure that the implementation of each individual command are correct.

_{more aspects and alternatives to be added}_

### \[Proposed\] Data archiving

_{Explain here how the data archiving feature will be implemented}_


--------------------------------------------------------------------------------------------------------------------

<div style="page-break-after: always"></div>

## **Documentation, logging, testing, configuration, dev-ops**

Expand Down Expand Up @@ -318,9 +324,7 @@ automatically selected, and any initially selected user is unselected after exec
inconsistent behaviour from other commands that we aim to improve.



--------------------------------------------------------------------------------------------------------------------

<div style="page-break-after: always"></div>

## **Appendix: Requirements**

Expand Down Expand Up @@ -353,7 +357,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
| `* ` | user that prefers typing over mouse input | navigate the UI using keyboard | use the app without moving to mouse |
| `* ` | user | sort the client list by various fields | so that I can scroll through and check for clients that I missed |

*{More to be added}*

<div style="page-break-after: always"></div>

### Use cases

Expand Down Expand Up @@ -435,7 +440,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

Use case resumes at step 2.

*{More to be added}*
<div style="page-break-after: always"></div>

### Non-Functional Requirements

Expand Down Expand Up @@ -464,20 +469,16 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
* **Semantic search**: A search technique that understands user intent by analyzing the meaning and context of terms, providing more relevant results than keyword-based search.


--------------------------------------------------------------------------------------------------------------------
<div style="page-break-after: always"></div>

## Appendix: Effort



This project has achieved many of the extensions we have set to accomplish on top of
the functionalities provided by AB3.

Here are some of the best features we are proud of achieving and the effort required to
implement them:



1. Syntax highlighting:
- Difficulty level: 2/5
- Challenges faced: Deciding on the conditions that should trigger a syntax highlight and separating the different cases using different colors.
Expand Down Expand Up @@ -511,7 +512,6 @@ implement them:
meant that changes to the parent cannot be triggered by events like keystrokes and mouse
clicks on the children components.
- Solved by: Using a custom key listener to listen for the shortcut keys in the parent component and executing the corresponding functions across different the children components.
--------------------------------------------------------------------------------------------------------------------

## **Appendix: Instructions for manual testing**

Expand Down Expand Up @@ -692,6 +692,3 @@ Pauline.
]
}
```

<div style="page-break-after: always"></div>

75 changes: 48 additions & 27 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,69 @@ CareConnect is a **CLI-first** **case management application** that enables soci
{:toc}

<div style="page-break-after: always"></div>
--------------------------------------------------------------------------------------------------------------------

## Quick start

1. Ensure you have Java `17` or above installed on your computer.
1\. Ensure you have Java `17` or above installed on your computer.

1. Download the latest `.jar` file from [here](https://github.com/AY2425S1-CS2103T-W13-2/tp/releases).
2\. Download the latest `.jar` file from [here](https://github.com/AY2425S1-CS2103T-W13-2/tp/releases).

1. Copy the file to the folder you want to use as the _home folder_ for your CareConnect application.
3\. Copy the file to the folder you want to use as the _home folder_ for your CareConnect application.

1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar careconnect.jar`
4\. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar careconnect.jar`
command to run the application.<br>
A GUI similar to the below should appear in a few seconds. To get started, you can play around with some of the sample data that the app comes with!<br>
![Ui](images/Ui.png)

1. Note that CareConnect is best viewed in a **desktop** environment with **full screen**. You may see some
5\. Note that CareConnect is best viewed in a **desktop** environment with **full screen**. You may see some
content being cut-off if the window size is too small.

1. Let's try opening up a contact with the `view` command!
<div style="page-break-after: always"></div>

6\. Let's try opening up a contact with the `view` command!

- As you type, notice that an invalid command word will be coloured in red.
![incomplete command](images/syntax_highlighting_1.png)
<div style="page-break-after: always"></div>

![incomplete command](images/syntax_highlighting_1.png){: width="340" }
- You can try autocompleting the command by pressing `TAB` on your keyboard too. In this case, the command `view` will be matched, and it will be displayed in grey to indicate that it's a valid command word that is waiting for an argument.
![valid_command](images/syntax_highlighting_2.png)
<div style="page-break-after: always"></div>

![valid_command](images/syntax_highlighting_2.png){: width="340" }
- In this case, `view 1` indicates that we want to view the first contact in the list. Once a full valid command is entered, the command will be colored black.<br>
![complete command](images/syntax_highlighting_3.png)

![complete command](images/syntax_highlighting_3.png){: width="340" }
<div style="page-break-after: always"></div>
- Press Enter to execute command, and you should see the details for the first contact `Alex Yeoh` appear on the right pane!
![view command result](images/quickStart_1.png)

4. Let's delve a little deeper now, try adding a new contact using `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`. This adds a contact named `John Doe` to the application.
![add new person](images/quickStart_addNew.png)

<div style="page-break-after: always"></div>

5. You can use `shift+tab` to navigate between your command box and the contact list. You will see a brown box around the list when it is selected.
Try using the arrow key to navigate around the list until you find `John Doe`
![shift tab](images/quickStart_shiftTab_2.png)
7\. Let's delve a little deeper now, try adding a new contact using `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`. This adds a contact named `John Doe` to the application.

![add new person](images/quickStart_addNew.png){: width="550" }

8\. You can use `shift+tab` to navigate between your command box and the contact list. You will see a brown box around the list when it is selected.
Try using the arrow key to navigate around the list until you find `John Doe`.

![shift tab](images/quickStart_shiftTab_2.png){: width="550" }

9\. To add a new log entry for John, try `addlog 1 r/First meetup. d/2019-10-15 14:00`. You can add multiple logs for
the same contact, and the logs will appear as a list on the right.

![logs](images/quickStart_log_2.png){: width="550" }

10\. Finally, to delete a contact, simply use `delete <id>`. In this case, John has an id of 6 (visible from the contact list), so we can run `delete 6` to delete his contact.

11\. For security, you will be prompted to confirm your delete command. Press `y` to confirm, or `n` to cancel.

6. To add a new log entry for John, try `addlog 1 r/First meetup. d/2019-10-15 14:00`. You can add multiple logs for the same contact, and the logs will appear as a list in the right pane.
![logs](images/quickStart_log_2.png)
![delete](images/quickStart_delete_1.png){: width="550" }

7. Finally, to delete a contact, simply use `delete <id>`. In this case, John has an id of 6 (visible from the contact list), so we can run `delete 6` to delete his contact.
8. For security, you will be prompted to confirm your delete command. Press `y` to confirm, or `n` to cancel.
![delete](images/quickStart_delete_1.png)
9. Confirm that the contact has been removed from the list on the right
<div style="page-break-after: always"></div>

12\. Confirm that the contact has been removed from the list on the right.
![delete finished](images/quickStart_delete_2.png)
10. That's all! Feel free to refer to the [Features](#features) below for more details on each command and other features included in CareConnect.
13\. That's all! Feel free to refer to the [Features](#features) below for more details on each command and other features included in CareConnect.

<div style="page-break-after: always"></div>
--------------------------------------------------------------------------------------------------------------------

## Features

Expand Down Expand Up @@ -198,6 +209,8 @@ Lists of all beneficiaries in the case management system.

Format: `list`

<div style="page-break-after: always"></div>

### Viewing a client's details: `view`

View the details of the specified client in the case management system.
Expand Down Expand Up @@ -226,6 +239,8 @@ Format: `tag INDEX t/TAG_NAME`
Example:
- `tag 1 t/urgent`

<div style="page-break-after: always"></div>

### Untagging a client: `untag`

Untags a client in the case management system.
Expand Down Expand Up @@ -258,6 +273,8 @@ Example:
Example:
- `setappointment 1 d/` removes the appointment date for the client at index 1.

<div style="page-break-after: always"></div>

### Searching and filtering clients: `find`

Finds and filters all clients using a combination of name, address, and tags.
Expand Down Expand Up @@ -302,6 +319,8 @@ Examples:
and tags `urgent`, `ill`.
![img.png](images/findJohnHans.png)

<div style="page-break-after: always"></div>

### Deleting a client : `delete`

Deletes the specified client from the case management system.
Expand Down Expand Up @@ -338,6 +357,8 @@ Examples:
* `addlog 2 r/Client is doing well d/2022-12-12 14:00` adds a log entry to the 2nd client with the remark `Client is doing well` and the date `2022-12-12 14:00`.
* `addlog 1 r/Client is doing well` adds a log entry to the 1st client in the displayed client list, with the current date and time.

<div style="page-break-after: always"></div>

### Deleting a log entry : `deletelog`

Deletes the specified log entry from the specified client in the case management system.
Expand Down Expand Up @@ -395,7 +416,7 @@ This color-coded feedback helps users ensure their commands are correct and mini
### Easy keyboard navigation
CareConnect offers convenient keyboard navigation. Press `Shift + Tab` to switch focus between the command box, log list, and person list. Use the `Up` and `Down` arrow keys to scroll through lists.


<div style="page-break-after: always"></div>

### Editing the data file

Expand Down

0 comments on commit 1cb1e72

Please sign in to comment.