Skip to content

Commit

Permalink
Merge branch 'add-tag' of https://github.com/zekone/tp into add-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
zekone committed Oct 27, 2023
2 parents 1ea5980 + bbd0a3e commit 51ed10f
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 18 deletions.
112 changes: 94 additions & 18 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The `Model` component,
The `Storage` component,
* can save both address book data and user preference data in JSON format, and read them back into corresponding objects.
* inherits from both `AddressBookStorage` and `UserPrefStorage`, which means it can be treated as either one (if only the functionality of only one is needed).
* depends on some classes in the `Model` component (because the `Storage` component's job is to save/retrieve objects that belong to the `Model`)
* depends on some classes in the `Model` component such as `Person`, `Note`, and `Event` because the `Storage` component's job is to save/retrieve objects that belong to the `Model`.

### Common classes

Expand All @@ -162,6 +162,20 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa

This section describes some noteworthy details on how certain features are implemented.

### Enhanced help feature

#### Design considerations:

**Rationale**

* Previous help feature simply opens a page with a link to the website, this is bad because:
* The flow is lengthy
* User may not be able to access website when operating without the internet

Therefore, we want to make this better by simplifying the flow. We do this by adding:
* Making the help command return things in the application console
* Letting users enter an extra argument to specify what command they need guiding on

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

#### Proposed Implementation
Expand Down Expand Up @@ -288,20 +302,21 @@ _{Explain here how the data archiving feature will be implemented}_

Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`

| Priority | As a …​ | I want to …​ | So that I can…​ |
|----------|--------------------------------------------|------------------------------|------------------------------------------------------------------------|
| `* * *` | new user | get a list of the commands | know how to use the commands and their parameters |
| `* * *` | user | add a new contact | record one person's phone number and email address |
| `* * *` | user | delete a contact | remove a contact (by name) that I do not need |
| `* * *` | user | view all contact | easily see and know what contacts are currently stored in the application in one place |
| `* *` | user | view all notes | easily see and know what notes are currently stored in the application in one place |
| `* *` | user | add notes to a contact | record additional information about that contact in the notes |
| `* *` | user | delete notes to a contact | remove additional information that are no longer needed about that contact in the notes |
| `* *` | user who has some event to do | add an event | record an event with start time and also end time, location and any additional information like what to do during the event |
| `* *` | user who has/had some event to do | delete an event | remove an event after it is obsolete, cancelled or no longer needed to be recorded |
| `* *` | tidy user | tag a contact with a label | keep my contacts oraganised and categorised |
| `* *` | tidy user | delete a tag from a contact | remove tags that are no longer relevant |
| `* * *` | user who finishes using the application | exit the program | exit the program normally while ensuring all my data is currectly saved |
| Priority | As a …​ | I want to …​ | So that I can…​ |
|----------|--------------------------------------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| `* * *` | new user | get a list of the commands | know how to use the commands and their parameters |
| `* * *` | user | add a new contact | record one person's phone number and email address |
| `* * *` | user | delete a contact | remove a contact (by name) that I do not need |
| `* * *` | user | view all contact | easily see and know what contacts are currently stored in the application in one place |
| `* *` | user | view all notes | easily see and know what notes are currently stored in the application in one place |
| `* *` | user | add notes to a contact | record additional information about that contact in the notes |
| `* *` | user | delete notes to a contact | remove additional information that are no longer needed about that contact in the notes |
| `* *` | user who has some event to do | add an event | record an event with start time and also end time, location and any additional information like what to do during the event |
| `* *` | user who has/had some event to do | delete an event | remove an event after it is obsolete, cancelled or no longer needed to be recorded |
| `* *` | tidy user | tag a contact with a label | keep my contacts oraganised and categorised |
| `* *` | tidy user | delete a tag from a contact | remove tags that are no longer relevant |
| `* *` | tidy user | edit a tag from a contact | edit tags in a contact that needs to be changed |
| `* * *` | user who finishes using the application | exit the program | exit the program normally while ensuring all my data is currectly saved |

*{More to be added}*

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

Use case ends.

**Use case: UC10 - Adding tags to a contact**
**Use case: UC10 - Get help on commands**

**MSS**

1. User requests for help.
2. KeepInTouch returns relevant documentation.

Use case ends.

**Extensions**

* 1a. User inputs no extra argument.

* 1a1. KeepInTouch shows a list of all command words.

Use case ends.

* 1b. User inputs an extra argument corresponding to a command.

* 1b1. Extra argument is a command word.

* KeepInTouch returns documentation on that command word.

* 1b2. Extra argument is not a command word, but is somewhat similar.

* KeepInTouch suggests the command word with the highest degree of similarity to the input

* 1b3. Extra argument is not a command word, and isn't recognizably close to a command word.

* KeepInTouch lets the user know that it is unable to recognize the input.

Use case ends.

**Use case: UC11 - Adding tags to a contact**

**MSS**

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

Use case ends.

**Use case: UC11 - Delete tags from a contact**
**Use case: UC12 - Delete tags from a contact**

**MSS**

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

Use case ends.

**Use case: UC12 - Exit the program**
**Use case: UC13 - Edit tags in a contact**

**MSS**

1. User requests to edit tags in a contact.
2. KeepInTouch edits the tags from the specified contact.

Use case ends.

**Extensions**

* 1a. User inputs incomplete data.

* 1a1. KeepInTouch shows a message indicating incomplete data.

Use case ends.
* 1b. User inputs a contact that does not exist.

* 1b1. KeepInTouch shows a message indicating that the contact cannot be found.

Use case ends.

* 1c. User inputs a tag that does not exist.

* 1c1. KeepInTouch shows a message indicating that the tag cannot be found.

Use case ends.

**Use case: UC14 - Exit the program**

**MSS**

Expand Down
4 changes: 4 additions & 0 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedPerson
Class JsonAdaptedTag
Class JsonAdaptedNote
Class JsonAdaptedEvent
}

}
Expand All @@ -39,5 +41,7 @@ JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedPerson
JsonAdaptedPerson --> "*" JsonAdaptedTag
JsonAdaptedPerson --> "*" JsonAdaptedNote
JsonAdaptedPerson --> "*" JsonAdaptedEvent

@enduml

0 comments on commit 51ed10f

Please sign in to comment.