-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from angsongyee/update-contact
Update UG, DG for command history feature
- Loading branch information
Showing
3 changed files
with
116 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,8 @@ CodeConnect (CC) is a **desktop app for managing student contacts, optimized for | |
|
||
## Features | ||
|
||
### Commands | ||
|
||
<box type="info" seamless> | ||
|
||
**Notes about the command format:**<br> | ||
|
@@ -66,15 +68,15 @@ CodeConnect (CC) is a **desktop app for managing student contacts, optimized for | |
- If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application. | ||
</box> | ||
|
||
### Viewing help : `help` | ||
#### Viewing help : `help` | ||
|
||
Shows a message explaning how to access the help page. | ||
|
||
![help message](images/helpMessage.png) | ||
|
||
Format: `help` | ||
|
||
### Adding a contact: `add` | ||
#### Adding a contact: `add` | ||
|
||
Adds a contact to the address book. | ||
|
||
|
@@ -90,19 +92,13 @@ Examples: | |
- `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 g/johnDoee` | ||
- `add n/Betsy Crowe t/friend e/[email protected] a/Newgate Prison p/1234567 g/betBetty t/criminal ts/Flutter` | ||
|
||
### Listing all contacts : `list` | ||
#### Listing all contacts : `list` | ||
|
||
Shows a list of all contacts in the address book. | ||
|
||
Format: `list` | ||
|
||
### Sending an email to a specific contact | ||
|
||
Opens the desktop mail application to directly send an email to a specific contact. | ||
|
||
How to use: Click on the contact's email. | ||
|
||
### Editing a contact : `edit` | ||
#### Editing a contact : `edit` | ||
|
||
Edits an existing contact in the address book. | ||
|
||
|
@@ -120,7 +116,7 @@ Examples: | |
- `edit 1 p/91234567 e/[email protected]` Edits the phone number and email address of the 1st contact to be `91234567` and `[email protected]` respectively. | ||
- `edit 2 n/Betsy Crower t/` Edits the name of the 2nd contact to be `Betsy Crower` and clears all existing tags. | ||
|
||
### Locating contacts by name: `find` | ||
#### Locating contacts by name: `find` | ||
|
||
Finds contacts whose names contain any of the given keywords. | ||
|
||
|
@@ -139,7 +135,7 @@ Examples: | |
- `find alex david` returns `Alex Yeoh`, `David Li`<br> | ||
![result for 'find alex david'](images/findAlexDavidResult.png) | ||
|
||
### Locating contacts by tags: `find-tags` | ||
#### Locating contacts by tags: `find-tags` | ||
|
||
Finds contacts whose tags contain all the given keywords. | ||
|
||
|
@@ -154,7 +150,7 @@ Examples: | |
- image to be replaced | ||
![result for 'find alex david'](images/findAlexDavidResult.png) | ||
|
||
### Locating contacts by tech stack: `find-ts` | ||
#### Locating contacts by tech stack: `find-ts` | ||
|
||
Finds contacts whose tech stack contain all the given keywords. | ||
|
||
|
@@ -168,7 +164,7 @@ Format: `find-ts KEYWORD [MORE_KEYWORDS]` | |
Examples: | ||
- image to be inserted | ||
|
||
### Deleting a contact : `delete` | ||
#### Deleting a contact : `delete` | ||
|
||
Deletes the specified contact from the address book. | ||
|
||
|
@@ -183,23 +179,40 @@ Examples: | |
- `list` followed by `delete 2` deletes the 2nd contact in the address book. | ||
- `find Betsy` followed by `delete 1` deletes the 1st contact in the results of the `find` command. | ||
|
||
### Clearing all entries : `clear` | ||
#### Clearing all entries : `clear` | ||
|
||
Clears all entries from the address book. | ||
|
||
Format: `clear` | ||
|
||
### Exiting the program : `exit` | ||
#### Exiting the program : `exit` | ||
|
||
Exits the program. | ||
|
||
Format: `exit` | ||
|
||
### Saving the data | ||
### Other features | ||
|
||
#### Sending an email to a specific contact | ||
|
||
Opens the desktop mail application to directly send an email to a specific contact. | ||
|
||
**How to use:** Click on the contact's email. | ||
|
||
|
||
#### View your previous commands | ||
|
||
Any commands you have run previously are saved in the command history, so that you can easily refer to them if you need to. | ||
Any edits you make to a command will be saved while navigating through your history, so you can go to a another command | ||
to refer to it, and then return back to your edited command to finish typing. | ||
|
||
**How to use:** Use the up and down arrow keys to navigate through your history while the command input is focused, | ||
|
||
#### Saving the data | ||
|
||
CodeConnect data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. | ||
|
||
### Editing the data file | ||
#### Editing the data file | ||
|
||
CodeConnect data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. | ||
|
||
|
@@ -210,7 +223,7 @@ If your changes to the data file makes its format invalid, CodeConnect will disc | |
Furthermore, certain edits can cause the CodeConnect to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly. | ||
</box> | ||
|
||
### Archiving data files `[coming in v2.0]` | ||
#### Archiving data files `[coming in v2.0]` | ||
|
||
_Details coming soon ..._ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@startuml | ||
!include style.puml | ||
skinparam ArrowFontStyle plain | ||
|
||
box UI UI_COLOR_T1 | ||
participant ":CommandBox" as CommandBox UI_COLOR | ||
participant "commandInput:TextField" as TextField UI_COLOR | ||
end box | ||
|
||
box Logic LOGIC_COLOR_T1 | ||
participant "view:CommandHistoryView" as CommandHistoryView LOGIC_COLOR | ||
participant "h:CommandHistory" as CommandHistory LOGIC_COLOR | ||
participant "nextView:CommandHistoryView" as NCommandHistoryView LOGIC_COLOR | ||
end box | ||
|
||
[-> CommandBox : <KeyEvent> | ||
activate CommandBox | ||
CommandBox -> TextField : getText() | ||
activate TextField | ||
|
||
CommandBox <-- TextField : input | ||
deactivate TextField | ||
|
||
CommandBox -> CommandHistoryView : updateCurrentCommand(input) | ||
|
||
alt #00ff0000 eventCode = UP | ||
CommandBox -> CommandHistoryView : next() | ||
activate CommandHistoryView | ||
|
||
CommandBox <-- CommandHistoryView : c | ||
deactivate CommandHistoryView | ||
|
||
else eventCode = DOWN | ||
CommandBox -> CommandHistoryView : previous() | ||
activate CommandHistoryView | ||
|
||
CommandBox <-- CommandHistoryView : c | ||
deactivate CommandHistoryView | ||
end | ||
|
||
CommandBox -> TextField : setText(c) | ||
|
||
[<--CommandBox | ||
deactivate CommandBox | ||
|
||
|
||
[-> CommandBox : handleCommandEntered() | ||
activate CommandBox | ||
|
||
CommandBox -> CommandHistory : h.add("list") | ||
|
||
create NCommandHistoryView | ||
|
||
CommandBox -> NCommandHistoryView : CommandHistoryView(h) | ||
activate NCommandHistoryView | ||
|
||
CommandBox <-- NCommandHistoryView : nextView | ||
deactivate NCommandHistoryView | ||
|
||
destroy CommandHistoryView | ||
|
||
[<--CommandBox | ||
deactivate CommandBox | ||
@enduml |