diff --git a/README.md b/README.md index 13f5c77403f..0729755bc2c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,18 @@ -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) +# Productiv +[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/AY2021S1-CS2103T-F11-2/tp/actions) ![Ui](docs/images/Ui.png) -* This is **a sample project for Software Engineering (SE) students**.
- Example usages: - * as a starting point of a course project (as opposed to writing everything from scratch) - * as a case study -* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details. - * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big. - * It comes with a **reasonable level of user and developer documentation**. -* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...). -* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**. -* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info. +Want to be **productive** in managing your **product**? + +If yes, **Productiv** is the way to go! + +**Productiv** can help you: +* Manage your contacts, meetings, and deliverables +* View your meetings and deliverables on a calendar +* Keep track of your product's progress + +## Site Map +* [User Guide](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/docs/UserGuide.md) +* [Developer Guide](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/docs/DeveloperGuide.md) +* [About Us](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/docs/AboutUs.md) diff --git a/build.gradle b/build.gradle index be2d2905dde..a040423d351 100644 --- a/build.gradle +++ b/build.gradle @@ -66,7 +66,11 @@ dependencies { } shadowJar { - archiveName = 'addressbook.jar' + archiveName = 'productiv.jar' } defaultTasks 'clean', 'test' + +run { + enableAssertions = true +} diff --git a/docs/AboutUs.md b/docs/AboutUs.md index 1c9514e966a..fe1a7937915 100644 --- a/docs/AboutUs.md +++ b/docs/AboutUs.md @@ -3,57 +3,57 @@ layout: page title: About Us --- -We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg). +Our Productiv team is based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg). -You can reach us at the email `seer[at]comp.nus.edu.sg` +You can contact us at `productiv@comp.nus.edu.sg` for any enquiries. ## Project team -### John Doe +### Cao Wenjie - + -[[homepage](http://www.comp.nus.edu.sg/~damithch)] -[[github](https://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](https://github.com/shadowezz)] +[[portfolio](team/shadowezz.md)] -* Role: Project Advisor +* Role: Developer +* Responsibilities: In charge of `Deliverable` features and Quality Assurance (Testing) -### Jane Doe +### Chrystal Quek Wan Qi - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](http://github.com/chrystalquek)] [[portfolio](team/chrystalquek.md)] -* Role: Team Lead -* Responsibilities: UI +* Role: Developer +* Responsibilities: In charge of "Contact" and "Mode" features, as well as Quality Assurance (Testing) -### Johnny Doe +### Clara Adora - + -[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)] +[[github](https://github.com/claraadora)] +[[portfolio](team/claraadora.md)] * Role: Developer -* Responsibilities: Data +* Responsibilities: In charge of "Meeting" features and Product Management -### Jean Doe +### Merlin Lim - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](https://github.com/MerlinLim)] +[[portfolio](team/merlinlim.md)] * Role: Developer -* Responsibilities: Dev Ops + Threading +* Responsibilities: In charge of "Meeting" features and Documentation -### James Doe +### Tan Chang Ri, Gabriel - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](http://github.com/gabztcr)] +[[portfolio](team/gabztcr.md)] * Role: Developer -* Responsibilities: UI +* Responsibilities: In charge of "Deliverable" features and Documentation diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 4829fe43011..8465806d93d 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -19,109 +19,164 @@ Refer to the guide [_Setting up and getting started_](SettingUp.md). -The ***Architecture Diagram*** given above explains the high-level design of the App. Given below is a quick overview of each component. +The ***Architecture Diagram*** given above explains the high-level design of Productiv (referred to as "the App" or "the application"). Given below is a quick overview of each component.
-:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/se-edu/addressbook-level3/tree/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams. +:bulb: **Tip:** The `.puml` files used to create diagrams in this document can be found in the [diagrams](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/docs/diagrams/) folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
-**`Main`** has two classes called [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java). It is responsible for, -* At app launch: Initializes the components in the correct sequence, and connects them up with each other. -* At shut down: Shuts down the components and invokes cleanup methods where necessary. +<<<<<<< HEAD +**`Main`** has two classes called [`Main`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/java/seedu/address/MainApp.java). It is responsible for, +* At app launch, initialising the components in the correct sequence, and connects them up with each other. +* Upon exiting, shutting down the components and invoking cleanup methods where necessary. -[**`Commons`**](#common-classes) represents a collection of classes used by multiple other components. +[**`Commons`**](#common-classes) represents a collection of classes used by multiple other components. The rest of the App consists of four components. -* [**`UI`**](#ui-component): The UI of the App. -* [**`Logic`**](#logic-component): The command executor. +* [**`UI`**](#ui-component): Handles the UI of the App. +* [**`Logic`**](#logic-component): Executes commands supplied to the App. * [**`Model`**](#model-component): Holds the data of the App in memory. * [**`Storage`**](#storage-component): Reads data from, and writes data to, the hard disk. -Each of the four components, +The app contains 3 types of entities: Deliverable, Meeting and Person -* defines its *API* in an `interface` with the same name as the Component. -* exposes its functionality using a concrete `{Component Name}Manager` class (which implements the corresponding API `interface` mentioned in the previous point. +Each of the four components: -For example, the `Logic` component (see the class diagram given below) defines its API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class which implements the `Logic` interface. +* defines its *API* using a `{Component}{Entity}` interface. +* exposes its functionality using a concrete `{Component}{Entity}Manager` class (which implements the corresponding +API `interface` above.) + +For example, the `Logic` component (see the class diagram given below) defines its API in the `Logic{Entity}.java` interface +and exposes its functionality using the `Logic{Entity}Manager.java` class which implements the `Logic{Entity}` interface.) ![Class Diagram of the Logic Component](images/LogicClassDiagram.png) **How the architecture components interact with each other** -The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete 1`. - - +The sequence diagram below shows how the components interact with each other for the scenario where the user issues the command `delete 1` in the deliverable, meeting, or contact mode. -The sections below give more details of each component. +![`Architecture Sequence Diagram with Dashboard](images/ArchitectureSequenceDiagramWithDb.png) ### UI component ![Structure of the UI Component](images/UiClassDiagram.png) **API** : -[`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java) +[`Ui.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/java/seedu/address/ui/Ui.java) + +The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `PersonDetailsPanel`, `CalendarListPanel`, + `ProjectCompletionStatusPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class. + + + The `Dashboard` parts of the UI are displayed when the application is in dashboard mode. The left side of the application consists of + the `ProjectCompletionStatusPanel` where the user can see the overall completion status of his/her product based on the + percentage of deliverables completed. The right side consists of the `CalendarListPanel` which displays a list of deliverables + and meetings, through `CalendarDeliverableCard` and `CalendarMeetingCard` respectively, in chronological order so that the user can + keep track of his/her schedule. + + + When the application is in deliverable, meeting or contact mode, the respective UI parts will be displayed. For example, + in deliverable mode, the left side of the application will contain the `DeliverableListPanel`, consisting of `DeliverableCard`, + to show the list of deliverables the user has. The right side consists of the `DeliverableDetailsPanel` which will display the full details + of the deliverable that the user is viewing or just performed an operation on. The same idea is applicable for meeting and contact mode. + + -The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class. +The UI component uses JavaFX UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/resources/view/MainWindow.fxml) -The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml) -The `UI` component, +The UI component: -* Executes user commands using the `Logic` component. -* Listens for changes to `Model` data so that the UI can be updated with the modified data. +* Executes user commands using the Logic component. +* Listens for changes to Model data so that the UI can be updated with the modified data. ### Logic component ![Structure of the Logic Component](images/LogicClassDiagram.png) -**API** : -[`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java) +**API** :
+* [`LogicDeliverable.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/logic/LogicDeliverable.java) +* [`LogicMeeting.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/logic/LogicMeeting.java) +* [`LogicPerson.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/logic/LogicPerson.java) +* [`LogicDispatcher.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/logic/LogicDispatcher.java) + +The Logic component parses the user commands and executes them. +`LogicDispatcher` selects the correct `LogicXYZ` based on the current mode (e.g deliverable mode). + +This is the list of what Model components are affected: +* `LogicDeliverable`: Component that affects `DeliverableModel` when in deliverable mode. +* `LogicMeeting`: Component that affects `MeetingModel` when in meeting mode. +* `LogicPerson`: Component that affects `PersonModel` when in contact mode. + +Commands that do not affect Model components will be passed to `GeneralParser` when in any mode. -1. `Logic` uses the `AddressBookParser` class to parse the user command. -1. This results in a `Command` object which is executed by the `LogicManager`. -1. The command execution can affect the `Model` (e.g. adding a person). -1. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`. -1. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user. +The components follow the general sequence to execute a command: -Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute("delete 1")` API call. +1. `LogicDispatcherManager` dispatches commands to + 1. `LogicXYZManager` class to execute and parse the user command which affect models + 1. `GeneralCommandParser` class to parse user commands which do not affect models +1. This results in a `ABCCommand` object which is executed by the `LogicDispatcherManager`. +1. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to `Ui`. +1. In addition, `CommandResult` can also instruct `Ui` to perform certain actions, such as displaying help or switching mode for the user. -![Interactions Inside the Logic Component for the `delete 1` Command](images/DeleteSequenceDiagram.png) +Given below is the Sequence Diagram for interactions within the Logic component for API call of any command. -
:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +![Interactions Inside the Logic Component for any command](images/CommandSequenceDiagram.png) + +
:information_source: +**Note:** The lifeline for `ABCCommandParser` should end at the destroy marker (X) +but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
### Model component ![Structure of the Model Component](images/ModelClassDiagram.png) -**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java) +**API** : +[`ModelDeliverable.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/java/seedu/address/model/deliverable/ModelDeliverable.java), +[`ModelMeeting.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/model/meeting/ModelMeeting.java), +[`ModelPerson.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/blob/master/src/main/java/seedu/address/model/person/ModelPerson.java) -The `Model`, +The Model component (`ModelDeliverable`, `ModelMeeting` or `ModelPerson`), * stores a `UserPref` object that represents the user’s preferences. -* stores the address book data. -* exposes an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. +* stores its respective deliverable, meeting, or person book. +* exposes unmodifiable its respective `ObservableList`,`ObservableList`, or `ObservableList`. +e.g. the UI can be bound to these lists so that the UI automatically updates when the data in the lists change. * does not depend on any of the other three components. +### Storage component -
: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` object.
-![BetterModelClassDiagram](images/BetterModelClassDiagram.png) +![Structure of the Storage Component](images/StorageClassDiagram.png) -
+**API** : +[`StorageDeliverable.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/storage/deliverable/StorageDeliverable.java) +[`StorageMeeting.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/storage/meeting/StorageMeeting.java) +[`StoragePerson.java`](https://github.com/AY2021S1-CS2103T-F11-2/tp/tree/master/src/main/java/seedu/address/storage/person/StoragePerson.java) +The Storage component: +* can save `UserPref` objects in JSON format and read it back. +* can save the data in JSON format and read it back. -### Storage component +For saving files, storage follows this sequence: -![Structure of the Storage Component](images/StorageClassDiagram.png) +1. When `XYZBook` is updated, `StorageXYZManagers` saves the newly updated book. +1. The newly updated book is passed to `JsonSerliazableXYZBook`. +1. Each item in `XYZBook` is serialized by `JsonAdaptedXYZ` before overwriting the current json files. + +Given below is the sequence diagram for data being stored. + +![Interactions Inside the Storage Component for Any Book](images/SaveStorageSequenceDiagram.png) -**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java) +For reading files, based on the `UserPrefs` provided, storage will find the JSON Files and load the data from there. -The `Storage` component, -* can save `UserPref` objects in json format and read it back. -* can save the address book data in json format and read it back. +
:information_source: +**Note:** +If the JSON files are missing or if the path is missing, a new set of JSON files will be generated with a set of sample items. +
### Common classes @@ -132,91 +187,297 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa ## **Implementation** This section describes some noteworthy details on how certain features are implemented. +### Date and Time Verification -### \[Proposed\] Undo/redo feature +#### Implementation +The implementation allows users to parse and compare unique `DateTime` and `Time` types. -#### Proposed Implementation +![Structure of DateTime and Time implementations](images/DateTimeClass.png) -The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations: +**`Time`**: To parse, `Time` should be in the following format: **`HH:mm`** +* Single digit fields must include leading zero: `01:10`. -* `VersionedAddressBook#commit()` — Saves the current address book state in its history. -* `VersionedAddressBook#undo()` — Restores the previous address book state from its history. -* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history. +`Time` will throw a parsing error if +* Format is wrong (e.g missing or additional digit): `00:00:59` +* Invalid range (e.g beyond max limit): `24:00` -These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively. +**`DateTime`**: To parse, `DateTime` should be in the following format: **`dd-MM-yyyy HH:mm`** +* Single digit fields must include leading zero: `01-01-0101 01:10`. +* Valid Calendar Range: \[`01-01-2019 00:00` - `31-12-9999 23:59`\]. -Given below is an example usage scenario and how the undo/redo mechanism behaves at each step. +`DateTime` will throw a parsing error if +* Format is wrong (e.g missing or additional digit): `1-10-2020 00:00:59` +* Invalid range (e.g invalid leap year): `31-02-2020 00:00` -Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state. +DateTime can be used to compare with other DateTime objects: +* Enable deliverables or meetings to be sorted based on which one is due the earliest. +*Refer to [Auto-sort feature](#auto-sort-feature) to view this implementation.* +* Ensures `From` in meeting is strictly before `To` (e.g Throw error for command `edit 1 from/01-01-2020 23:59 to/00:00` in meeting mode). +* DateTime can be used to identify time clashes between different meetings. -![UndoRedoState0](images/UndoRedoState0.png) +#### Design consideration +* **Alternative 1 (current choice):** Throws error when invalid range is +given for dates + * E.g `29-02-2019 00:00` or `31-11-2020 00:00`. + * Pros: Notifies user he has made a mistake. + * Cons: Costs time to re-type the entire command. + +* **Alternative 2:** Command knows how to resolve overflow of dates. + * E.g `29-02-2019 00:00` will be resolved automatically to `28-02-2019 00:00` the `MAX number of days of the month`. + * Pros: Saves time for the user if he had intended to select the last day of the month. + * Cons: The date specified may not be the intended input. -Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. +### Auto-sort feature -![UndoRedoState1](images/UndoRedoState1.png) +#### Implementation -Step 3. The user executes `add n/David …​` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`. +The Auto-sort feature allows users to view `Deliverable`s, `Meeting`s, and `Person`s in a logical manner. +Specifically, the Auto-sort feature automatically sorts `Deliverable`s, `Meeting`s, and `Person`s by the following attributes: -![UndoRedoState2](images/UndoRedoState2.png) +* `Meeting` - its `From`'s `LocalDateTime` value in ascending chronological order +* `Deliverable` - its `Deadline`'s `LocalDateTime` value in ascending chronological order +* `Person` - its `Name`'s `String` value in ascending alphabetical order -
:information_source: **Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`. +Auto-sort is facilitated by custom classes that implements `Comparator`. -
+The following sequence diagram shows how a list is auto-sorted upon an addition of a `Meeting`. -Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. +![AutosortSequenceDiagram](images/AutosortSequenceDiagram.png) -![UndoRedoState3](images/UndoRedoState3.png) +#### Design consideration -
:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather -than attempting to perform the undo. +##### Aspect: How auto-sorting executes -
+* **Alternative 1 (current choice):** Sorts a list upon an addition or update of an element. + * Pros: Error-free and easy to implement. + * Cons: Relatively high time complexity i.e. O(nlogn). +* **Alternative 2:** Searches the correct index in the list to insert an element upon addition or update. + * Pros: Relatively low time complexity i.e. O(logn). + * Cons: Prone to error and difficult to implement. + +### Calendar feature -The following sequence diagram shows how the undo operation works: +#### Implementation -![UndoSequenceDiagram](images/UndoSequenceDiagram.png) +The Calendar feature allows users to view their `Deliverable`s and`Meeting`s together in one chronologically ordered list - `calendarList`. +Specifically, the Calendar feature combines and orders `Deliverable`s and `Meeting`s by the following attributes: -
:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +* `Meeting` - its `From`'s `LocalDateTime` value +* `Deliverable` - its `Deadline`'s `LocalDateTime` value -
+The combining is done by applying polymorphism; `Deliverable` and `Meeting` implement the interface `TimeEvent`. +The following class diagram demonstrates the above-mentioned polymorphism. +![TimeEventClassDiagram](images/TimeEventClassDiagram.png) -The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state. +Meanwhile, the ordering is facilitated by the [Auto-sort feature](#auto-sort-feature). -
:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo. +The following sequence diagram shows how the Calendar is updated upon an addition of a `Deliverable`. + +![CalendarSequenceDiagram](images/CalendarSequenceDiagram.png) + +#### Design consideration + +##### Aspect: Where and how is `calendarList` updated + +* **Alternative 1 (current choice):** `calendarList` is in the UI component, and for any change in `UniqueDeliverableList`'s or `UniqueMeetingList`'s `internalList`: + 1. `calendarList` is cleared + 1. both `internalList`s' elements are added into `calendarList` + 1. `calendarList` is sorted + * Pros: Coupling is reduced as the implementation of `UniqueDeliverableList` and `UniqueMeetingList` are unmodified. + * Cons: Relatively high time complexity as any update to the `internalList`s requires clearing, adding back all `internalList`s' elements, and sorting `calendarList`. + This is required because `calendarList`, which is not in `UniqueDeliverableList` and `UniqueMeetingList`, has no direct access to the item being updated. +* **Alternative 2:** `calendarList` is in `UniqueDeliverableList` and `UniqueMeetingList` as references, and for any change in `UniqueDeliverableList`'s or `UniqueMeetingList`'s `internalList`: + 1. `calendarList` is updated in the same way as the `internalList` involved. + This is possible because the `calendarList`, which is in `UniqueDeliverableList` and `UniqueMeetingList`, has direct access to the element being updated. + * Pros: Lower time complexity compared to Alternative 1, as both clearing and adding back all `internalList`s' elements are not needed. + * Cons: Coupling is increased as the implementation of `UniqueDeliverableList` and `UniqueMeetingList` are modified + i.e. both hold and update `calendarList` (on top of `internalList`) for any update. + +### Done feature + +#### Implementation + +The Done feature allows users to mark their deliverables as completed. + +1. The user input is received by `MainWindow` in the `UI` component before being passed to `DeliverableLogicManager` through `LogicDispatcherManager` to be executed. +1. `DeliverableLogicManager` will call `DeliverableBookParser` which will parse the command keyword ("done") to return a `MarkDoneCommandParser`. +1. `MarkDoneCommandParser` will then parse the command argument to return a `MarkDoneCommand`. +1. On execution, `MarkDoneCommand` will set the status of the specified deliverable to completed and update the `ModelDeliverable` accordingly. + +Invalid user inputs such as an invalid index will result in the appropriate error messages displayed to the user. + +Given below is a sequence diagram to show how the done operation works at each step. + +![DoneCommandSequenceDiagram](images/DoneCommandSequenceDiagram.png) + +#### Design Considerations + +##### Aspect: How `done` is implemented + +* **Alternative 1 (current choice):** Have a separate command `done` for marking deliverables as completed. + * Pros: Clearer and easier for the user. Prevents the `edit` command from being too cluttered with too many + editable fields. + * Cons: More code and testing required as there are additional classes created such as `MarkDoneCommand` and + `MarkDoneCommandParser`. +* **Alternative 2:** Allow users to mark deliverables as completed through the existing `edit` command by changing +the completion status field of the deliverable + * Pros: Less code required since we only need to make small amendments to the existing `EditCommand` and `EditCommandParser`. + * Cons: Format of the command will be more complex and confusing for the user. Instead of just having to pass in the index + of deliverable, we will need to provide a prefix (e.g. s/) and a string to represent the completion status to edit to (e.g. edit 1 s/complete). + +### Switch Mode feature + +#### Implementation + +The switch mode feature allows users to switch to any of the modes of the application. +The application can be in any one of these modes: dashboard, deliverable, meeting and contact mode. +Based on the current mode, user input is passed to the corresponding `LogicManager`, +e.g. if the user is in deliverable mode, user input is passed to `LogicDeliverableManager`. +Based on the current mode, the `Ui` updates with information related to that mode. + +The mode of the application can be switched via CLI or mouse input. + +Via CLI: +1. The user input is received by the `MainWindow` in the `Ui` component and passed to `LogicDispatcherManager`. +`LogicDispatcherManager` is the 'gatekeeper' of the Logic component. +1. `LogicDispatcherManager` will identify the user input as a `General` command and call `GeneralParser`. +1. `GeneralParser` will create a `SwitchCommandParser`. `SwitchCommandParser` will then parse the arguments in the user input to return a `SwitchCommand`. +1. This `SwitchCommand` is passed back to `LogicDispatcherManager`. +1. `LogicDispatcherManager` will then call the execute method of `SwitchCommand` which returns a `CommandResult` containing the mode that the application should switch to. +1. This `CommandResult` is passed back to `MainWindow`. +1. Then, `MainWindow` will retrieve the new mode from the `CommandResult`. +1. Based on the new mode, `MainWindow` will update its own attribute `mode`. +`MainWindow` will also update the UI to only show information related to the new mode. + +For the command, a `SwitchCommandParser` is implemented to parse the input into a mode. +Invalid arguments (any argument other than `dv`, `db`, `m` and `c`) are also handled properly, with suitable error messages being displayed to the user. + +Given below is a sequence diagram to show how the switch mode mechanism behaves for CLI. + +![SwitchModeSequenceDiagram](images/SwitchModeSequenceDiagram.png) + +Given below is an activity diagram to show how the switch mode operation works for CLI. + +![SwitchModeActivityDiagram](images/SwitchModeActivityDiagram.png) + + + + +Via mouse input: +There is no interaction with the logic component. The only steps are: +1. The `MainWindow` detects that a button on the navigation bar is clicked, e.g. if Deliverable is clicked, `switchDeliverable` method of `MainWindow` is called. +1. The `MainWindow` will update its own attribute `mode` and the UI to only show information related to the new mode. + +Given below is a sequence diagram to show how the switch mode mechanism behaves for mouse input. + +![SwitchModeMouseInputSequenceDiagram](images/SwitchModeMouseInputSequenceDiagram.png) +
The two sequence diagrams are separated for simplicity
+ + +#### Design consideration + +##### Aspect: How Switch commands should be implemented + +* **Alternative 1 (current choice):** Shortened user commands: `switch` `db`, `dv`, `m` or `c`. + * Pros: More convenient and faster to type shorter user commands. + * Cons: More difficult for users to remember short forms. + +* **Alternative 2 (original implementation):** Longer user commands: `switch` `dashboard`, `deliverable`, `meeting` or `contact`. + * Pros: Clearer as commands correspond to the naming of tabs on the navigation bar. + * Cons: Takes longer to type longer user commands. + +##### Aspect: Where mode is stored + +* **Alternative 1 (current choice):** Store mode in `MainWindow`. + * Pros: `MainWindow` can update UI easily by accessing current mode. + * Cons: Need to keep passing current mode to `LogicDispatcherManager`. + +* **Alternative 2:** Store mode in both `MainWindow` and `LogicDispatcherManager`. + * Pros: Easier implementation. No need to keep passing current mode to `LogicDispatcherManager`. + * Cons: No single source of truth, could lead to bugs. -
-Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged. +### View feature -![UndoRedoState4](images/UndoRedoState4.png) +#### Implementation -Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …​` command. This is the behavior that most modern desktop applications follow. +The view feature allows users to view the details of a specific deliverable, meeting or contact on the right +panel of the display window, depending on the mode the application is in. -![UndoRedoState5](images/UndoRedoState5.png) +1. Suppose the user in currently in the meeting mode, the user input received by `MainWindow` in `UI` component will be passed to `MeetingLogicManager` through `LogicDispatcherManager` to be executed. +1. `MeetingLogicManager` will call `MeetingBookParser` which will parse the command keyword ("view") to return a `ViewCommandParser`. +1. `ViewCommandParser` will then parse the command argument to return a `ViewCommand`. +1. On execution, `ViewCommand` will update the `ModelMeeting` to set the meeting currently in view. +1. `UI` component will then make a separate call to `ModelMeeting` to retrieve the meeting currently in view and display its full details to the user in the right panel of the application. -The following activity diagram summarizes what happens when a user executes a new command: +Invalid user inputs such as an invalid index will result in the appropriate error messages displayed to the user. -![CommitActivityDiagram](images/CommitActivityDiagram.png) +The following sequence diagram shows how the view operation works in each step: -#### Design consideration: +![ViewCommandSequenceDiagram](images/ViewCommandSequenceDiagram.png) -##### Aspect: How undo & redo executes +#### Design consideration -* **Alternative 1 (current choice):** Saves the entire address book. - * Pros: Easy to implement. - * Cons: May have performance issues in terms of memory usage. -* **Alternative 2:** Individual command knows how to undo/redo by - itself. - * 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. +##### Aspect: How view executes -_{more aspects and alternatives to be added}_ +* **Alternative 1 (current choice):** Stores the item in view inside the respective model. + * Pros: Ensures persistence as it can be referred to repeatedly. + * Cons: Requires another operation to fetch the item in view to be displayed. -### \[Proposed\] Data archiving +* **Alternative 2:** Passes the item in view inside the Command Result to the UI component + * Pros: Does not require an additional operation to fetch the item in view. + * Cons: Cluttering of Command Result object which now needs to store mode-specific items. This is against its original purpose + which is to pass mode-neutral information, such as error messages, back to UI for display after a command execution. -_{Explain here how the data archiving feature will be implemented}_ +### Overall Completion Percentage feature +#### Implementation + +The Overall Completion Percentage (OCP) feature is located at the left panel of the dashboard in Productiv. +It is a donut chart implemented with the third-party library [fx-progress-circle](https://github.com/torakiki/fx-progress-circle/), +and it appears as shown below. + +![OCP](images/OCP.JPG) + +The OCP feature allows product managers to have a quick overview of the progress of their product's development +so that they can work better towards production deadlines. +OCP is given by the +formula*: + +
+**_OCP (%) = Number of Completed Deliverables / Total Number of Deliverables × 100_** +
+ +\* If no deliverables exist, OCP will be set to **0%**. + +The OCP will be updated upon switching to dashboard mode. +This can be done via CLI (with the command `switch db`) or mouse input (clicking on the dashboard tab). + +The following steps and sequence diagram shows how the **updating** of the OCP is implemented via mouse input. +You should note the mechanism after the mode has been switched. + +1. `MainWindow` detects that the dashboard button in the navigation bar is clicked, and its `switchDashboard` method is called. +2. `MainWindow` updates its own attribute `mode` to reflect the dashboard and its UI displays it accordingly. +3. The `updateOcp` method of `ProjectCompletionStatusPanel` is called. +4. `ProjectCompletionStatusPanel` calls the `size` method of its `deliverableList` (of type `ObservableList`), which returns the total number of deliverables (`totalNumDeliverables`). +5. `ProjectCompletionStatusPanel` self-invokes its `findNumCompletedDeliverables` method that returns the number of completed deliverables of its `deliverableList` (`numCompletedDeliverables`). +6. `ProjectCompletionStatusPanel` self-invokes its `getOcp` method with `totalNumDeliverables` and `numCompletedDeliverables` as parameters, and returns the `overallCompletionPercentage`*. + +*This value is later passed to the progress ring indicator to render the OCP donut chart in the dashboard. + +![OCPSequenceDiagram](images/OCPSequenceDiagram.png) + +#### Design consideration + +##### Aspect: How updating of OCP executes + +* **Alternative 1 (current choice):** Calculate OCP on-the-go only upon switching to dashboard mode. + * Pros: Less prone to calculation errors. + * Cons: Takes slightly longer to calculate OCP for display. +* **Alternative 2:** Have a global variable for OCP that updates upon any relevant change to the deliverable list. + * Pros: Potentially faster to retrieve OCP information for display (using a getter method). + * Cons: More prone to errors from higher frequency of calculation. -------------------------------------------------------------------------------------------------------------------- @@ -230,86 +491,724 @@ _{Explain here how the data archiving feature will be implemented}_ -------------------------------------------------------------------------------------------------------------------- -## **Appendix: Requirements** - -### Product scope +## **Appendix A: Product Scope** **Target user profile**: * has a need to manage a significant number of contacts -* prefer desktop apps over other types +* has a need to manage a meeting schedule +* has a need to oversee the development of a product +* prefers to have product-related information in a single application +* prefer desktop apps over other types of apps * can type fast * prefers typing to mouse interactions * is reasonably comfortable using CLI apps -**Value proposition**: manage contacts faster than a typical mouse/GUI driven app +**Value proposition**: +* consolidates product-related information such as deliverables, meetings and contacts into one place +* manage their product’s development more comprehensively and conveniently than a typical mouse/GUI driven app + + +## **Appendix B: User Stories** + +Priority Legend: +* `* * *` - High (must be addressed) +* `* *` - Medium (would be nice to address) +* `*` - Low (least likely to be addressed) + +| Priority | As a ... | I can ... | So that I can ... | +| ---------- | ------------------------------------------ | --------------------------------------------------------------------------- | ---------------------------------------------------------- | +| **EPIC A** | Product Manager | track my product’s deliverables | work better towards meeting them | +| `* * *` | Product Manager | add deliverables for the product | keep track of them | +| `* * *` | Product Manager | mark deliverables as completed | know which ones I've done | +| `* * *` | Product Manager | delete deliverables that are no longer relevant | focus on other deliverables | +| `* *` | Product Manager | edit the details of the deliverables | keep them updated | +| `* *` | Product Manager | tag deliverables to different milestones | distinguish the deliverables easily | +| `* *` | Product Manager | add contacts under my deliverables | know who is involved in meeting the deliverable | +| `* *` | Product Manager | edit a deliverable which was wrongly marked done back to its original status| ensure my deliverables are reflected correctly | +| `* *` | Product Manager with many deliverables | search for specific ones | easily find them from my entire list | +| `* *` | Product Manager with many deliverables | have my deliverables sorted chronologically by deadline | look out for more urgent deliverables | +| `* *` | Product Manager | be informed when a deliverable is close to its deadline or has passed it | know which deliverables need more attention | +| **EPIC B** | Product Manager | manage my product-related meetings | be clear on my meeting schedule | +| `* * *` | Product Manager | add new meetings that I'm scheduled for | keep track of them | +| `* * *` | Product Manager | delete my scheduled meetings | remove outdated or cancelled meetings | +| `* *` | Product Manager | edit the details of my scheduled meetings | keep them updated | +| `* *` | Product Manager | add contacts and location under my meetings | know who is involved and where the meeting is taking place | +| `* *` | Product Manager with many meetings | search for specific ones | easily find them from my entire list | +| `* *` | Product Manager with many meetings | have my meetings sorted chronologically by its start time | look out for the earlier meetings that were scheduled | +| `* *` | Product Manager | be informed when a meeting is close to starting, on-going or has ended | be updated on the status of my meetings | +| **EPIC C** | Product Manager | organise my developer or stakeholder contacts | reference them easily | +| `* * *` | Product Manager | add contacts related to the product | store their details for future communication | +| `* * *` | Product Manager | distinguish between developers and stakeholders in a project easily | remember their respective roles | +| `* * *` | Product Manager | delete contacts that are no longer relevant | forget about unimportant contacts | +| `* *` | Product Manager | edit the details of my contacts | keep them updated | +| `* *` | Product Manager with many contacts | search for specific ones | easily find them from my entire list | +| `* *` | Product Manager with many contacts | have my contacts sorted by alphabetical order | keep my contact list organised | +| **EPIC D** | Product Manager | have an overview of my product's development and upcoming events | work better towards production deadlines | +| `* *` | Product Manager | view the overall completion of the product | know the current progress of the product's development | +| `* *` | Product Manager | see a calendar view of my deliverables and meetings | know which product-related events are upcoming and urgent | +| `*` | Product Manager | toggle between daily, weekly and monthly view of the calendar | have a variety of views to see my upcoming events | +| **EPIC E** | forgetful or inexperienced Product Manager | view app instructions and tips | be able to use it as intended | +| `* * *` | Product Manager | receive feedback from the app | know the system has successfully registered my action | +| `* *` | Product Manager | get directions to the app's user guide | easily access the relevant instructions | +| `*` | Product Manager | view a shortcut reference | receive technical solutions immediately for command issues | + +## **Appendix C: Use Cases** + +For all use cases below, the **System** is `Productiv` and the **Actor** is the `user`. + +### General + +**Use case: G01 - Switch Mode** +**MSS** +1. User chooses to switch to another mode. +2. User enters the command to switch mode into the command box. +3. Productiv switches to the expected mode and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * 2a3. Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. -### User stories +**Use case: G02 - Help** -Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*` +**Precondition(s):** +* User has a stable internet connection. -| Priority | As a …​ | I want to …​ | So that I can…​ | -| -------- | ------------------------------------------ | ------------------------------ | ---------------------------------------------------------------------- | -| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App | -| `* * *` | user | add a new person | | -| `* * *` | user | delete a person | remove entries that I no longer need | -| `* * *` | user | find a person by name | locate details of persons without having to go through the entire list | -| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident | -| `*` | user with many persons in the address book | sort persons by name | locate a person easily | +**MSS** +1. User chooses to view instructions on how to use Productiv. +2. User enters the help command into the command box. +3. Productiv shows a help window with a copyable URL to its user guide and displays a success message in the feedback box. +4. User copies the link into their browser and is directed to the user guide. -*{More to be added}* + Use case ends. -### Use cases +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * 2a3. Steps 2a1-2a2 are repeated until the command entered is correct. -(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise) + Use case resumes from step 3. -**Use case: Delete a person** +**Use case: G03 - Exit** **MSS** +1. User chooses to exit Productiv. +2. User enters the exit command into the command box. +3. Productiv closes. -1. User requests to list persons -2. AddressBook shows a list of persons -3. User requests to delete a specific person in the list -4. AddressBook deletes the person + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * 2a3. Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +### Deliverable + +**Use case: D01 - Add a deliverable** + +**Precondition(s):** +* User is in the deliverable mode. + +**Guarantee(s):** +* The dashboard's OCP and Schedule will be updated accordingly. +* The added deliverable will be reflected in the left and right panels. + +**MSS** +1. User chooses to add a deliverable. +2. User enters the command to add a deliverable into the command box. +3. Productiv adds the deliverable into the deliverable list and displays a success message in the feedback box. Use case ends. **Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D02 - Edit a deliverable** + +**Precondition(s):** +* User is in the deliverable mode. +* Deliverable to edit exists. + +**Guarantee(s):** +* The dashboard's Schedule will be updated accordingly. +* The edited deliverable will be reflected in the left and right panels. -* 2a. The list is empty. +**MSS** +1. User chooses to edit a deliverable. +2. User enters the command to edit a deliverable into the command box. +3. Productiv edits the deliverable accordingly and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D03 - Mark a deliverable as completed** - Use case ends. +**Precondition(s):** +* User is in the deliverable mode. +* Deliverable to mark as completed exists. -* 3a. The given index is invalid. +**Guarantee(s):** +* The dashboard's OCP and Schedule will be updated accordingly. +* The deliverable marked as completed will be reflected in the left and right panels. - * 3a1. AddressBook shows an error message. +**MSS** +1. User chooses to mark a deliverable as completed. +2. User enters the command to mark a deliverable as completed into the command box. +3. Productiv marks the deliverable as completed and displays a success message in the feedback box. - Use case resumes at step 2. + Use case ends. -*{More to be added}* +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D04 - Mark a deliverable as on-going** + +**Precondition(s):** +* User is in the deliverable mode. +* Deliverable to mark as on-going exists. + +**Guarantee(s):** +* The dashboard's OCP and Schedule will be updated accordingly. +* The deliverable marked as on-going will be reflected in the left and right panels. -### Non-Functional Requirements +**MSS** +1. User chooses to mark a deliverable as on-going. +2. User enters the command to mark a deliverable as on-going into the command box. +3. Productiv marks the deliverable as on-going and displays a success message in the feedback box. -1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed. -2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage. -3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. + Use case ends. -*{More to be added}* +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D05 - View a deliverable** + +**Precondition(s):** +* User is in the deliverable mode. +* Deliverable to view exists. -### Glossary +**MSS** +1. User chooses to view a deliverable. +2. User enters the command to view a deliverable into the command box. +3. Productiv displays the deliverable in the right panel and displays a success message in the feedback box. -* **Mainstream OS**: Windows, Linux, Unix, OS-X -* **Private contact detail**: A contact detail that is not meant to be shared with others + Use case ends. --------------------------------------------------------------------------------------------------------------------- +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D06 - Find deliverables** + +**Precondition(s):** +* User is in the deliverable mode. +* User has keyword(s) for Productiv to find deliverables with. + +**Guarantee(s):** +* The right panel will be cleared. -## **Appendix: Instructions for manual testing** +**MSS** +1. User chooses to find deliverables. +2. User enters the command and keyword(s) to find deliverables into the command box. +3. Productiv returns all matching deliverables in the left panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D07 - List all deliverables** + +**Precondition(s):** +* User is in the deliverable mode. +* User has at least one existing deliverable in Productiv. + +**Guarantee(s):** +* The right panel will be cleared. + +**MSS** +1. User chooses to list all deliverables. +2. User enters the command to list all deliverables into the command box. +3. Productiv lists out all deliverables in the left panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D08 - Delete a deliverable** + +**Precondition(s):** +* User is in the deliverable mode. +* Deliverable to delete exists. + +**Guarantee(s):** +* The left panel will reflect the updated deliverable list. +* The right panel will be cleared. +* The dashboard's OCP and Schedule will be updated accordingly. +* The deleted deliverable will not have its data stored anymore in Productiv. +* The deleted deliverable cannot be retrieved back. + +**MSS** +1. User chooses to delete a deliverable. +2. User enters the command to delete a deliverable into the command box. +3. Productiv deletes the deliverable from the deliverable list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: D09 - Clear all deliverables** + +**Precondition(s):** +* User is in the deliverable mode. +* User has at least one existing deliverable in Productiv. + +**Guarantee(s):** +* The left and right panels will be cleared. +* The dashboard's OCP and Schedule will be updated accordingly. +* The cleared deliverables will not have its data stored anymore in Productiv. +* The cleared deliverables cannot be retrieved back. + +**MSS** +1. User chooses to clear all deliverables. +2. User enters the command to clear all deliverables into the command box. +3. Productiv clears all deliverables from the deliverable list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +### Meeting + +**Use case: M01 - Add a meeting** + +**Precondition(s):** +* User is in the meeting mode. + +**Guarantee(s):** +* The dashboard's Schedule will be updated accordingly. +* The added meeting will be reflected in the left and right panels. + +**MSS** +1. User chooses to add a meeting. +2. User enters the command to add a meeting into the command box. +3. Productiv adds the meeting into the meeting list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: M02 - Edit a meeting** + +**Precondition(s):** +* User is in the meeting mode. +* Meeting to edit exists. + +**Guarantee(s):** +* The dashboard's Schedule will be updated accordingly. +* The edited meeting will be reflected in the left and right panels. + +**MSS** +1. User chooses to edit a meeting. +2. User enters the command to edit a meeting into the command box. +3. Productiv edits the meeting accordingly and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: M03 - View a meeting** + +**Precondition(s):** +* User is in the meeting mode. +* Meeting to view exists. + +**MSS** +1. User chooses to view a meeting. +2. User enters the command to view a meeting into the command box. +3. Productiv displays the meeting in the right panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: M04 - Find meetings** + +**Precondition(s):** +* User is in the meeting mode. +* User has keyword(s) for Productiv to find meetings with. + +**Guarantee(s):** +* The right panel will be cleared. + +**MSS** +1. User chooses to find meetings. +2. User enters the command and keyword(s) to find meetings into the command box. +3. Productiv returns all matching meetings in the left panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: M05 - List all meetings** + +**Precondition(s):** +* User is in the meeting mode. +* User has at least one existing meeting in Productiv. + +**Guarantee(s):** +* The right panel will be cleared. + +**MSS** +1. User chooses to list all meetings. +2. User enters the command to list all meetings into the command box. +3. Productiv lists out all meetings in the left panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: M06 - Delete a meeting** + +**Precondition(s):** +* User is in the meeting mode. +* Meeting to delete exists. + +**Guarantee(s):** +* The left panel will reflect the updated meeting list. +* The right panel will be cleared. +* The dashboard's Schedule will be updated accordingly. +* The deleted meeting will not have its data stored anymore in Productiv. +* The deleted meeting cannot be retrieved back. + +**MSS** +1. User chooses to delete a meeting. +2. User enters the command to delete a meeting into the command box. +3. Productiv deletes the meeting from the meeting list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: M07 - Clear all meetings** + +**Precondition(s):** +* User is in the meeting mode. +* User has at least one existing meeting in Productiv. + +**Guarantee(s):** +* The left and right panels will be cleared. +* The dashboard's Schedule will be updated accordingly. +* The cleared meetings will not have its data stored anymore in Productiv. +* The cleared meetings cannot be retrieved back. + +**MSS** +1. User chooses to clear all meetings. +2. User enters the command to clear all meetings into the command box. +3. Productiv clears all meetings from the meeting list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +### Contact + +**Use case: C01 - Add a contact** + +**Precondition(s):** +* User is in the contact mode. + +**Guarantee(s):** +* The added contact will be reflected in the left and right panels. + +**MSS** +1. User chooses to add a contact. +2. User enters the command to add a contact into the command box. +3. Productiv adds the contact into the contact list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: C02 - Edit a contact** + +**Precondition(s):** +* User is in the contact mode. +* Contact to edit exists. + +**Guarantee(s):** +* The edited contact will be reflected in the left and right panels. + +**MSS** +1. User chooses to edit a contact. +2. User enters the command to edit a contact into the command box. +3. Productiv edits the contact accordingly and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: C03 - View a contact** + +**Precondition(s):** +* User is in the contact mode. +* Contact to view exists. + +**MSS** +1. User chooses to view a contact. +2. User enters the command to view a contact into the command box. +3. Productiv displays the contact in the right panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: C04 - Find contacts** + +**Precondition(s):** +* User is in the contact mode. +* User has keyword(s) for Productiv to find contacts with. + +**Guarantee(s):** +* The right panel will be cleared. + +**MSS** +1. User chooses to find contacts. +2. User enters the command and keyword(s) to find contacts into the command box. +3. Productiv returns all matching contacts in the left panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: C05 - List all contacts** + +**Precondition(s):** +* User is in the contact mode. +* User has at least one existing contact in Productiv. + +**Guarantee(s):** +* The right panel will be cleared. + +**MSS** +1. User chooses to list all contacts. +2. User enters the command to list all contacts into the command box. +3. Productiv lists out all contacts in the left panel and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: C06 - Delete a contact** + +**Precondition(s):** +* User is in the contact mode. +* Contact to delete exists. + +**Guarantee(s):** +* The left panel will reflect the updated contact list. +* The right panel will be cleared. +* The deleted contact will not have its data stored anymore in Productiv. +* The deleted contact cannot be retrieved back. + +**MSS** +1. User chooses to delete a contact. +2. User enters the command to delete a contact into the command box. +3. Productiv deletes the contact from the contact list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +**Use case: C07 - Clear all contacts** + +**Precondition(s):** +* User is in the contact mode. +* User has at least one existing contact in Productiv. + +**Guarantee(s):** +* The left and right panels will be cleared. +* The cleared contacts will not have its data stored anymore in Productiv. +* The cleared contacts cannot be retrieved back. + +**MSS** +1. User chooses to clear all contacts. +2. User enters the command to clear all contacts into the command box. +3. Productiv clears all contacts from the contact list and displays a success message in the feedback box. + + Use case ends. + +**Extensions** +* 2a. Productiv detects an error in the command. + * 2a1. Productiv displays an error message in the feedback box. + * 2a2. User enters the command again. + * Steps 2a1-2a2 are repeated until the command entered is correct. + + Use case resumes from step 3. + +## **Appendix D: Non-Functional Requirements** + +1. Should work on any [`mainstream OS`](#appendix-e-glossary) as long as Java `11` is installed and is the default. +1. Should be able to hold up to 1000 deliverables, 1000 meetings and 1000 contacts without noticeable sluggishness in performance for typical usage. +1. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. This excludes the Switch and Help command. +1. The user interface should look intuitive and simple to navigate. It should not look cluttered with too many panels. +1. The application should be for a single user, with its size being smaller than 100MB. + +## **Appendix E: Glossary** + +* **Deliverable**: An item to be completed as part of the product development process. +* **Mainstream OS**: Windows, Unix, OS-X. +* **Milestone**: A stage in the software development process associated with a particular group of deliverables. +* **Mode**: The state of the application that affects how each command will be executed. The app can be in dashboard, deliverable, meeting or contact mode. +* **OCP**: Overall Completion Percentage. It is a donut chart showing the project's completion status, found on the left panel of the Dashboard. +* **Role**: A function assumed or part played by a `Contact`/`Person`, who is either a developer or stakeholder. +* **Stakeholder**: An external party involved with the product. + +## **Appendix F: Instructions for Manual Testing** Given below are instructions to test the app manually.
:information_source: **Note:** These instructions only provide a starting point for testers to work on; -testers are expected to do more *exploratory* testing. +testers are expected to do more *exploratory* testing. Each test case is to be executed independently of each other.
@@ -317,40 +1216,124 @@ testers are expected to do more *exploratory* testing. 1. Initial launch - 1. Download the jar file and copy into an empty folder + 1. Prerequisite: You have Java `11` installed in your computer (it should be your default Java version). - 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. + 1. Test case: Download the .jar file from [here](https://github.com/AY2021S1-CS2103T-F11-2/tp/releases) and copy into an empty folder. + From the terminal, navigate to the folder containing the .jar file and enter `java -jar productiv.jar` to start *Productiv*.
+ Expected: Shows the GUI with a dashboard containing some sample data. The window size may not be optimum.
1. Saving window preferences - 1. Resize the window to an optimum size. Move the window to a different location. Close the window. - - 1. Re-launch the app by double-clicking the jar file.
+ 1. Test case: Resize the window to an optimum size. Move the window to a different location. Close the window. Re-launch the app.
Expected: The most recent window size and location is retained. -1. _{ more test cases …​ }_ +
:information_source: **Note:** The window has a minimum width and height so that the UI does not look so cramped. +
+ +1. Shutting down + + 1. Test case: Click the window close button.
+ Expected: The app shuts down. + + 1. Test case: `exit`
+ Expected: Similar to previous. + +### Switching Modes + +1. Switching to deliverable mode + + 1. Prerequisite: You are not in deliverable mode. -### Deleting a person + 1. Test case: Click `Deliverable` on the top navigation bar.
+ Expected: Window displays list of saved deliverables. -1. Deleting a person while all persons are being shown + 1. Test case: `switch dv`
+ Expected: Similar to previous. - 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list. + 1. Other incorrect switch commands to try: `switch meeting`, `switch dev`
+ Expected: Status bar throws error message. - 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated. +### Adding a deliverable - 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. +1. Adding Login screen - 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
- Expected: Similar to previous. + 1. Prerequisites: You are in deliverable mode. The deliverable `Login screen` is not already added. If it is already added, delete it. -1. _{ more test cases …​ }_ + 1. Test case: `add t/Login screen by/10-10-2020 18:00 m/1.1 c/Jordan Woods, Betsy Crowe d/Include email and password fields`
+ Expected: The deliverable `Login screen` is added to the list of deliverables and is expanded in the right panel. + + 1. Test case: `add t/Login screen`
+ Expected: No deliverable is added. Status bar throws error message. + + 1. Other incorrect add commands to try: `add`, `add Login screen`
+ Expected: Status bar throws error message. ### Saving data -1. Dealing with missing/corrupted data files +1. Deliverables, meetings and contacts are saved automatically to ./data/. + + On normal usage, data is saved to 3 JSON files - `deliverablebook.json`, `meetingbook.json` and `contactbook.json`. + All 3 files contain information stored by the user from the respective modes. + + 1. Prerequisites: Very first time using the application. Delete all files under ./data/ if not the first time using the application. + + 1. Test case: Start and close the app immediately.
+ Expected: The 3 JSON files are not created. + + 1. Test case: Start the app. Switch to deliverable mode. Enter `list`. Close the app.
+ Expected: Of the 3 JSON files, only `deliverablebook.json` created. + +1. Dealing with missing or corrupted data files + + 1. Test case: Delete `deliverablebook.json` file. Start the app. Switch to deliverable mode. Enter `list`. Close the app.
+ Expected: `deliverablebook.json` should re-initialise a list of sample deliverables. + + 1. Test case: Corrupt `deliverablebook.json` under ./data/. Add a (`-`) to a saved deliverable's milestone.
+ Expected: The app should be able to start up but show no deliverables. + +
:information_source: **Note:** To re-initialise a list of sample deliverables, execute the previous test case. +
+ + +## **Appendix G: Effort** + +| Feature | AB3 | Productiv | +| ----------- | ------- | ------------ | +| LoC | ~9k | ~20k | +| Difficulty | 10 | 15 | +| Effort | 10 | 15 | + + + +**Understanding our target user profile** + +Initially, we had completely different ideas on what our target user profile is. We were confused about the differences between product owners, product managers, business analysts and project leads. + +To ensure that we were all on the same page, we made sure to talk things out before starting our project. We researched on the job scope of a product manager and shared with each other our experiences of working in different organisations and what product managers do at these organisations. + +Eventually, our shared understanding on our target user profile helped us to build a cohesive product catered to product managers. + + +**Model** + +The `Model` of Productiv is certainly more complex than that of AddressBook. In AddressBook, there was only one key entity type in play - `Person`. For Productiv, three different entity types are managed at once - `Deliverable`, `Meeting` and `Person`. + +As such, we had to restructure our entire application to accommodate these three entity types. Throughout the project, we had to rethink and refactor the structure of our code, weighing the pros and cons of each approach. This was a very painful process and also vulnerable to regressions. + +Eventually, we separated the models into three different `ModelManager`s, handled by three different `LogicManager`s, adhering to the Separation of Concerns Principle. The reduced coupling decreased the dependencies between the models. + +This also influenced our decision to not link the `Contacts` field in `Deliverable` and `Meeting` to data in the `Person` model. This also provided greater flexibility to users as they could add contacts to `Deliverable`s and `Meeting`s without recording the details of the contact, e.g. a `Meeting` can involve people who are not important to record as a `Person`. + + +**Ui** + +The `Ui` of Productiv was almost entirely revamped from the AddressBook. + +The easiest way would have been to stick to the current `Ui` of the AddressBook i.e. have 3 lists (`DeliverableListPanel`, `MeetingListPanel` and `PersonListPanel`) on the same page. While this would have been easier to implement, it would have made Productiv look very cluttered. We chose the hard way as we believe in making the user-experience seamless and enjoyable. As such, we worked hard to have the `Ui` change according to the current mode the user is in and also create an entirely new View Panel to enhance the user experience. + +The `Dashboard` was difficult to implement. In particular, the OCP was definitely not something that could be done overnight. None of us had experience with JavaFX prior to CS2103T. We did extensive research on the libraries that we could use and exhaustive checks to ensure that the OCP was synced with the rest of Productiv. Eventually, we managed to create the OCP, which vastly improved the user experience. + - 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ +**Overall** -1. _{ more test cases …​ }_ +As a whole, this process was fraught with challenges. Whenever we had to face obstacles, we worked with each other to brainstorm and decide on the best solution. We made sure that everyone followed the same workflow and reviewed each other’s work to maintain the code quality of our codebase. We have learnt alot from each other, beyond just technical skills. Productiv would not have been possible without the hard work and commitment of the entire team. diff --git a/docs/SettingUp.md b/docs/SettingUp.md index 77667c6d581..d18390acc92 100644 --- a/docs/SettingUp.md +++ b/docs/SettingUp.md @@ -19,7 +19,7 @@ Follow the steps in the following guide precisely. Things will not work out if y First, **fork** this repo, and **clone** the fork into your computer. If you plan to use Intellij IDEA (highly recommended): -1. **Configure the JDK**: Follow the guide [_[se-edu/guides] IDEA: Configuring the JDK_](https://se-education.org/guides/tutorials/intellijJdk.html) to to ensure Intellij is configured to use **JDK 11**. +1. **Configure the JDK**: Follow the guide [_[se-edu/guides] IDEA: Configuring the JDK_](https://se-education.org/guides/tutorials/intellijJdk.html) to ensure Intellij is configured to use **JDK 11**. 1. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into IDEA.
:exclamation: Note: Importing a Gradle project is slightly different from importing a normal Java project. 1. **Verify the setup**: @@ -45,11 +45,4 @@ If you plan to use Intellij IDEA (highly recommended): 1. **Learn the design** - When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [AddressBook’s architecture](DeveloperGuide.md#architecture). - -1. **Do the tutorials** - These tutorials will help you get acquainted with the codebase. - - * [Tracing code](tutorials/TracingCode.md) - * [Removing fields](tutorials/RemovingFields.md) - * [Adding a new command](tutorials/AddRemark.md) + When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [Productiv’s architecture](DeveloperGuide.md#architecture). diff --git a/docs/Testing.md b/docs/Testing.md index 8a99e82438a..763517331da 100644 --- a/docs/Testing.md +++ b/docs/Testing.md @@ -28,9 +28,9 @@ There are two ways to run tests. This project has three types of tests: -1. *Unit tests* targeting the lowest level methods/classes.
- e.g. `seedu.address.commons.StringUtilTest` -1. *Integration tests* that are checking the integration of multiple code units (those code units are assumed to be working).
- e.g. `seedu.address.storage.StorageManagerTest` -1. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together.
- e.g. `seedu.address.logic.LogicManagerTest` +* *Unit tests* that target the lowest level methods/classes.
+ e.g. `seedu.address.commons.util.StringUtilTest` +* *Integration tests* that check the integration of multiple code units (assumed to be working).
+ e.g. `seedu.address.storage.StoragePersonManagerTest` +* *Hybrids of unit and integration tests* that check multiple code units as well as how they are connected together.
+ e.g. `seedu.address.logic.LogicPersonManagerTest` diff --git a/docs/UserGuide.md b/docs/UserGuide.md index b91c3bab04d..d7ba9fb218b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -2,39 +2,73 @@ layout: page title: User Guide --- - -AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps. - * Table of Contents {:toc} -------------------------------------------------------------------------------------------------------------------- +## Introduction +### Overview +Productiv is a one-stop desktop app for product managers like yourself to organise your **deliverables**, +**meetings** and **contacts** so that you can track your product's development easily. + +Productiv is optimized for use via Command Line Interface (CLI). Thus, if you like to type and/or type fast, +Productiv has just become better for you. Nevertheless, Productiv still has the benefits of a Graphical User Interface (GUI). + + +### Preview +To get you familiarised, the following is Productiv's GUI. + + ![Ui](images/UiLabel.jpg) +
Dashboard

+ +
+ + **:information_source: GUI components:**
+ + 1. **Navigation bar**: where you navigate to other modes.
+ 1. **Command box**: where you enter your commands.
+ 1. **Feedback box**: where you can see the feedback of your command. + If your command is successful, you can see a success message. + Otherwise, you can see an error message.
+ 1. **Left panel**: where you can view
+ * your product's overall completion percentage (in dashboard mode), or
+ * your list of deliverables, meetings, or contacts (in deliverable, meeting, or contact mode)
+ 1. **Right panel**: where you can view
+ * your product management schedule (in dashboard mode), or
+ * an expanded view of your selected deliverable, meeting, or contact (in deliverable, meeting, or contact mode)
+ + Note: For modes other than the dashboard, you can see your file path at the bottom of your GUI. +
-## Quick start -1. Ensure you have Java `11` or above installed in your Computer. +## Quick start -1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). +1. Ensure you have Java `11` installed in your computer (it should be your default Java version). -1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. +1. Download the latest `productiv.jar` from [here](https://github.com/AY2021S1-CS2103T-F11-2/tp/releases). -1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
- ![Ui](images/Ui.png) +1. Copy the .jar file to an empty folder. -1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
- Some example commands you can try: +1. From your terminal, navigate to the folder containing the .jar file and enter `java -jar productiv.jar` to start Productiv. +Your dashboard should appear in a few seconds. +Note that the app contains some sample data.
- * **`list`** : Lists all contacts. + ![Ui](images/Ui.png) +
Dashboard

+ +1. Type a command in the command box and press Enter to execute it. +Here is a sequence of example commands you can try:
- * **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book. + 1. `switch dv`: Switches to deliverable mode. - * **`delete`**`3` : Deletes the 3rd contact shown in the current list. + 1. `add t/Find profile page template by/11-12-2020 12:00 m/2.1.1`: Adds a deliverable with the + title `Find profile page template`, deadline `11-12-2020 12:00` and milestone `2.1.1`. - * **`clear`** : Deletes all contacts. + 1. `delete 1`: Deletes the 1st deliverable shown. - * **`exit`** : Exits the app. + 1. `exit`: Exits the app. -1. Refer to the [Features](#features) below for details of each command. +1. Refer to [Features](#features) below for details of each available command. -------------------------------------------------------------------------------------------------------------------- @@ -44,135 +78,553 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo **:information_source: Notes about the command format:**
-* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. - -* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. +* Words in upper case are the parameters to be supplied by you for their respective fields.
+ e.g. in `add n/NAME`, `NAME` is a parameter for the name field `n`, which can be used as `add n/Jason`.
+:bulb: **Tip:** If you are not sure what specific parameter to supply for any of the required fields, supply an estimate or random value as place holder.
-* Items with `…`​ after them can be used multiple times including zero times.
- e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. +* Field-parameter pairs in square brackets are optional.
+ e.g `n/NAME [p/PHONE]` can be used as `n/Jason p/98890112` or as `n/Jason`. -* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. +* Field-parameter pairs can be in any order.
+ e.g. if the command specifies `n/NAME e/EMAIL`, `e/EMAIL n/NAME` is also acceptable. + +* If multiple and/or repeat parameters are provided for the same field, only the last parameter will be accepted.
+ e.g. if you input the command `add r/dev n/NAME r/stk e/EMAIL r/stk`, it will be accepted as `add n/NAME r/stk e/EMAIL`. +* For single-word commands without fields, any word(s) following it will be ignored.
+ e.g. if you input the command `list everything please`, it will be accepted as `list`.
-### Viewing help : `help` -Shows a message explaning how to access the help page. +### General + +#### Switching modes: `switch` + +Switches to dashboard, deliverable, meeting or contact mode. + +Format: `switch MODE` +* `MODE` can be `db` (dashboard), `dv` (deliverable), `m` (meeting) or `c` (contact). +* `switch` `dv`, `m` or `c` will display information related to your deliverables, meetings and contacts respectively, +e.g. `switch c` will display your contacts. +* `switch db` will display your project's completion status and your own schedule. +* How the commands will be executed depend on which mode you are currently in, e.g. `delete 1` in meeting mode deletes the 1st meeting shown. -![help message](images/helpMessage.png) +Examples: +* `switch db` switches to dashboard mode. +* `switch m` switches to meeting mode. + +#### Viewing help: `help` + +Shows a message directing you to this User Guide. +![help](images/helpMessage.JPG) Format: `help` +#### Exiting Productiv: `exit` + +Exits the program. + +Format: `exit` + +#### Saving the data + +Productiv automatically saves any changes that you made, to your computer's hard disk. +Hence, you can focus on managing your product without fearing any unsaved changes. + -### Adding a person: `add` +### Dashboard -Adds a person to the address book. +The [dashboard](#preview) gives you an overview of information related to your product. +The dashboard is the default landing page of Productiv. +Whenever you start up Productiv, you will be brought to dashboard mode. -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` +The Overall Completion Percentage (OCP) will be displayed in the left panel. The OCP gives you a quick overview of the progress of your product’s development. + +Your schedule will be displayed in the right panel. The schedule contains all your deliverables and meetings, chronologically sorted. + + +
+ +**:information_source: Note:** There are no commands specific to the Dashboard. +You can only use commands found under [General](#general). + +
+ +### Deliverable + + ![Ui](images/Deliverable.png) +
Initial display of a deliverable list
+ +
+ +**:information_source: Note:** You must be in the deliverable mode to execute the following commands. +Refer to [switch](#switching-modes-switch) for more information. -
:bulb: **Tip:** -A person can have any number of tags (including 0) +
+ +#### Adding a deliverable: `add` + +Adds a deliverable to your deliverable list. + +Format: `add t/TITLE by/DEADLINE m/MILESTONE [c/CONTACTS] [d/DESCRIPTION]` +* `TITLE` is the main heading of the deliverable. +* `DEADLINE` is the due date time of the deliverable in dd-MM-yyyy HH:mm format. +* `DEADLINE` can be in the past but must not be earlier than the year 2019. +* `MILESTONE` is the milestone tagged to the deliverable. +* `MILESTONE` is a non-negative integer, or a period-separated string of non-negative integers, e.g. `2`, `14.2.1`. +* `CONTACTS` represents the contact(s) involved in seeing through the deliverable. +* `CONTACTS` is a name, or a comma-separated string of names, e.g. `conan`, `nancy, drew, paul`. +* `DESCRIPTION` contains additional information about the deliverable, e.g. sub-requirements. + +
+ +**:information_source: Notes:**
+ +* As `CONTACTS` is not related to your contact list, you can include those not present in it. + +* You cannot add a deliverable with the same `TITLE` and `DEADLINE` as an existing deliverable. + +* All newly-added deliverables will be assigned the `on-going` tag regardless of their deadline. You will +need to manually mark past deliverables as `completed`. Refer to +[Marking a deliverable as completed](#marking-a-deliverable-as-completed-done) below for more details on +the `done` command. + +
+ +Examples: +* `add t/Login screen by/10-10-2020 18:00 m/1.1 c/Jordan Woods, Betsy Crowe d/Include email and password fields` +adds a deliverable with the title `Login screen`, deadline `10-10-2020 18:00`, +milestone `1.1`, contacts `Jordan Woods, Betsy Crowe` and description `Include email and password fields`. +* `add t/Find profile page template by/08-12-2020 12:00 m/2.1.1` +adds a deliverable with the title `Find profile page template`, deadline `08-12-2020 12:00` and milestone `2.1.1`. + +#### Editing a deliverable: `edit` + +Edits an existing deliverable in your displayed deliverable list. + +Format: `edit INDEX [t/TITLE] [by/DEADLINE] [m/MILESTONE] [c/CONTACTS] [d/DESCRIPTION] ` +* `INDEX` is the index number of the deliverable in your displayed deliverable list. +* `INDEX` must be a positive integer. +* At least one of the fields of the deliverable must be changed. +* The existing values of the specified deliverable will be updated to the input values. +* You can clear an optional field by inputting an empty parameter, e.g. `edit 1 d/` will empty the description of the 1st deliverable. + +
+ +**:information_source: Note:** You cannot edit a deliverable to have the same `TITLE` and `DEADLINE` as an existing deliverable. +
Examples: -* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal` +* `edit 1 d/Must include username, email and password fields by/15-12-2020 12:00` +edits the description of the 1st deliverable to be `Must include username, email and password fields` +and its deadline to be `15-12-2020 12:00`. +* `edit 2 c/` clears the optional contacts field of the 2nd deliverable. + +#### Marking a deliverable as completed: `done` + +Marks the specified deliverable from your displayed deliverable list as completed. + +Format: `done INDEX` +* `INDEX` is the index number of the deliverable in your displayed deliverable list. +* `INDEX` must be a positive integer. + +Example: +* `done 1` marks the 1st deliverable in your displayed deliverable list as completed. + +#### Marking a deliverable as on-going: `undone` + +Marks the specified deliverable from your displayed deliverable list as on-going. + +Format: `undone INDEX` +* `INDEX` is the index number of the deliverable in your displayed deliverable list. +* `INDEX` must be a positive integer. + +Example: +* `undone 1` marks the 1st deliverable in your displayed deliverable list as on-going. + +#### Viewing a deliverable: `view` + +Displays more details of the specified deliverable from your displayed deliverable list. -### Listing all persons : `list` +Format: `view INDEX` +* `INDEX` is the index number of the deliverable in your displayed deliverable list. +* `INDEX` must be a positive integer. -Shows a list of all persons in the address book. +Example: +* `view 2` views the 2nd deliverable in your displayed deliverable list. + + ![Ui](images/DeliverableView.png) +
Viewing a deliverable

+ +#### Finding deliverables: `find` + +Finds the deliverables whose titles or descriptions contain any of the given keywords. + +Format: `find KEYWORDS` +* `KEYWORDS` contains one or more keywords used to match deliverables. +* Searches only consider title and description. +* Searches are case-insensitive, e.g. `homepage` will match `Homepage`. +* Order of keywords does not matter, e.g. `Homepage Navigation` will match `Navigation Homepage`. +* Searches only account for full words, e.g. `Deploy` will not match `Deployment` but `Stand-up` will match `Up button` and `Laptop stand`. +* Searches return deliverables matching at least one keyword, e.g. `Homepage Navigation` will return `Complete Homepage` and `Increase size of Navigation Bar`. + +Examples: +* `find mock-up urgent` returns a deliverable with title `Finish mock-ups` and another with description `This is urgent and important!`. +* `find plan` returns a deliverable with title `Finalise design and plan` and another with description `Reminder to plan time wisely.`. + +#### Listing all deliverables: `list` + +Lists out all deliverables in your deliverable list, if any. Format: `list` -### Editing a person : `edit` +
:bulb: + +**Tip:** Use this command when you want to list all your deliverables back after using the `find` command. +Refer to [Finding deliverables](#finding-deliverables-find) above for details of the `find` command. +
+ +#### Deleting a deliverable: `delete` + +Deletes the specified deliverable from your deliverable list. + +Format: `delete INDEX` +* `INDEX` is the index number of the deliverable in your displayed deliverable list. +* `INDEX` must be a positive integer. + +Example: +* `delete 2` deletes the 2nd deliverable in your deliverable list. + +#### Clearing all deliverables: `clear` + +Clears all deliverables from your deliverable list, if any. + +Format: `clear` + +### Meeting + + ![Ui](images/Meeting.png) +
Initial display of a meeting list
+ +
+ +**:information_source: Note:** You must be in the meeting mode to execute the following commands. +Refer to [switch](#switching-modes-switch) for more information. + +
+ +#### Adding a meeting: `add` + +Adds a meeting to your meeting list. + +Format: `add t/TITLE from/FROM to/TO [c/CONTACTS] [l/LOCATION] [d/DESCRIPTION]` +* `TITLE` is the main heading of the meeting. +* `FROM` is the start date and time of the meeting in dd-MM-yyyy HH:mm format. +* `FROM` can accept dates in the past but must not be earlier than the year 2019. +* `TO` is the end time of the meeting in HH:mm format. +* `CONTACTS` represents the contact(s) involved in the meeting. +* `CONTACTS` is a name, or a comma-separated string of names, e.g. `conan`, `nancy, drew, paul`. +* `LOCATION` is the location of the meeting. +* `DESCRIPTION` contains additional details about the meeting, e.g. agenda. + +
+ +**:information_source: Notes:**
-Edits an existing person in the address book. +* Different meetings may have overlapping timings as you may wish to send a representative for your clashing meetings. -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` +* As `CONTACTS` is not related to your contact list, you can include those not present in it. -* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​ -* At least one of the optional fields must be provided. -* Existing values will be updated to the input values. -* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. -* You can remove all the person’s tags by typing `t/` without - specifying any tags after it. +* You cannot add a meeting with the same `TITLE`, `FROM` and `TO` as an existing meeting. + +
+ +Example: +* `add t/Discuss app requirements from/11-12-2020 09:00 to/10:00 c/Jordan Woods, Betsy Crowe d/Refine with business associates` +adds a meeting with the title `Discuss app requirements`, start date and time `11-12-2020 09:00`, +end time `10:00`, contacts `Jordan Woods, Betsy Crowe` and description `Refine with business associates`. +* `add t/User research review from/15-12-2020 13:00 to/15:00 l/Meeting room A` +adds a meeting with the title `User research review`, start date and time `15-12-2020 13:00`, +end time `15:00` and location `Meeting room A`. + +#### Editing a meeting: `edit` + +Edits an existing meeting in your displayed meeting list. + +Format: `edit INDEX [t/TITLE] [from/FROM] [to/TO] [c/CONTACTS] [l/LOCATION] [d/DESCRIPTION]` +* `INDEX` is the index number of the meeting in your displayed meeting list. +* `INDEX` must be a positive integer. +* At least one of the fields of the meeting must be changed. +* The existing values of the specified meeting will be updated to the input values. +* You can clear an optional field by inputting an empty parameter, e.g. `edit 1 d/` will empty the description of the 1st meeting. + +
+ +**:information_source: Note:** You cannot edit a meeting to have the same `TITLE`, `FROM` and `TO` as an existing meeting. + +
Examples: -* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. -* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. +* `edit 2 t/Discuss final release features d/Finalise dashboard functions` +edits the title of the 2nd meeting to be `Discuss final release features` +and its description to be `Finalise dashboard functions`. +* `edit 4 c/` clears the optional contact field of the 4th meeting. + +#### Viewing a meeting: `view` -### Locating persons by name: `find` +Displays more details of the specified meeting from your displayed meeting list. -Finds persons whose names contain any of the given keywords. +Format: `view INDEX` +* `INDEX` is the index number of the meeting in your displayed meeting list. +* `INDEX` must be a positive integer. -Format: `find KEYWORD [MORE_KEYWORDS]` +Example: +* `view 2` views the 2nd meeting in your meeting list. -* The search is case-insensitive. e.g `hans` will match `Hans` -* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` -* Only the name is searched. -* Only full words will be matched e.g. `Han` will not match `Hans` -* Persons matching at least one keyword will be returned (i.e. `OR` search). - e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang` + ![Ui](images/MeetingView.png) +
Viewing a meeting

+ +#### Finding meetings: `find` + +Finds the meetings whose titles or descriptions contain any of the given keywords. + +Format: `find KEYWORDS` +* `KEYWORDS` contains one or more keywords used to match meetings. +* Searches only consider title and description. +* Searches are case-insensitive, e.g. `version` will match `Version`. +* Order of keywords does not matter, e.g. `v1.2 mid` will match `mid v1.2`. +* Searches only account for full words, e.g. `Meeting` will not match `Meetings`. +* Searches return meetings matching at least one keyword, e.g. `Complete game` will return `Complete features` and `Final game`. Examples: -* `find John` returns `john` and `John Doe` -* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png) +* `find Survey` returns a meeting with title `Survey potential customers` and another with description `Don't forget to present survey results.`. +* `find consult goals` returns a meeting with title `Consult about marketing goals` and another with description `Goals must be achieved!`. + +#### Listing all meetings: `list` + +Lists out all meetings in your meeting list, if any. + +Format: `list` + +
:bulb: + +**Tip:** Use this command when you want to list all your meetings back after using the `find` command. +Refer to [Finding meetings](#finding-meetings-find) above for details of the `find` command. +
-### Deleting a person : `delete` +#### Deleting a meeting: `delete` -Deletes the specified person from the address book. +Deletes the specified meeting from your displayed meeting list. Format: `delete INDEX` +* `INDEX` is the index number of the meeting in your displayed meeting list. +* `INDEX` must be a positive integer. + +Example: +* `delete 3` deletes the 3rd meeting in your displayed meeting list. + +#### Clearing all meetings: `clear` + +Clears all meetings from your meeting list, if any. + +Format: `clear` + +### Contact + + ![contact](images/Contact.png) +
Initial display of a contact list
+ +
+ +**:information_source: Note:** You must be in the contact mode to execute the following commands. +Refer to [switch](#switching-modes-switch) for more information. + +
+ +#### Adding a contact: `add` -* Deletes the person at the specified `INDEX`. -* The index refers to the index number shown in the displayed person list. -* The index **must be a positive integer** 1, 2, 3, …​ +Adds a developer or stakeholder to your contact list. + +Format: `add n/NAME r/ROLE e/EMAIL [p/PHONE] [d/DESCRIPTION]` +* `NAME` is the name of the contact. +* `NAME` should only take alphabetic characters and (optionally) spaces. +* `ROLE` is the type of contact, either `dev` (developer) or `stk` (stakeholder). +* `EMAIL` is the email address of the contact. +* `PHONE` is the phone number of the contact. +* `PHONE` should only contain numbers, and must be at least 3-digits long. +* `DESCRIPTION` contains additional information about the contact, such as their job position. + +
+ +**:information_source: Note:** You cannot add a contact with the same `NAME` and `EMAIL` as an existing contact. + +
+ +
:bulb: + +**Tip:** Leave out the + sign for `PHONE`s with country codes. + +
Examples: -* `list` followed by `delete 2` deletes the 2nd person in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. +* `add n/Jordan Woods r/dev e/jordanwoods@glutter.com p/81234567` +adds a developer with the name `Jordan Woods`, email `jordanwoods@glutter.com` and phone number `81234567`. +* `add n/Betsy Crowe r/stk e/betsybet872@pmail.com` +adds a stakeholder with the name `Betsy Crowe` and email `betsybet872@pmail.com`. -### Clearing all entries : `clear` +#### Editing a contact: `edit` -Clears all entries from the address book. +Edits an existing contact in your displayed contact list. -Format: `clear` +Format: `edit INDEX [n/NAME] [r/ROLE] [e/EMAIL] [p/PHONE] [d/DESCRIPTION]` +* `INDEX` is the index number of the contact in your displayed contact list. +* `INDEX` must be a positive integer. +* At least one of the fields of the contact must be changed. +* The existing values of the specified contact will be updated to the input values. +* You can clear an optional field by inputting an empty parameter, e.g. `edit 1 d/` will empty the description of the 1st contact. -### Exiting the program : `exit` +
-Exits the program. +**:information_source: Note:** You cannot edit a contact to have the same `NAME` and `EMAIL` as an existing contact. + +
-Format: `exit` +Examples: +* `edit 1 e/jeremysand@glutter.com p/81234567` +edits the email and phone number of the 1st contact to be `jeremysand@glutter.com` and `81234567` respectively. +* `edit 2 p/` +clears the optional phone field of the 2nd contact. -### Saving the data +#### Viewing a contact: `view` -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +Displays more details of the specified contact from your displayed contact list. -### Archiving data files `[coming in v2.0]` +Format: `view INDEX` +* `INDEX` is the index number of the contact in your displayed contact list. +* `INDEX` must be a positive integer. -_{explain the feature here}_ +Example: +* `view 2` views the 2nd contact in your contact list. + + ![Ui](images/ContactView.png) +
Viewing a contact

+ +#### Finding contacts: `find` + +Finds the contacts whose names or descriptions contain any of the given keywords. + +Format: `find KEYWORDS` +* `KEYWORDS` contains one or more keywords used to match contacts. +* Searches only consider name and description. +* Searches are case-insensitive, e.g. `hans` will match `Hans`. +* Order of keywords does not matter, e.g. `Hans Bo` will match `Bo Hans`. +* Searches only account for full words, e.g. `Han` will not match `Hans`. +* Searches return contacts matching at least one keyword, e.g. `Hans Bo` will return `Hans Seed` and `Bo Yarns`. + +Examples: +* `find alex yeoh` returns a contact with name `Alex Yeoh` and another with description `Business analyst. Alex works with him.`. +* `find Johnson` returns a contact with name `Amber Johnson` and another with description `Works at Johnson & Johnson`. + +#### Listing all contacts: `list` + +Lists out all contacts from your contact list, if any. + +Format: `list` + +
:bulb: + +**Tip:** Use this command when you want to list all your contacts back after using the `find` command. +Refer to [Finding contacts](#finding-contacts-find) above for details of the `find` command. +
+ +#### Deleting a contact: `delete` + +Deletes the specified contact from your displayed contact list. + +Format: `delete INDEX` +* `INDEX` is the index number of the contact in your displayed contact list. +* `INDEX` must be a positive integer. + +Example: +* `delete 3` deletes the 3rd contact in the displayed contact list. + +#### Clearing all contacts: `clear` + +Clears all contacts from your contact list, if any. + +Format: `clear` -------------------------------------------------------------------------------------------------------------------- ## FAQ -**Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous AddressBook home folder. +**Q**: How do I start using Productiv?
+**A**: You can refer to our [Quick Start Guide](#quick-start). --------------------------------------------------------------------------------------------------------------------- +**Q**: Which operating systems can I run Productiv on?
+**A**: Currently, Productiv is supported on both Windows and Mac. Just ensure +that you have Java `11` installed on your computer and it is your default Java version. + +--------------------------------------------------------------------------------------------------------------------- ## Command summary -Action | Format, Examples ---------|------------------ -**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` -**Clear** | `clear` -**Delete** | `delete INDEX`
e.g., `delete 3` -**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` -**Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` -**List** | `list` -**Help** | `help` +### General + +Action | Format, Examples +-------------- |-------------------------------------------------------------------------------------------------- +**Switch** | `switch MODE`
e.g. `switch dv` +**Help** | `help` +**Exit** | `exit` + +### Deliverable + +Action | Format, Examples +---------------|------------------------ +Add | `add t/TITLE by/DEADLINE m/MILESTONE [c/CONTACTS] [d/DESCRIPTION]`
e.g. `add t/Login screen by/10-10-2020 18:00 m/1.1 c/Jordan Woods, Betsy Crowe d/Include email and password fields` +Edit | `edit INDEX [t/TITLE] [by/DEADLINE] [m/MILESTONE] [c/CONTACTS] [d/DESCRIPTION]`
e.g. `edit 1 by/14-12-2020 12:00 d/Must include username, email and password fields` +Mark as completed | `done INDEX`
e.g. `done 3` +Mark as on-going | `undone INDEX`
e.g. `undone 1` +View | `view INDEX`
e.g. `view 2` +Find | `find KEYWORDS`
e.g. `find Homepage urgent` +List | `list` +Delete | `delete INDEX`
e.g. `delete 3` +Clear | `clear` + +### Meeting + +Action | Format, Examples +---------------|------------------------ +Add | `add t/TITLE from/FROM to/TO [c/CONTACTS] [l/LOCATION] [d/DESCRIPTION]`
e.g. `add t/Discuss app requirements from/11-12-2020 09:00 to/10:00 c/Jordan Woods, Betsy Crowe l/Meeting Room A d/Refine with business associates` +Edit | `edit INDEX [t/TITLE] [from/FROM] [to/TO] [c/CONTACTS] [l/LOCATION] [d/DESCRIPTION]`
e.g. `edit 2 t/Discuss final release features d/Finalise dashboard functions` +View | `view INDEX`
e.g. `view 2` +Find | `find KEYWORDS`
e.g. `find discuss user guide John` +List | `list` +Delete | `delete INDEX`
e.g. `delete 3` +Clear | `clear` + +### Contact + +Action | Format, Examples +---------------|------------------------ +Add | `add n/NAME r/ROLE e/EMAIL [p/PHONE] [d/DESCRIPTION]`
e.g. `add n/Johnny r/stk e/johnny@example.com p/12345678 d/Business Analyst` +Edit | `edit INDEX [n/NAME] [r/ROLE] [e/EMAIL] [p/PHONE] [d/DESCRIPTION]`
e.g. `edit 1 n/John r/dev e/john@email.com` +View | `view INDEX`
e.g. `view 2` +Find | `find KEYWORDS`
e.g. `find John Kite` +List | `list` +Delete | `delete INDEX`
e.g. `delete 3` +Clear | `clear` + +--------------------------------------------------------------------------------------------------------------------- + +## Glossary + +\# | Term | Description +---|--------------------------------|------------------------------------------------------------------------------------------------| +1 | Command Line Interface (CLI) | A text-based user interface (UI) used to view and manage computer files. | +2 | Graphical User Interface (GUI) | A system of interactive visual components for computer software. | +3 | Deliverable | An item to be completed as part of the product development process. | +4 | Milestone | A stage in the software development process associated with a particular group of deliverables.| +5 | Mode | The state of the application that affects how each command will be executed. The app can be in dashboard, deliverable, meeting or contact mode. | +6 | Stakeholder | An external party involved with the product. | diff --git a/docs/_config.yml b/docs/_config.yml index 6bd245d8f4e..bc0f65b91f9 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,4 +1,4 @@ -title: "AB-3" +title: "Productiv" theme: minima header_pages: @@ -8,7 +8,7 @@ header_pages: markdown: kramdown -repository: "se-edu/addressbook-level3" +repository: "AY2021S1-CS2103T-F11-2/tp" github_icon: "images/github-icon.png" plugins: diff --git a/docs/_sass/minima/_base.scss b/docs/_sass/minima/_base.scss index 06e47f23762..d8ef0280244 100644 --- a/docs/_sass/minima/_base.scss +++ b/docs/_sass/minima/_base.scss @@ -79,6 +79,10 @@ figure > img { figcaption { font-size: $small-font-size; + color: #2e7d32; + display: block; + text-align: center; + font-style: italic; } diff --git a/docs/_sass/minima/initialize.scss b/docs/_sass/minima/initialize.scss index 30288811151..8c3e194354f 100644 --- a/docs/_sass/minima/initialize.scss +++ b/docs/_sass/minima/initialize.scss @@ -14,7 +14,7 @@ $spacing-unit: 30px !default; $table-text-align: left !default; // Width of the content area -$content-width: 800px !default; +$content-width: 1200px !default; $on-palm: 600px !default; $on-laptop: 800px !default; diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss index b5ec6976efa..5d3bf0ea2bc 100644 --- a/docs/assets/css/style.scss +++ b/docs/assets/css/style.scss @@ -1,7 +1,6 @@ --- # Only the main Sass file needs front matter (the dashes are enough) --- - @import "minima/skins/{{ site.minima.skin | default: 'classic' }}", "minima/initialize"; diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml index ef81d18c337..ed710ee7fb0 100644 --- a/docs/diagrams/ArchitectureSequenceDiagram.puml +++ b/docs/diagrams/ArchitectureSequenceDiagram.puml @@ -3,9 +3,9 @@ Actor User as user USER_COLOR Participant ":UI" as ui UI_COLOR -Participant ":Logic" as logic LOGIC_COLOR -Participant ":Model" as model MODEL_COLOR -Participant ":Storage" as storage STORAGE_COLOR +Participant ":LogicPerson" as logic LOGIC_COLOR +Participant ":ModelPerson" as modelPerson MODEL_COLOR +Participant ":StoragePerson" as storagePerson STORAGE_COLOR user -[USER_COLOR]> ui : "delete 1" activate ui UI_COLOR @@ -13,22 +13,22 @@ activate ui UI_COLOR ui -[UI_COLOR]> logic : execute("delete 1") activate logic LOGIC_COLOR -logic -[LOGIC_COLOR]> model : deletePerson(p) -activate model MODEL_COLOR +logic -[LOGIC_COLOR]> modelPerson : deletePerson(p) +activate modelPerson MODEL_COLOR -model -[MODEL_COLOR]-> logic -deactivate model +modelPerson -[MODEL_COLOR]-> logic +deactivate modelPerson -logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook) -activate storage STORAGE_COLOR +logic -[LOGIC_COLOR]> storagePerson : saveAddressBook(addressBook) +activate storagePerson STORAGE_COLOR -storage -[STORAGE_COLOR]> storage : Save to file -activate storage STORAGE_COLOR_T1 -storage --[STORAGE_COLOR]> storage -deactivate storage +storagePerson -[STORAGE_COLOR]> storagePerson : Save to file +activate storagePerson STORAGE_COLOR_T1 +storagePerson --[STORAGE_COLOR]> storagePerson +deactivate storagePerson -storage --[STORAGE_COLOR]> logic -deactivate storage +storagePerson --[STORAGE_COLOR]> logic +deactivate storagePerson logic --[LOGIC_COLOR]> ui deactivate logic diff --git a/docs/diagrams/ArchitectureSequenceDiagramSwitch.puml b/docs/diagrams/ArchitectureSequenceDiagramSwitch.puml new file mode 100644 index 00000000000..a43c3132eb7 --- /dev/null +++ b/docs/diagrams/ArchitectureSequenceDiagramSwitch.puml @@ -0,0 +1,19 @@ +@startuml +!include style.puml + +Actor User as user USER_COLOR +Participant ":UI" as ui UI_COLOR +Participant ":LogicMode" as logic LOGIC_COLOR + +user -[USER_COLOR]> ui : "switch m" +activate ui UI_COLOR + +ui -[UI_COLOR]> logic : execute("switch m") +activate logic LOGIC_COLOR + +logic --[LOGIC_COLOR]> ui +deactivate logic + +ui--[UI_COLOR]> user +deactivate ui +@enduml diff --git a/docs/diagrams/ArchitectureSequenceDiagramWithDb.puml b/docs/diagrams/ArchitectureSequenceDiagramWithDb.puml new file mode 100644 index 00000000000..b4f68d5983b --- /dev/null +++ b/docs/diagrams/ArchitectureSequenceDiagramWithDb.puml @@ -0,0 +1,66 @@ +@startuml +!include style.puml + +Actor User as user USER_COLOR +box "UI" #LightGreen +Participant ":UI" as ui UI_COLOR_T2 +Participant ":Calendar" as calendar UI_COLOR_T3 +Participant ":ProjectCompletionStatusPanel" as ocp UI_COLOR_T4 +end box + +box "Logic" #LightBlue +Participant ":LogicXYZ" as logic LOGIC_COLOR +end box + +box "Model" #Pink +Participant ":ModelXYZ" as modelPerson MODEL_COLOR +end box + +box "Storage" #Orange +Participant ":StorageXYZ" as storageMeeting STORAGE_COLOR +end box + +user -[USER_COLOR]> ui : "delete 1" +activate ui UI_COLOR_T2 + +ui -[UI_COLOR_T2]> logic : execute("delete 1") +activate logic LOGIC_COLOR + +logic -[LOGIC_COLOR]> modelPerson : deleteXYZ(xyz) +activate modelPerson MODEL_COLOR +note left of modelPerson: XYZ = Deliverable, Meeting, or Person \n Similarly, xyz = deliverable, meeting, or person + +modelPerson -[MODEL_COLOR]-> logic +deactivate modelPerson + +logic -[LOGIC_COLOR]> storageMeeting : saveXYZBook(xyzBook) +activate storageMeeting STORAGE_COLOR + +storageMeeting -[STORAGE_COLOR]> storageMeeting : Save to file +activate storageMeeting STORAGE_COLOR_T1 +storageMeeting --[STORAGE_COLOR]> storageMeeting +deactivate storageMeeting + +storageMeeting --[STORAGE_COLOR]> logic +deactivate storageMeeting + +logic --[LOGIC_COLOR]> ui +deactivate logic + +opt in deliverable or meeting mode + ui--[UI_COLOR_T2]> calendar : updateCalendarList() + activate calendar UI_COLOR_T3 + + calendar --[UI_COLOR_T3]> ui + deactivate calendar + + ui--[UI_COLOR_T2]> ocp : updateOcp() + activate ocp UI_COLOR_T4 + + ocp --[UI_COLOR_T4]> ui + deactivate ocp + +end +ui--[UI_COLOR_T2]> user +deactivate ui +@enduml diff --git a/docs/diagrams/AutosortSequenceDiagram.puml b/docs/diagrams/AutosortSequenceDiagram.puml new file mode 100644 index 00000000000..8341c30e08b --- /dev/null +++ b/docs/diagrams/AutosortSequenceDiagram.puml @@ -0,0 +1,34 @@ +@startuml +!include style.puml + +box Model MODEL_COLOR_T1 +participant ":UniqueMeetingList" as UniqueMeetingList MODEL_COLOR +participant ":ObservableList" as ObservableList MODEL_COLOR + +end box + +participant "<>\n:Collections" as Collections RANDOM_COLOR + +[-> UniqueMeetingList : add(meeting) +activate UniqueMeetingList + +UniqueMeetingList -> ObservableList : add(meeting) +activate ObservableList + +ObservableList --> UniqueMeetingList : +deactivate + +UniqueMeetingList -> UniqueMeetingList : sortList() +activate UniqueMeetingList #DarkSalmon + +UniqueMeetingList -> Collections : sort(list, timeEventComparator) +activate Collections + +Collections --> UniqueMeetingList : +deactivate Collections + +return + +[<--UniqueMeetingList +deactivate UniqueMeetingList +@enduml diff --git a/docs/diagrams/CalendarSequenceDiagram.puml b/docs/diagrams/CalendarSequenceDiagram.puml new file mode 100644 index 00000000000..1e16d227b54 --- /dev/null +++ b/docs/diagrams/CalendarSequenceDiagram.puml @@ -0,0 +1,43 @@ +@startuml +!include style.puml + +box UI UI_COLOR_T2 +participant ":MainWindow" as MainWindow UI_COLOR +participant ":Calendar" as Calendar UI_COLOR +participant "calendarList:ObservableList" as TimeEvents UI_COLOR +end box + +participant "<>\n:Collections" as Collections RANDOM_COLOR + +[-> MainWindow : executeCommand("delete 1") +activate MainWindow + +MainWindow -> Calendar : updateCalendarList() +activate Calendar + +Calendar -> TimeEvents : clear() +activate TimeEvents + +return + +Calendar -> TimeEvents : addAll(meetings) +activate TimeEvents + +return + +Calendar -> TimeEvents : addAll(deliverables) +activate TimeEvents + +return + +Calendar -> Collections : sort(calendarList, timeEventComparator) +activate Collections + +return + +Calendar --> MainWindow : +deactivate + +[<--MainWindow +deactivate MainWindow +@enduml diff --git a/docs/diagrams/CommandSequenceDiagram.puml b/docs/diagrams/CommandSequenceDiagram.puml new file mode 100644 index 00000000000..4417a686ab9 --- /dev/null +++ b/docs/diagrams/CommandSequenceDiagram.puml @@ -0,0 +1,135 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicDispatcherManager" as LogicDispatcherManager LOGIC_COLOR +participant ":XYZLogicManager" as XYZLogicManager LOGIC_COLOR +participant ":XYZBookParser" as XYZBookParser LOGIC_COLOR +participant ":GeneralParser" as GeneralParser LOGIC_COLOR +participant ":ABCCommandParser" as ABCCommandParser LOGIC_COLOR +participant "abcCommand:ABCCommand" as ABCCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR + +end box + +box Model MODEL_COLOR_T1 +participant ":XYZModel" as XYZModel MODEL_COLOR +end box + +[-> LogicDispatcherManager : execute(command, XYZ) +activate LogicDispatcherManager +note left +XYZ = Deliverable, +Meeting or Person +end note + +alt LOGIC_COLOR_T1 commands that affect model +LogicDispatcherManager -> XYZLogicManager : execute(command) +activate XYZLogicManager + +XYZLogicManager -> XYZBookParser : parseCommand(command) +activate XYZBookParser + +create ABCCommandParser +XYZBookParser -> ABCCommandParser +activate ABCCommandParser + +ABCCommandParser --> XYZBookParser +deactivate ABCCommandParser + +XYZBookParser -> ABCCommandParser : parse(command) +activate ABCCommandParser + +create ABCCommand +ABCCommandParser -> ABCCommand +activate ABCCommand + + +ABCCommand --> ABCCommandParser : abcCommand +deactivate ABCCommand +note right +ABC = Add, Find, Delete, etc +Similarly, abc = add, find, delete, etc +end note + +ABCCommandParser --> XYZBookParser : abcCommand +deactivate ABCCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +ABCCommandParser -[hidden]-> XYZBookParser +destroy ABCCommandParser + +XYZBookParser --> XYZLogicManager : abcCommand +deactivate XYZBookParser + +XYZLogicManager -> ABCCommand : execute() +activate ABCCommand + +ABCCommand -> XYZModel +activate XYZModel + +XYZModel --> ABCCommand +deactivate XYZModel + +create CommandResult +ABCCommand -> CommandResult +activate CommandResult + +CommandResult --> ABCCommand +deactivate CommandResult + +ABCCommand --> XYZLogicManager : result +deactivate ABCCommand + +LogicDispatcherManager<--XYZLogicManager +deactivate XYZLogicManager + +else #yellow commands that do not affect model + +LogicDispatcherManager -> GeneralParser : parseCommand(command) +activate GeneralParser + +create ABCCommandParser +GeneralParser -> ABCCommandParser +activate ABCCommandParser + +ABCCommandParser --> GeneralParser +deactivate ABCCommandParser + +GeneralParser -> ABCCommandParser : parse(command) +activate ABCCommandParser + +create ABCCommand +ABCCommandParser -> ABCCommand +activate ABCCommand + + +ABCCommand --> ABCCommandParser : abcCommand +deactivate ABCCommand + +ABCCommandParser --> GeneralParser : abcCommand +deactivate ABCCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +ABCCommandParser -[hidden]-> GeneralParser +destroy ABCCommandParser + +GeneralParser -->LogicDispatcherManager : abcCommand +deactivate GeneralParser + +LogicDispatcherManager -> ABCCommand : execute() +activate ABCCommand + +create CommandResult +ABCCommand -> CommandResult +activate CommandResult + +CommandResult --> ABCCommand +deactivate CommandResult + +ABCCommand --> LogicDispatcherManager : result +deactivate ABCCommand + +end +[<--LogicDispatcherManager +deactivate LogicDispatcherManager + +@enduml diff --git a/docs/diagrams/DateTimeClass.puml b/docs/diagrams/DateTimeClass.puml new file mode 100644 index 00000000000..4561988b9a1 --- /dev/null +++ b/docs/diagrams/DateTimeClass.puml @@ -0,0 +1,31 @@ +@startuml +!include style.puml + +Package Model <> { + + Package Meeting <> { + Class Meeting MODEL_COLOR + Class From MODEL_COLOR_T3 + Class To MODEL_COLOR_T3 + } + + Package Deliverable <>{ + Class Deliverable MODEL_COLOR + Class Deadline MODEL_COLOR_T3 + } + + Package Util <> { + Class DateTime MODEL_COLOR_T2 + Class pp #FFFFFF + Class Time MODEL_COLOR_T2 + } +} + +Meeting *-- From +Meeting *-- To +Deliverable *-- Deadline + +From -right-|> DateTime +To --|> Time +Deadline -down-|> DateTime +@enduml diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml deleted file mode 100644 index 1dc2311b245..00000000000 --- a/docs/diagrams/DeleteSequenceDiagram.puml +++ /dev/null @@ -1,69 +0,0 @@ -@startuml -!include style.puml - -box Logic LOGIC_COLOR_T1 -participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR -participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR -participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR -participant ":CommandResult" as CommandResult LOGIC_COLOR -end box - -box Model MODEL_COLOR_T1 -participant ":Model" as Model MODEL_COLOR -end box - -[-> LogicManager : execute("delete 1") -activate LogicManager - -LogicManager -> AddressBookParser : parseCommand("delete 1") -activate AddressBookParser - -create DeleteCommandParser -AddressBookParser -> DeleteCommandParser -activate DeleteCommandParser - -DeleteCommandParser --> AddressBookParser -deactivate DeleteCommandParser - -AddressBookParser -> DeleteCommandParser : parse("1") -activate DeleteCommandParser - -create DeleteCommand -DeleteCommandParser -> DeleteCommand -activate DeleteCommand - -DeleteCommand --> DeleteCommandParser : d -deactivate DeleteCommand - -DeleteCommandParser --> AddressBookParser : d -deactivate DeleteCommandParser -'Hidden arrow to position the destroy marker below the end of the activation bar. -DeleteCommandParser -[hidden]-> AddressBookParser -destroy DeleteCommandParser - -AddressBookParser --> LogicManager : d -deactivate AddressBookParser - -LogicManager -> DeleteCommand : execute() -activate DeleteCommand - -DeleteCommand -> Model : deletePerson(1) -activate Model - -Model --> DeleteCommand -deactivate Model - -create CommandResult -DeleteCommand -> CommandResult -activate CommandResult - -CommandResult --> DeleteCommand -deactivate CommandResult - -DeleteCommand --> LogicManager : result -deactivate DeleteCommand - -[<--LogicManager -deactivate LogicManager -@enduml diff --git a/docs/diagrams/DoneCommandSequenceDiagram.puml b/docs/diagrams/DoneCommandSequenceDiagram.puml new file mode 100644 index 00000000000..7368fb2369c --- /dev/null +++ b/docs/diagrams/DoneCommandSequenceDiagram.puml @@ -0,0 +1,61 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":DeliverableLogicManager" as DeliverableLogicManager LOGIC_COLOR_T2 +participant ":DeliverableBookParser" as DeliverableBookParser LOGIC_COLOR_T2 +participant ":MarkDoneCommandParser" as MarkDoneCommandParser LOGIC_COLOR_T2 +participant "d:MarkDoneCommand" as MarkDoneCommand LOGIC_COLOR_T2 +end box + +box Model MODEL_COLOR_T1 +participant ":ModelDeliverable" as ModelDeliverable MODEL_COLOR_T2 +end box + +[-> DeliverableLogicManager : execute("done 2") +activate DeliverableLogicManager + +DeliverableLogicManager -> DeliverableBookParser : parseCommand("done 2") +activate DeliverableBookParser + +create MarkDoneCommandParser +DeliverableBookParser -> MarkDoneCommandParser +activate MarkDoneCommandParser + +MarkDoneCommandParser --> DeliverableBookParser +deactivate MarkDoneCommandParser + +DeliverableBookParser -> MarkDoneCommandParser : parse("2") +activate MarkDoneCommandParser + +create MarkDoneCommand +MarkDoneCommandParser -> MarkDoneCommand +activate MarkDoneCommand + +MarkDoneCommand --> MarkDoneCommandParser : d +deactivate MarkDoneCommand + +MarkDoneCommandParser --> DeliverableBookParser : d +deactivate MarkDoneCommandParser +destroy MarkDoneCommandParser + +DeliverableBookParser --> DeliverableLogicManager : d +deactivate DeliverableBookParser + +DeliverableLogicManager -> MarkDoneCommand : execute() +activate MarkDoneCommand + +MarkDoneCommand -> ModelDeliverable : updateDeliverableStatus() +activate ModelDeliverable + +ModelDeliverable --> MarkDoneCommand +deactivate ModelDeliverable + +MarkDoneCommand --> DeliverableLogicManager : result +deactivate MarkDoneCommand +destroy MarkDoneCommand + +[<-- DeliverableLogicManager : result +deactivate DeliverableLogicManager + +@enduml diff --git a/docs/diagrams/LogicClassDiagram.puml b/docs/diagrams/LogicClassDiagram.puml index 016ef33e2e2..bd66030fffd 100644 --- a/docs/diagrams/LogicClassDiagram.puml +++ b/docs/diagrams/LogicClassDiagram.puml @@ -1,5 +1,8 @@ @startuml !include style.puml + +'scale 1.5 + skinparam arrowThickness 1.1 skinparam arrowColor LOGIC_COLOR_T4 skinparam classBackgroundColor LOGIC_COLOR @@ -8,8 +11,8 @@ package Logic { package Parser { Interface Parser <> -Class AddressBookParser -Class XYZCommandParser +Class XYZBookParser +Class ABCCommandParser Class CliSyntax Class ParserUtil Class ArgumentMultimap @@ -18,45 +21,55 @@ Class Prefix } package Command { -Class XYZCommand +Class ABCCommand Class CommandResult Class "{abstract}\nCommand" as Command } -Interface Logic <> -Class LogicManager +Interface LogicXYZ <> +Class LogicXYZManager + +Interface LogicDispatcher <> +Class LogicDispatcherManager + +note top of ABCCommandParser: ABC = Add, Find,\nDelete, etc +note top of XYZBookParser: XYZ = Deliverable, \nMeeting or Person + } package Model{ -Class HiddenModel #FFFFFF +class HiddenModel #FFFFFF } Class HiddenOutside #FFFFFF -HiddenOutside ..> Logic +HiddenOutside ..> LogicDispatcher -LogicManager .up.|> Logic -LogicManager -->"1" AddressBookParser -AddressBookParser .left.> XYZCommandParser: creates > +LogicDispatcherManager .up.|> LogicDispatcher +XYZBookParser .left.> ABCCommandParser: creates > -XYZCommandParser ..> XYZCommand : creates > -XYZCommandParser ..|> Parser -XYZCommandParser ..> ArgumentMultimap -XYZCommandParser ..> ArgumentTokenizer +ABCCommandParser ..> ABCCommand : creates > +ABCCommandParser ..|> Parser +ABCCommandParser ..> ArgumentMultimap +ABCCommandParser ..> ArgumentTokenizer ArgumentTokenizer .left.> ArgumentMultimap -XYZCommandParser ..> CliSyntax +ABCCommandParser ..> CliSyntax CliSyntax ..> Prefix -XYZCommandParser ..> ParserUtil +ABCCommandParser ..> ParserUtil ParserUtil .down.> Prefix ArgumentTokenizer .down.> Prefix -XYZCommand -up-|> Command -LogicManager .left.> Command : executes > +ABCCommand -up-|> Command +LogicDispatcherManager .left.> Command : executes > +LogicDispatcherManager -> "0..1 " Model +LogicDispatcherManager ---> "0..1 " ABCCommandParser -LogicManager --> Model -Command .right.> Model -note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc +Command .> "0..1 " Model -Logic ..> CommandResult -LogicManager .down.> CommandResult +LogicDispatcher ..> CommandResult +LogicDispatcherManager .down.> CommandResult Command .up.> CommandResult CommandResult -[hidden]-> Parser + +LogicXYZ ..> LogicXYZManager +LogicDispatcherManager -left-> LogicXYZManager +LogicXYZManager -> XYZBookParser @enduml diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml index e85a00d4107..ab4e728726d 100644 --- a/docs/diagrams/ModelClassDiagram.puml +++ b/docs/diagrams/ModelClassDiagram.puml @@ -5,52 +5,110 @@ skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR Package Model <>{ -Interface ReadOnlyAddressBook <> -Interface Model <> +Interface ReadOnlyXYZBook <> +Interface ModelXYZ <> Interface ObservableList <> -Class AddressBook -Class ReadOnlyAddressBook -Class Model -Class ModelManager +Class XYZBook +Class ReadOnlyXYZBook +Class ModelXYZ +Class ModelXYZManager Class UserPrefs -Class ReadOnlyUserPrefs +Interface ReadOnlyUserPrefs <> + +Package Util { +Class DateTime +Class Title +Class Time +Class Description +Class Contacts +} Package Person { Class Person -Class Address +Class Role Class Email Class Name Class Phone Class UniquePersonList } -Package Tag { -Class Tag +Package Meeting { +Class From +Class To +Class Location +Class Meeting +Class UniqueMeetingList +} + +Package Deliverable { +Class Deadline +Class Milestone +Class Deliverable +Class UniqueDeliverableList +} + +Package Event { +interface TimeEvent <> } + } Class HiddenOutside #FFFFFF -HiddenOutside ..> Model +HiddenOutside ..> ModelXYZ -AddressBook .up.|> ReadOnlyAddressBook +XYZBook .up.|> ReadOnlyXYZBook -ModelManager .up.|> Model -Model .right.> ObservableList -ModelManager o--> "1" AddressBook -ModelManager o-left-> "1" UserPrefs +ModelXYZManager .up.|> ModelXYZ +ModelXYZ .right.> ObservableList +ModelXYZManager o--> "1" XYZBook +ModelXYZManager o-left-> "1" UserPrefs UserPrefs .up.|> ReadOnlyUserPrefs +note right of ModelXYZManager: XYZ = Deliverable, Meeting or Person -AddressBook *--> "1" UniquePersonList +XYZBook *--> "1" UniquePersonList UniquePersonList o--> "*" Person Person *--> Name Person *--> Phone Person *--> Email -Person *--> Address -Person *--> "*" Tag +Person *--> Role +Person *--> Description + +Role -[hidden]right-> Name +Name -[hidden]right-> Email +Email -[hidden]right-> Phone +Phone -[hidden]right-> Description + +XYZBook *--> "1" UniqueMeetingList +UniqueMeetingList o--> "*" Meeting +Meeting .up.|> TimeEvent +Meeting *--> From +Meeting *--> To +Meeting *--> Location +Meeting *--> Title +Meeting *--> Description +Meeting *--> Contacts + +Location -[hidden]right-> To +To -[hidden]right-> From + +From -down-|> DateTime +To -down-|> Time + +XYZBook *--> "1" UniqueDeliverableList +UniqueDeliverableList o--> "*" Deliverable +Deliverable .up.|> TimeEvent +Deliverable *--> Deadline +Deliverable *--> Milestone +Deliverable *--> Title +Deliverable *--> Description +Deliverable *--> Contacts -Name -[hidden]right-> Phone -Phone -[hidden]right-> Address -Address -[hidden]right-> Email +Deadline -down-|> DateTime -ModelManager -->"1" Person : filtered list +ModelXYZManager -->"1" Person : filtered list +ModelXYZManager -->"1" Person : in view +ModelXYZManager -->"1" Meeting : in view +ModelXYZManager -->"1" Meeting : filtered list +ModelXYZManager -->"1" Deliverable : filtered list +ModelXYZManager -->"1" Deliverable : in view @enduml diff --git a/docs/diagrams/OCPSequenceDiagram.puml b/docs/diagrams/OCPSequenceDiagram.puml new file mode 100644 index 00000000000..fb3cd9b1fb3 --- /dev/null +++ b/docs/diagrams/OCPSequenceDiagram.puml @@ -0,0 +1,47 @@ +@startuml +!include style.puml + +scale 1.5 + +box UI UI_COLOR_T1 +participant ":MainWindow" as Main UI_COLOR +participant ":ProjectCompletionStatusPanel" as Panel UI_COLOR +end box + +box Model MODEL_COLOR_T1 +participant "deliverableList:ObservableList" as List MODEL_COLOR +end box + +[-> Main: switchDashboard() +activate Main +Main -> Main : switchMode(ModeEnum.DASHBOARD) +activate Main + +Main -> Panel: updateOcp() +activate Panel + +Panel -> List : size() +activate List +List --> Panel : totalNumDeliverables +deactivate List + +Panel -> Panel : findNumCompletedDeliverables(deliverableList) +activate Panel +Panel --> Panel: numCompletedDeliverables +deactivate Panel + +Panel -> Panel : getOcp(totalNumDeliverables, numCompletedDeliverables) +activate Panel +Panel --> Panel : overallCompletionPercentage +deactivate Panel + +Panel --> Main +deactivate Panel + +Main --> Main +deactivate Main + +[<-- Main +deactivate Main + +@enduml diff --git a/docs/diagrams/SaveStorageSequenceDiagram.puml b/docs/diagrams/SaveStorageSequenceDiagram.puml new file mode 100644 index 00000000000..2fbc29a8c0d --- /dev/null +++ b/docs/diagrams/SaveStorageSequenceDiagram.puml @@ -0,0 +1,59 @@ +@startuml +!include style.puml + +Scale 1.5 + +box Logic LOGIC_COLOR_T1 +participant ":LogicXYZ" as LogicXYZ LOGIC_COLOR +end box + +box Storage STORAGE_COLOR_T1 +participant ":StorageXYZ" as StorageXYZ STORAGE_COLOR +participant ":XYZBookStorage" as XYZBookStorage STORAGE_COLOR +participant "json:JsonSerializableXYZBookStorage" as JsonSerializableXYZBookStorage STORAGE_COLOR +participant "jsonItem:JsonAdaptedXYZ" as JsonAdaptedXYZ STORAGE_COLOR + +end box + +[-> LogicXYZ : execute(command) +activate LogicXYZ + +LogicXYZ -> StorageXYZ : saveXYZ(XYZBook) +activate StorageXYZ + +StorageXYZ -> XYZBookStorage : saveXYZ(XYZBook) +activate XYZBookStorage + + +create JsonSerializableXYZBookStorage +XYZBookStorage -> JsonSerializableXYZBookStorage +activate JsonSerializableXYZBookStorage + +Note right +XYZ = Deliverable, +Meeting or Person +end Note + +loop book has items + create JsonAdaptedXYZ + JsonSerializableXYZBookStorage -> JsonAdaptedXYZ + activate JsonAdaptedXYZ + + JsonAdaptedXYZ --> JsonSerializableXYZBookStorage : jsonItem + deactivate JsonAdaptedXYZ + +end + +JsonSerializableXYZBookStorage --> XYZBookStorage : json +deactivate JsonSerializableXYZBookStorage + +XYZBookStorage --> StorageXYZ +deactivate XYZBookStorage + +StorageXYZ --> LogicXYZ +deactivate StorageXYZ + +deactivate LogicXYZ +[<--LogicXYZ + +@enduml diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml index 6adb2e156bf..0c21a771bc4 100644 --- a/docs/diagrams/StorageClassDiagram.puml +++ b/docs/diagrams/StorageClassDiagram.puml @@ -1,24 +1,30 @@ @startuml !include style.puml + +scale 1.5 + skinparam arrowThickness 1.1 skinparam arrowColor STORAGE_COLOR skinparam classBackgroundColor STORAGE_COLOR -Interface Storage <> +package Storage{ +Interface XYZStorage <> Interface UserPrefsStorage <> -Interface AddressBookStorage <> +Interface XYZBookStorage <> -Class StorageManager +Class StorageXYZManager Class JsonUserPrefsStorage -Class JsonAddressBookStorage +Class JsonXYZBookStorage -StorageManager .left.|> Storage -StorageManager o-right-> UserPrefsStorage -StorageManager o--> AddressBookStorage +StorageXYZManager .left.|> XYZStorage +StorageXYZManager o-right-> UserPrefsStorage +StorageXYZManager o--> XYZBookStorage JsonUserPrefsStorage .left.|> UserPrefsStorage -JsonAddressBookStorage .left.|> AddressBookStorage -JsonAddressBookStorage .down.> JsonSerializableAddressBookStorage -JsonSerializableAddressBookStorage .right.> JsonSerializablePerson -JsonSerializablePerson .right.> JsonAdaptedTag +JsonXYZBookStorage .left.|> XYZBookStorage +JsonXYZBookStorage .down.> JsonSerializableXYZBookStorage +JsonSerializableXYZBookStorage .right.> JsonSerializableXYZ +JsonSerializableXYZ .right.> JsonAdaptedXYZ +note right of JsonXYZBookStorage : XYZ = Deliverable, \nMeeting or Person +} @enduml diff --git a/docs/diagrams/SwitchModeActivityDiagram.puml b/docs/diagrams/SwitchModeActivityDiagram.puml new file mode 100644 index 00000000000..dbdaf9c7957 --- /dev/null +++ b/docs/diagrams/SwitchModeActivityDiagram.puml @@ -0,0 +1,15 @@ +@startuml +start +:User executes command; + +'Since the beta syntax does not support placing the condition outside the +'diamond we place it as the true branch instead. + +if () then ([valid command]) + :Change mode in MainWindow; + :Change UI to new mode; +else ([else]) + :Throw ParseException; +endif +stop +@enduml diff --git a/docs/diagrams/SwitchModeMouseInputSequenceDiagram.puml b/docs/diagrams/SwitchModeMouseInputSequenceDiagram.puml new file mode 100644 index 00000000000..441c3c3b3df --- /dev/null +++ b/docs/diagrams/SwitchModeMouseInputSequenceDiagram.puml @@ -0,0 +1,20 @@ +@startuml +!include style.puml + +box UI UI_COLOR_T1 +participant ":MainWindow" as MainWindow UI_COLOR +end box + +[-> MainWindow : switchDeliverable() +activate MainWindow + +MainWindow -> MainWindow: switchMode(ModeEnum.DELIVERABLE) + +activate MainWindow +MainWindow --> MainWindow + +deactivate MainWindow +[<--MainWindow +deactivate MainWindow + +@enduml diff --git a/docs/diagrams/SwitchModeSequenceDiagram.puml b/docs/diagrams/SwitchModeSequenceDiagram.puml new file mode 100644 index 00000000000..8429a9d9c59 --- /dev/null +++ b/docs/diagrams/SwitchModeSequenceDiagram.puml @@ -0,0 +1,78 @@ +@startuml +!include style.puml + +box UI UI_COLOR_T1 +participant ":MainWindow" as MainWindow UI_COLOR +end box + +box Logic LOGIC_COLOR_T1 +participant ":LogicDispatcherManager" as LogicDispatcherManager LOGIC_COLOR +participant ":GeneralParser" as GeneralParser LOGIC_COLOR +participant ":SwitchCommandParser" as SwitchCommandParser LOGIC_COLOR +participant ":SwitchCommand" as SwitchCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +[-> MainWindow : executeCommand("switch dv") +activate MainWindow + +MainWindow -> LogicDispatcherManager : execute("switch dv", currMode) +activate LogicDispatcherManager + +LogicDispatcherManager -> GeneralParser : parseCommand("switch dv") +activate GeneralParser + +create SwitchCommandParser +GeneralParser -> SwitchCommandParser: SwitchCommandParser() +activate SwitchCommandParser +SwitchCommandParser --> GeneralParser +deactivate SwitchCommandParser + +GeneralParser -> SwitchCommandParser: parse("dv") +activate SwitchCommandParser + +create SwitchCommand +SwitchCommandParser -> SwitchCommand: SwitchCommand(DELIVERABLE) +activate SwitchCommand +SwitchCommand --> SwitchCommandParser +deactivate SwitchCommand + +SwitchCommandParser --> GeneralParser +deactivate SwitchCommandParser +destroy SwitchCommandParser + +GeneralParser --> LogicDispatcherManager : command +deactivate GeneralParser + +LogicDispatcherManager -> SwitchCommand : execute() +activate SwitchCommand + +create CommandResult +SwitchCommand -> CommandResult : CommandResult(..., DELIVERABLE) +activate CommandResult +CommandResult --> SwitchCommand +deactivate CommandResult + +SwitchCommand --> LogicDispatcherManager : commandResult +deactivate SwitchCommand +destroy SwitchCommand +SwitchCommand -[hidden]-> LogicDispatcherManager : commandResult + +LogicDispatcherManager --> MainWindow : commandResult +deactivate LogicDispatcherManager + +MainWindow -> CommandResult : getMode() +activate CommandResult +CommandResult --> MainWindow : DELIVERABLE +deactivate CommandResult +destroy CommandResult + +MainWindow -> MainWindow: switchMode(DELIVERABLE) +activate MainWindow +MainWindow --> MainWindow + +deactivate MainWindow +[<--MainWindow +deactivate MainWindow + +@enduml diff --git a/docs/diagrams/TimeEventClassDiagram.puml b/docs/diagrams/TimeEventClassDiagram.puml new file mode 100644 index 00000000000..a5dd5fe7765 --- /dev/null +++ b/docs/diagrams/TimeEventClassDiagram.puml @@ -0,0 +1,50 @@ +@startuml +!include style.puml +skinparam arrowThickness 1.1 +skinparam arrowColor MODEL_COLOR +skinparam classBackgroundColor MODEL_COLOR + +Package Model <>{ + +Class DateTime { + + value: LocalDateTime + + getLocalDateTime(): LocalDateTime +} + +Class Meeting { + + getIndicatorTime(): LocalDateTime +} + +Class Deadline { + +} + +class From {} +Class Deliverable { + + + getIndicatorTime(): LocalDateTime +} + +interface TimeEvent <> { + getIndicatorTime(): LocalDateTime +} +} + +Meeting .up.|> TimeEvent +Meeting *--> From + +From --|> DateTime + +Deliverable .up.|> TimeEvent +Deliverable *--> Deadline + +Deadline --|> DateTime + +show DateTime methods +show DateTime fields +show Meeting methods +show TimeEvent methods +show Deliverable methods + + +@enduml diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml index 92746f9fcf7..bc982dc7e6f 100644 --- a/docs/diagrams/UiClassDiagram.puml +++ b/docs/diagrams/UiClassDiagram.puml @@ -11,10 +11,19 @@ Class UiManager Class MainWindow Class HelpWindow Class ResultDisplay -Class PersonListPanel -Class PersonCard Class StatusBarFooter Class CommandBox +package XYZ <>{ +Class XYZDetailsPanel +Class XYZListPanel +Class XYZCard +} +package DashBoard <>{ +Class CalendarDeliverableCard +Class CalendarListPanel +Class CalendarMeetingCard +Class ProjectCompletionStatusPanel +} } package Model <> { @@ -33,25 +42,34 @@ UiManager -down-> MainWindow MainWindow --> HelpWindow MainWindow *-down-> CommandBox MainWindow *-down-> ResultDisplay -MainWindow *-down-> PersonListPanel +MainWindow *-down-> XYZListPanel MainWindow *-down-> StatusBarFooter +MainWindow *-down-> XYZDetailsPanel +MainWindow *-down-> CalendarListPanel +MainWindow *-down-> ProjectCompletionStatusPanel -PersonListPanel -down-> PersonCard +XYZListPanel -down-> XYZCard +CalendarListPanel -down-> CalendarDeliverableCard +CalendarListPanel -down-> CalendarMeetingCard MainWindow -left-|> UiPart ResultDisplay --|> UiPart CommandBox --|> UiPart -PersonListPanel --|> UiPart -PersonCard --|> UiPart +XYZListPanel --|> UiPart +XYZCard --|> UiPart StatusBarFooter --|> UiPart HelpWindow -down-|> UiPart +XYZDetailsPanel --|> UiPart +CalendarListPanel --|> UiPart +ProjectCompletionStatusPanel --|> UiPart -PersonCard ..> Model +XYZCard ..> Model UiManager -right-> Logic MainWindow -left-> Logic +note top of XYZ: XYZ = Deliverable, Meeting or Person -PersonListPanel -[hidden]left- HelpWindow +XYZListPanel -[hidden]left- HelpWindow HelpWindow -[hidden]left- CommandBox CommandBox -[hidden]left- ResultDisplay ResultDisplay -[hidden]left- StatusBarFooter diff --git a/docs/diagrams/ViewCommandSequenceDiagram.puml b/docs/diagrams/ViewCommandSequenceDiagram.puml new file mode 100644 index 00000000000..09db50d008e --- /dev/null +++ b/docs/diagrams/ViewCommandSequenceDiagram.puml @@ -0,0 +1,74 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":XYZLogicManager" as XYZLogicManager LOGIC_COLOR_T2 +participant ":XYZBookParser" as XYZBookParser LOGIC_COLOR_T2 +participant ":ViewCommandParser" as ViewCommandParser LOGIC_COLOR_T2 +participant "v:ViewCommand" as ViewCommand LOGIC_COLOR_T2 +end box + +note left of XYZLogicManager : XYZ = Deliverable, Meeting or Person + +box Model MODEL_COLOR_T1 +participant ":ModelXYZ" as ModelXYZ MODEL_COLOR_T2 +end box + +[-> XYZLogicManager : execute("view 2") +activate XYZLogicManager + +XYZLogicManager -> XYZBookParser : parseCommand("view 2") +activate XYZBookParser + +create ViewCommandParser +XYZBookParser -> ViewCommandParser +activate ViewCommandParser + +ViewCommandParser --> XYZBookParser +deactivate ViewCommandParser + +XYZBookParser -> ViewCommandParser : parse("2") +activate ViewCommandParser + +create ViewCommand +ViewCommandParser -> ViewCommand +activate ViewCommand + +ViewCommand --> ViewCommandParser : v +deactivate ViewCommand + +ViewCommandParser --> XYZBookParser : v +deactivate ViewCommandParser +destroy ViewCommandParser + +XYZBookParser --> XYZLogicManager : v +deactivate XYZBookParser + +XYZLogicManager -> ViewCommand : execute() +activate ViewCommand + +ViewCommand -> ModelXYZ : setXYZInView(XYZ) +activate ModelXYZ + +ModelXYZ --> ViewCommand +deactivate ModelXYZ + +ViewCommand --> XYZLogicManager : result +deactivate ViewCommand +destroy ViewCommand + +[<-- XYZLogicManager : result +deactivate XYZLogicManager + +[-> XYZLogicManager : getXYZInView() +activate XYZLogicManager + +XYZLogicManager -> ModelXYZ : getXYZInView() +activate ModelXYZ + +ModelXYZ --> XYZLogicManager : XYZ in view +deactivate ModelXYZ + +[<-- XYZLogicManager : XYZ in view +deactivate XYZLogicManager +@enduml diff --git a/docs/diagrams/style.puml b/docs/diagrams/style.puml index fad8b0adeaa..d28ab9dcaa9 100644 --- a/docs/diagrams/style.puml +++ b/docs/diagrams/style.puml @@ -31,8 +31,12 @@ !define STORAGE_COLOR_T3 #806600 !define STORAGE_COLOR_T2 #544400 +!define CALENDAR_COLOR #7e009e + !define USER_COLOR #000000 +!define RANDOM_COLOR #FFA400 + skinparam BackgroundColor #FFFFFFF skinparam Shadowing false @@ -69,6 +73,7 @@ skinparam ParticipantPadding 10 skinparam Shadowing false skinparam DefaultTextAlignment center skinparam packageStyle Rectangle +skinparam classAttributeIconSize 0 hide footbox hide members diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png index 2f1346869d0..fdee30699ed 100644 Binary files a/docs/images/ArchitectureSequenceDiagram.png and b/docs/images/ArchitectureSequenceDiagram.png differ diff --git a/docs/images/ArchitectureSequenceDiagramSwitch.png b/docs/images/ArchitectureSequenceDiagramSwitch.png new file mode 100644 index 00000000000..69f8241027e Binary files /dev/null and b/docs/images/ArchitectureSequenceDiagramSwitch.png differ diff --git a/docs/images/ArchitectureSequenceDiagramWithDb.png b/docs/images/ArchitectureSequenceDiagramWithDb.png new file mode 100644 index 00000000000..7e74e677fcc Binary files /dev/null and b/docs/images/ArchitectureSequenceDiagramWithDb.png differ diff --git a/docs/images/AutosortSequenceDiagram.png b/docs/images/AutosortSequenceDiagram.png new file mode 100644 index 00000000000..8db94a82a09 Binary files /dev/null and b/docs/images/AutosortSequenceDiagram.png differ diff --git a/docs/images/CalendarSequenceDiagram.png b/docs/images/CalendarSequenceDiagram.png new file mode 100644 index 00000000000..8fbfd21b987 Binary files /dev/null and b/docs/images/CalendarSequenceDiagram.png differ diff --git a/docs/images/CommandSequenceDiagram.png b/docs/images/CommandSequenceDiagram.png new file mode 100644 index 00000000000..9dbba11f934 Binary files /dev/null and b/docs/images/CommandSequenceDiagram.png differ diff --git a/docs/images/Contact.png b/docs/images/Contact.png new file mode 100644 index 00000000000..f3e7ffc90a1 Binary files /dev/null and b/docs/images/Contact.png differ diff --git a/docs/images/ContactView.png b/docs/images/ContactView.png new file mode 100644 index 00000000000..bd31be7a945 Binary files /dev/null and b/docs/images/ContactView.png differ diff --git a/docs/images/DateTimeClass.png b/docs/images/DateTimeClass.png new file mode 100644 index 00000000000..5417842f6a7 Binary files /dev/null and b/docs/images/DateTimeClass.png differ diff --git a/docs/images/DeleteSequenceDiagram.png b/docs/images/DeleteSequenceDiagram.png deleted file mode 100644 index fa327b39618..00000000000 Binary files a/docs/images/DeleteSequenceDiagram.png and /dev/null differ diff --git a/docs/images/Deliverable.png b/docs/images/Deliverable.png new file mode 100644 index 00000000000..cf54a50a70d Binary files /dev/null and b/docs/images/Deliverable.png differ diff --git a/docs/images/DeliverableView.png b/docs/images/DeliverableView.png new file mode 100644 index 00000000000..d981581b82b Binary files /dev/null and b/docs/images/DeliverableView.png differ diff --git a/docs/images/DoneCommandSequenceDiagram.png b/docs/images/DoneCommandSequenceDiagram.png new file mode 100644 index 00000000000..eef60df8fb3 Binary files /dev/null and b/docs/images/DoneCommandSequenceDiagram.png differ diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png index b9e853cef12..0fa7c873984 100644 Binary files a/docs/images/LogicClassDiagram.png and b/docs/images/LogicClassDiagram.png differ diff --git a/docs/images/Meeting.png b/docs/images/Meeting.png new file mode 100644 index 00000000000..435dcc768bb Binary files /dev/null and b/docs/images/Meeting.png differ diff --git a/docs/images/MeetingView.png b/docs/images/MeetingView.png new file mode 100644 index 00000000000..d724eae11da Binary files /dev/null and b/docs/images/MeetingView.png differ diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png index 280064118cf..f9365cfe6d1 100644 Binary files a/docs/images/ModelClassDiagram.png and b/docs/images/ModelClassDiagram.png differ diff --git a/docs/images/OCP.JPG b/docs/images/OCP.JPG new file mode 100644 index 00000000000..eb8c44fc39e Binary files /dev/null and b/docs/images/OCP.JPG differ diff --git a/docs/images/OCPSequenceDiagram.png b/docs/images/OCPSequenceDiagram.png new file mode 100644 index 00000000000..cf40d5d2ff7 Binary files /dev/null and b/docs/images/OCPSequenceDiagram.png differ diff --git a/docs/images/SaveStorageSequenceDiagram.png b/docs/images/SaveStorageSequenceDiagram.png new file mode 100644 index 00000000000..d2267add0d3 Binary files /dev/null and b/docs/images/SaveStorageSequenceDiagram.png differ diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png index d87c1216820..49392ed843b 100644 Binary files a/docs/images/StorageClassDiagram.png and b/docs/images/StorageClassDiagram.png differ diff --git a/docs/images/SwitchModeActivityDiagram.png b/docs/images/SwitchModeActivityDiagram.png new file mode 100644 index 00000000000..d9a867dd8d5 Binary files /dev/null and b/docs/images/SwitchModeActivityDiagram.png differ diff --git a/docs/images/SwitchModeMouseInputSequenceDiagram.png b/docs/images/SwitchModeMouseInputSequenceDiagram.png new file mode 100644 index 00000000000..689a4dd0f8d Binary files /dev/null and b/docs/images/SwitchModeMouseInputSequenceDiagram.png differ diff --git a/docs/images/SwitchModeSequenceDiagram.png b/docs/images/SwitchModeSequenceDiagram.png new file mode 100644 index 00000000000..41769b9d573 Binary files /dev/null and b/docs/images/SwitchModeSequenceDiagram.png differ diff --git a/docs/images/TimeEventClassDiagram.png b/docs/images/TimeEventClassDiagram.png new file mode 100644 index 00000000000..f738f008c48 Binary files /dev/null and b/docs/images/TimeEventClassDiagram.png differ diff --git a/docs/images/TimeEventDiagram.png b/docs/images/TimeEventDiagram.png new file mode 100644 index 00000000000..c9eb5ebe638 Binary files /dev/null and b/docs/images/TimeEventDiagram.png differ diff --git a/docs/images/Ui.png b/docs/images/Ui.png index 5bd77847aa2..7508177a1de 100644 Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ diff --git a/docs/images/UiClassDiagram.png b/docs/images/UiClassDiagram.png index 7b4b3dbea45..20a02a14128 100644 Binary files a/docs/images/UiClassDiagram.png and b/docs/images/UiClassDiagram.png differ diff --git a/docs/images/UiClassDiagramUpdated.png b/docs/images/UiClassDiagramUpdated.png new file mode 100644 index 00000000000..94f08d31567 Binary files /dev/null and b/docs/images/UiClassDiagramUpdated.png differ diff --git a/docs/images/UiLabel.jpg b/docs/images/UiLabel.jpg new file mode 100644 index 00000000000..39e5ca826cc Binary files /dev/null and b/docs/images/UiLabel.jpg differ diff --git a/docs/images/ViewCommandSequenceDiagram.png b/docs/images/ViewCommandSequenceDiagram.png new file mode 100644 index 00000000000..dafe9f04de1 Binary files /dev/null and b/docs/images/ViewCommandSequenceDiagram.png differ diff --git a/docs/images/chrystalquek.png b/docs/images/chrystalquek.png new file mode 100644 index 00000000000..0c10a25f254 Binary files /dev/null and b/docs/images/chrystalquek.png differ diff --git a/docs/images/claraadora.png b/docs/images/claraadora.png new file mode 100644 index 00000000000..64f57ab1f71 Binary files /dev/null and b/docs/images/claraadora.png differ diff --git a/docs/images/gabztcr.png b/docs/images/gabztcr.png new file mode 100644 index 00000000000..92ac1e40a49 Binary files /dev/null and b/docs/images/gabztcr.png differ diff --git a/docs/images/helpMessage.JPG b/docs/images/helpMessage.JPG new file mode 100644 index 00000000000..039528d87e4 Binary files /dev/null and b/docs/images/helpMessage.JPG differ diff --git a/docs/images/helpMessage.png b/docs/images/helpMessage.png deleted file mode 100644 index b1f70470137..00000000000 Binary files a/docs/images/helpMessage.png and /dev/null differ diff --git a/docs/images/merlinlim.png b/docs/images/merlinlim.png new file mode 100644 index 00000000000..69043784c2c Binary files /dev/null and b/docs/images/merlinlim.png differ diff --git a/docs/images/shadowezz.png b/docs/images/shadowezz.png new file mode 100644 index 00000000000..c398f8c3435 Binary files /dev/null and b/docs/images/shadowezz.png differ diff --git a/docs/index.md b/docs/index.md index 7601dbaad0d..8024271084e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,19 +1,21 @@ --- layout: page -title: AddressBook Level-3 +title: Productiv --- -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) -[![codecov](https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg)](https://codecov.io/gh/se-edu/addressbook-level3) +[![CI Status](https://github.com/AY2021S1-CS2103T-F11-2/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2021S1-CS2103T-F11-2/tp/actions) +[![codecov](https://codecov.io/gh/AY2021S1-CS2103T-F11-2/tp/branch/master/graph/badge.svg)](https://codecov.io/gh/AY2021S1-CS2103T-F11-2/tp) ![Ui](images/Ui.png) -**AddressBook is a desktop application for managing your contact details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). - -* If you are interested in using AddressBook, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). -* If you are interested about developing AddressBook, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. +**Productiv is a desktop application for product managers like yourself to organise your product-related information.** +While it has a Graphical User +Interface, most of your user interactions will happen through a Command Line Interface. +Want to be **productive** in managing your **product**? Head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start) to get started! +Otherwise, for those keen on developing Productiv, you may have a look at our [**Developer Guide**](DeveloperGuide.html). **Acknowledgements** -* Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5) +* Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), +[JUnit5](https://github.com/junit-team/junit5), [fx-progress-circle](https://github.com/torakiki/fx-progress-circle/) diff --git a/docs/team/chrystalquek.md b/docs/team/chrystalquek.md new file mode 100644 index 00000000000..49c877a2137 --- /dev/null +++ b/docs/team/chrystalquek.md @@ -0,0 +1,62 @@ +--- +layout: page +title: Chrystal Quek's Project Portfolio Page +--- + +### Project: Productiv + +Productiv is a desktop application for product managers to organise their product-related information. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 20 kLoC. + +Given below are my contributions to the project. + +**Code contributed**: [RepoSense](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=chrystalquek) + +##### New features and Enhancements + +* **New Feature**: Added the ability to switch modes. + * What it does: Allows the user to `switch` to the different modes of the app. The user can also click on the tabs in the navigation bar. Subsequent commands are executed with respect to the current mode. + * Justification: This feature improves the user experience significantly because the user can just choose to see only deliverable, meeting or contact related information. This makes the application less cluttered and more organised. + + The user can also remember less commands, e.g. the `add` command word can be used to add a deliverable, meeting or contact, depending on the mode the user is currently in. + * Highlights: This feature was very difficult to implement and required significant restructuring of the entire application. I had to make the UI change whenever there was a switch in mode and ensure that the subsequent commands were passed to the correct `LogicManager`s for execution. + +* **Major enhancement**: Updated Person to user-facing Contact that is more useful for product-management. + * What it does: Allows the user to CRUD contacts in Productiv. + * Justification: Helps users keep track of the developers and stakeholders that are involved in the development of the product. + * Highlights: Refactored Person to user-facing Contact. A Contact can have a `Role` (developer or stakeholder) and also a `Description`. + After careful consideration, decided to remove attributes that would not be important for product-management such as `Address` and `Tag`. + +* **Major enhancement**: Improved list UI. Created a table format for list UI and made sure to only display fields that are more important to the user. + +* **Enhancements to existing features**: + * Updated the GUI color scheme: [\#48](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/48) + * Edited GUI for overall cohesiveness: [\#119](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/119) + + +##### Project management + * Organised and lead some weekly team meetings. + * Facilitated task delegation. + * Ensured that deadlines were met. + +##### Contributions to team-based tasks + * Created skeleton for switching modes: [\#32](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/32), [\#106](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/106) + * Necessary general code enhancements + * Changed product icon and name and renamed jar file: [\#119](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/119) + * Changed log file name: [\#188](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/188) + * Updated Person to user-facing Contact that is more useful for product-management: [\#37](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/37), [\#67](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/67) + * Enabled assertions in Gradle: [\#94](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/94) + * Clarified and followed up with reviewers of PE-D on behalf of team: [\#4](https://github.com/khoodehui/ped/issues/4), [\#3](https://github.com/zhaohuanqdcn/ped/issues/3) + * Standardized App feedback messages: [\#124](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/124) + +##### Community + * PRs reviewed (with non-trivial review comments): [\#105](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/105), [\#70](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/70), [#34](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/34) + * Total PRs reviewed: 20+, Total comments given: 80+ + * Reported bugs and suggestions for other teams (during PE-D): [#11](https://github.com/chrystalquek/ped/issues/11), [#7](https://github.com/chrystalquek/ped/issues/7) + +##### Documentation + * User Guide: + * Updated documentation for contact feature: [\#124](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/124) + * Added documentation for dashboard feature : [\#216](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/216) + * Developer Guide: + * Added implementation details of the `switch` feature. Included UML diagrams `SwitchModeSequenceDiagram`, `SwitchModeActivityDiagram` and `SwitchModeMouseInputSequenceDiagram`: [\#241](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/241) + * Updated almost the entire Appendix, including Instructions for Manual Testing and Effort. Also introduced a neater structure to the Appendix: [\#229](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/229) diff --git a/docs/team/claraadora.md b/docs/team/claraadora.md new file mode 100644 index 00000000000..0d21e89908e --- /dev/null +++ b/docs/team/claraadora.md @@ -0,0 +1,63 @@ +--- +layout: page +title: Clara Adora's Project Portfolio Page +--- + +### Project: Productiv + +Productiv is a desktop application for product managers to organise their product-related information. +The user interacts with it using a CLI, and it has a GUI created with JavaFX. +It is written in Java, and has about 20 kLoC. + +Given below are my contributions to the project. + +**Code contributed**: [RepoSense](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=claraadora) + +##### New features and Enhancements + +* **New Feature**: Added the Calendar feature. + * What it does: displays all `Deliverable`s and `Meeting`s in a single sorted-by-time list in the dashboard + * Justification: allows product managers to check their deliverables and meetings together in one place + * Highlights: This new feature requires a thorough design analysis. Amendments and discussions were done to prevent couplings and preserve cohesiveness +* **New Feature**: Added the auto-sorting of `Deliverable`s and `Meeting`s + * What it does: auto-sorts `Deliverable`s and `Meeting`s in ascending chronological order. + * Justification: allows product managers to view their most urgent deliverables and meetings quickly, in neat sorted-by-time lists + * Highlights: Before settling with the current sorting implementation, an in-depth analysis of the `PriorityQueue` and binary search implementations was done +* **Enhancement**: Designed the current UI/UX of Productiv. + * What it does: enhances the UI/UX of Productiv to be slick, clean, and intuitive. + * Justification: Good UI/UX plays a significant role in user satisfaction and retention. + * Highlights: Designing the UI/UX is challenging but essential as Productiv has four modes. + Many designs were made and improved upon, before reaching the current clutter-free design. + +##### Project management +* Organised and led some weekly team meetings. +* Fascilitated and delegated tasks. +* Ensured that tasks were completed on time. + +##### Contributions to team-based tasks +* Restructured AB3 to allow the addition of the deliverable, meeting, and mode components +[\#38](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/38) +* Created the skeleton of the Meeting component +[\#47](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/47) +* Filled application with synchronized seed data that make sense and reflective of product managers' busy schedule +[\#237](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/237) +* Updated user and developer guides that are not specific to my responsibilities + +##### Community +* Reported bugs and suggestions for a team [(link to issues)](https://github.com/claraadora/ped/issues) +* Reviewed PRs with non-trivial comments (examples: +[\#32](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/32), +[\#98](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/98), +[\#108](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/108), +[\#52](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/52)) +* Total PRs reviewed: 20+, Total comments given: 80+ + +##### Documentation +* User Guide + * Wrote the Introduction section [\#296](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/269/files) + * Co-wrote the Meeting subsection in the Feature section + * Added and edited all diagrams [\#296](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/269/files) + * Wrote the Command Summary tables [\#194](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/194) +* Developer Guide + * Updated the Architecture sequence diagram and Model component object diagram [\#242](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/242) + * Added the implementation details and diagrams of the Calendar and auto-sort feature [\#242](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/242) diff --git a/docs/team/gabztcr.md b/docs/team/gabztcr.md new file mode 100644 index 00000000000..19316b54f15 --- /dev/null +++ b/docs/team/gabztcr.md @@ -0,0 +1,66 @@ +--- +layout: page +title: Gabriel Tan's Project Portfolio Page +--- + +## Project: Productiv + +Productiv is a one-stop desktop app for product managers like yourself to organise your contacts, deliverables and +meetings, so that you can track your product’s development easily. +The user interacts with it using a CLI, and it has a GUI created with JavaFX. +It is written in Java, and has about 20 kLoC. + +Given below are my contributions to the project. + +**Code contributed**: [RepoSense](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=gabztcr) + +##### New features and enhancements + +* **New Feature**: Deliverables (specifically add, edit and delete commands). + * What it does: This feature allows the user to track their product's deliverables easily with basic CRUD features. + * Justification: This key feature improves the product significantly because the user is a product manager who needs to have his deliverables organised so that he can work better towards production deadlines. + * Highlights: While this mode has its own UI screen in Productiv, the deliverable list itself would eventually be referenced in the dashboard. + As such, the implementation had to be done carefully with forward-thinking to ensure that such referencing would be smooth and adhere to coding standards, e.g. abstractions. + * Credits: Most of the code was reused from the original AddressBook, less minor tweakings for deliverable fields and test cases. + +* **New Feature**: Overall Completion Percentage (OCP). + * What it does: This feature gives the user an overview of the progress of the product' development using a donut chart. It is found in the left panel of the dashboard. + * Justification: This feature enhances the product greatly because the user is able to immediately see how much of the product is completed and adjust their priorities accordingly to meet production deadlines. + * Highlights: The OCP's colour and animation were adjusted to suit the app and make its general UI more appealing to users. + Although the library and its tutorial were available, implementing it was very challenging since the code bases were very different. + * Credits: The third-party library [fx-progress-circle](https://github.com/torakiki/fx-progress-circle/) and its [tutorial](https://youtu.be/9SEE8UP17jo) were used to implement this feature. + +* **Enhancements to existing features**: + * Implement autosort feature for deliverables that sorts them chronologically by deadline (PR [\#123](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/123)). + * Disabled clearing/listing of empty deliverable, meeting or contact lists (PR [\#240](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/240)). + * Enabled `find` command to accommodate punctuations when matching keywords to deliverables, meetings or contacts (PR [\#250](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/250)). + +##### Contributions to team-based tasks + * Created a shortened URL link of the User Guide for the GUI's help window. + * Wrote additional tests for deliverables to increase coverage (PRs [\#112](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/112), [\#123](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/123)). + * Amended all error messages for the feedback box in Productiv (PR [\#228](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/228)). + * Amended the alignment of and ordering within the UI of Productiv (PR [\#256](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/256)). + +##### Project management + + * Set up [GitHub Projects](https://github.com/AY2021S1-CS2103T-F11-2/tp/projects/1) to track issues and PRs for Productiv. + * Hosted two sprint planning meetings to sync up on issues and discuss technical solutions. + * Managed milestone `mid-v1.4`. + * Created a timetable for PR merging to minimise merge conflicts when the team was working on our documentation together. + +##### Documentation + + * User Guide: + * Created the skeleton version from AddressBook (PR [\#29](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/29)). + * Added documentation for `list`, `find` and `clear` commands for contacts (PR [\#99](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/99)). + * Updated the notes about the command format under Features (PRs [\#214](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/214), [\#265](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/265)). + * Reordered the fields for all existing commands (PR [\#256](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/256)). + * Oversaw the general accuracy, consistency and formatting. + * Developer Guide: + * Added implementation details of the OCP feature (PR [\#107](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/107)). + * Amended User Stories and Use Cases (PR [\#265](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/265)). + +##### Community + + * Reviewed PRs with non-trivial comments (PRs [\#188](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/188), [\#189](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/189)). + * Reported bugs and suggestions for other teams (examples: [1](https://github.com/gabztcr/ped/issues/7), [2](https://github.com/gabztcr/ped/issues/6), [3](https://github.com/gabztcr/ped/issues/5)). diff --git a/docs/team/merlinlim.md b/docs/team/merlinlim.md new file mode 100644 index 00000000000..e10f626a30a --- /dev/null +++ b/docs/team/merlinlim.md @@ -0,0 +1,108 @@ +--- +layout: page +title: Merlin Lim's Project Portfolio Page +--- + +### Project: Productiv + +Productiv is a desktop application for product managers to organise their product-related information. +The user interacts with it using a CLI, and it has a GUI created with JavaFX. +It is written in Java, and has about 20 kLoC. + +Given below are my contributions to the project. + +**Code contributed**: +[RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=merlinlim) + +##### New features and Enhancements + +* **New Feature**: Delete command for Meeting + * Delete command for meeting allows users to delete meeting from list. + * This feature allows users to remove meetings which may have been done or cancelled. +* **New Feature**: Edit command for meeting + * Edit command for meeting allows users to edit meeting from list. + * This feature allows users to edit a specific meeting when details have changed (e.g Time, Location, etc). +* **New Feature**: Find command for Meeting + * Find command for meeting allows users to find a meeting based on a keyword. + * This feature allows users to search for a specific meeting more conveniently. +* **New Feature**: List command for Meeting + * List command for meeting allows user to display all meetings. + * This feature allows users to the unfiltered list of meetings. +* **New Feature**: Date and time verification + * Date and time parses inputs as `DateTime` and `Time` classes. + * This feature allows users to compare field-parameters that extend from these classes, + i.e the schedule panel in Dashboard and Auto-sort feature compares DateTime classes and organises items from earliest to latest. + +* **Enhancements to existing features**: + * Updated the GUI for Schedule Panel + * Updated the GUI for Meeting + +##### Project management + * Organised and led some weekly team meetings + * Delegated tasks. + * Ensured deliverables were met by the end of the week + +##### Contributions to team-based tasks +* Create Delete command for Meeting: +[\#44](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/44), +[\#52](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/52) +* Create Edit command for Meeting: +[\75](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/75) +* Create find command for Meeting: +[\121](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/121) +* Create list command for Meeting: +[\121](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/121) +* Create DateTime class for Meeting: +[\#71](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/71) +* Create Time class for Meeting: +[\#211](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/211) +* Update Meeting GUI: +[\#230](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/230) +* Implement Date and Time Verification for Meeting +[\#73](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/73) +* Update Schedule UI +[#211](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/211) +* Bug Fixes: +[\#74](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/74), +[\#100](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/100), +[\#232](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/232) +* Update Productiv Logger: +[\#213](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/213) +* Increase Meeting Code Coverage: +[\111](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/111) + +##### Community + * PRs reviewed (with non-trivial review comments): + [\#77](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/77), + [\#99](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/99), + [\#19](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/228), + Total PR reviewed: 24, Total comments given: 100+ + * Reported bugs and suggestions for other teams (during PE-D): + [\#1](https://github.com/MerlinLim/ped/issues/1) + [\#2](https://github.com/MerlinLim/ped/issues/2) + [\#3](https://github.com/MerlinLim/ped/issues/3) + [\#4](https://github.com/MerlinLim/ped/issues/4) + +##### Documentation + * User Guide: + * Updated documentation for `meeting`: + [\#128](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/128) + * Include a Glossary: + [\#128](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/128) + * Did cosmetic tweaks to existing documentation of `deliverable`, `meeting` + and ensured overall structure and clarity: + [\#231](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/231) + * Developer Guide: + * Updated Logic component description and diagrams, ie `LogicClassDiagram` + and `CommandSequenceDiagram`: + [\#267](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/267) + * Updated Storage component description and included new diagrams, ie + `StorageClassDiagram` and `SaveStorageSequenceDiagram`: + [\#267](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/267) + * Added implementation details of Date and Time verification with UML diagram. + [\#103](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/103) + * Updated Appendix: Target Profile, User stories, Use cases, Non-Functional Requirements and Glossary: + [\#31](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/31), + [\#45](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/45). + * Updated manual testing. + [\#103](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/103) diff --git a/docs/team/shadowezz.md b/docs/team/shadowezz.md new file mode 100644 index 00000000000..5dedbc5b459 --- /dev/null +++ b/docs/team/shadowezz.md @@ -0,0 +1,70 @@ +--- +layout: page +title: Cao Wenjie's Project Portfolio Page +--- + +### Project: Productiv + +Productiv is a one-stop desktop app for product managers like yourself to organise your eliverables, meetings and contacts, +so that you can track your product’s development easily. + +The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 20 kLoC. + +Given below are my contributions to the project. + +**Code contributed**: [RepoSense link](https://nus-cs2103-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=shadowezz&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByRepos&checkedFileTypes=docs~functional-code~test-code~other) + +##### New Features and Enhancements + +* **New Feature**: Added the ability to complete deliverables. + * What it does: This allows the user to mark specific deliverables as completed after accomplishing them. + * Justification: This feature improves the product by allowing user to keep track of the completion status of different deliverables and + focus on those that are not completed yet. + * Highlights: This enhancement is used to display the project completion percentage in the dashboard (implemented by Gabriel) so + that the user can have a big picture of the progress of his/her product. + +* **New Feature**: Added the ability to mark deliverables as on-going. + * What it does: This allows the user to revert the completion status of deliverables from completed back to on-going. + * Justification: This feature complements the previous feature by providing the user with the flexibility of updating the completion + status of deliverables with changing requirements. It also allows easy amendments when the user accidentally completes the wrong deliverable, + so that he/she does not have to delete the original deliverable to create a new one. + +* **New Feature**: Added the view feature. + * What it does: This allows the user to view the full details of a specific deliverable, meeting or contact. + * Justification: This feature makes the application neater and more user-friendly as now the list of items in the left panel + can be succinct to show only what is important to the user. Full details of each item can be displayed on the right panel using + the view command based on user's discretion. + * Highlights: This feature is challenging to implement as it requires a good understanding of JavaFX to ensure that the display is + rendered properly. Furthermore, there are also many considerations regarding how the view panel should change with each command the user + inputs, which needs to be carefully thought out. + +**Major Enhancement**: + * Upgraded edit commands to allow clearing an optional field + * What it does: Allows the user to clear away information from an optional field of an existing deliverable, meeting or contact through the + edit command. + * Justification: As optional fields can be left empty, this feature will provide the user with the convenience of removing optional fields that + are no longer relevant, instead of having to delete the entire item and add it again. + +**Enhancements to existing features**: + * Upgraded deliverable to include a new milestone field. [\#72](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/72) + * Updated the GUI to display the milestone and completion status of a deliverable as tags. [\#55](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/55) + +##### Contributions to team-based tasks + * Created the skeleton code for deliverable. [\#35](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/35) + * Implemented find, list and clear commands for deliverable. [\#116](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/116) + +##### Project management + * Led two team meetings, which involves setting the agenda and documenting what was discussed. + * In charge of opening, closing and assigning issues for the earlier milestones. + * Reviewed and provided constructive feedback for teammates' PR. [\#211](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/211), + [\#229](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/229) + +##### Documentation + * User Guide: + * Added documentation for the commands `done`, `undone` and `view`. [\#195](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/195), + [\#260](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/260) + * Added some FAQs [\#126](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/126) + * Developer Guide: + * Added description and `UiClassDiagram` of the UI component. [\#253](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/253) + * Added implementation details of the `done` and `view` feature. Included UML diagrams `DoneCommandSequenceDiagram` and + `ViewCommandSequenceDiagram`. [\#253](https://github.com/AY2021S1-CS2103T-F11-2/tp/pull/253) diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md deleted file mode 100644 index 6907e29456c..00000000000 --- a/docs/tutorials/AddRemark.md +++ /dev/null @@ -1,394 +0,0 @@ ---- -layout: page -title: "Tutorial: Adding a command" ---- - -Let's walk you through the implementation of a new command — `remark`. - -This command allows users of the AddressBook application to add optional remarks to people in their address book and edit it if required. The command should have the following format: - -`remark INDEX r/REMARK` (e.g., `remark 2 r/Likes baseball`) - -We’ll assume that you have already set up the development environment as outlined in the Developer’s Guide. - - -## Create a new `remark` command - -Looking in the `logic.command` package, you will notice that each existing command have their own class. All the commands inherit from the abstract class `Command` which means that they must override `execute()`. Each `Command` returns an instance of `CommandResult` upon success and `CommandResult#feedbackToUser` is printed to the `ResultDisplay`. - -Let’s start by creating a new `RemarkCommand` class in the `src/main/java/seedu/address/logic/command` directory. - -For now, let’s keep `RemarkCommand` as simple as possible and print some output. We accomplish that by returning a `CommandResult` with an accompanying message. - -**`RemarkCommand.java`:** - -``` java -package seedu.address.logic.commands; - -import seedu.address.model.Model; - -/** - * Changes the remark of an existing person in the address book. - */ -public class RemarkCommand extends Command { - - public static final String COMMAND_WORD = "remark"; - - @Override - public CommandResult execute(Model model) { - return new CommandResult("Hello from remark"); - } -} -``` - -### Hook `RemarkCommand` into the application - -Now that we have our `RemarkCommand` ready to be executed, we need to update `AddressBookParser#parseCommand()` to recognize the `remark` keyword. Add the new command to the `switch` block by creating a new `case` that returns a new instance of `RemarkCommand`. - -You can refer to the changes in this [diff](https://github.com/se-edu/addressbook-level3/commit/35eb7286f18a029d39cb7a29df8f172a001e4fd8#diff-34ace715a8a8d2e5a66e71289f017b47). - -### Run the application - -Run `Main#main` and try out your new `RemarkCommand`. If everything went well, you should see something like this: - -![Output displayed](../images/add-remark/RemarkHello.png) - -## Change `RemarkCommand` to throw an exception - -While we have successfully printed a message to `ResultDisplay`, the command does not do what it is supposed to do. Let’s change the command to throw an `CommandException` to accurately reflect that our command is still a work in progress. - -![The relationship between RemarkCommand and Command](../images/add-remark/CommandInterface.png) - -Following the convention in other commands, we add relevant messages as constants and use them. - -**`RemarkCommand.java`:** - -``` java - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the remark of the person identified " - + "by the index number used in the last person listing. " - + "Existing remark will be overwritten by the input.\n" - + "Parameters: INDEX (must be a positive integer) " - + "r/ [REMARK]\n" - + "Example: " + COMMAND_WORD + " 1 " - + "r/ Likes to swim."; - - public static final String MESSAGE_NOT_IMPLEMENTED_YET = "Remark command not implemented yet"; - - @Override - public CommandResult execute(Model model) throws CommandException { - throw new CommandException(MESSAGE_NOT_IMPLEMENTED_YET); - } -``` - -## Enhancing `RemarkCommand` - -Let’s change `RemarkCommand` to parse input from the user. - -### Make the command accept parameters - -We start by modifying the constructor of `RemarkCommand` to accept an `Index` and a `String`. While we are at it, let’s change the error message to echo the values. While this is not a replacement for tests, it is an obvious way to tell if our code is functioning as intended. - -``` java -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; -//... -public class RemarkCommand extends Command { - //... - public static final String MESSAGE_ARGUMENTS = "Index: %1$d, Remark: %2$s"; - - private final Index index; - private final String remark; - - /** - * @param index of the person in the filtered person list to edit the remark - * @param remark of the person to be updated to - */ - public RemarkCommand(Index index, String remark) { - requireAllNonNull(index, remark); - - this.index = index; - this.remark = remark; - } - @Override - public CommandResult execute(Model model) throws CommandException { - throw new CommandException(String.format(MESSAGE_ARGUMENTS, index.getOneBased(), remark)); - } - - @Override - public boolean equals(Object other) { - // short circuit if same object - if (other == this) { - return true; - } - - // instanceof handles nulls - if (!(other instanceof RemarkCommand)) { - return false; - } - - // state check - RemarkCommand e = (RemarkCommand) other; - return index.equals(e.index) - && remark.equals(e.remark); - } -} -``` - -Your code should look something like [this](https://github.com/se-edu/addressbook-level3/commit/35eb7286f18a029d39cb7a29df8f172a001e4fd8#diff-34ace715a8a8d2e5a66e71289f017b47) after you are done. - -### Parse user input - -Now let’s move on to writing a parser that will extract the index and remark from the input provided by the user. - -Create a `RemarkCommandParser` class in the `seedu.address.logic.parser` package. The class must extend the `Parser` interface. - -![The relationship between Parser and RemarkCommandParser](../images/add-remark/ParserInterface.png) - -Thankfully, `ArgumentTokenizer#tokenize()` makes it trivial to parse user input. Let’s take a look at the JavaDoc provided for the function to understand what it does. - -**`ArgumentTokenizer.java`:** - -``` java -/** - * Tokenizes an arguments string and returns an {@code ArgumentMultimap} - * object that maps prefixes to their respective argument values. Only the - * given prefixes will be recognized in the arguments string. - * - * @param argsString Arguments string of the form: - * {@code preamble value value ...} - * @param prefixes Prefixes to tokenize the arguments string with - * @return ArgumentMultimap object that maps prefixes to their - * arguments - */ -``` - -We can tell `ArgumentTokenizer#tokenize()` to look out for our new prefix `r/` and it will return us an instance of `ArgumentMultimap`. Now let’s find out what we need to do in order to obtain the Index and String that we need. Let’s look through `ArgumentMultimap` : - -**`ArgumentMultimap.java`:** - -``` java -/** - * Returns the last value of {@code prefix}. - */ -public Optional getValue(Prefix prefix) { - List values = getAllValues(prefix); - return values.isEmpty() ? Optional.empty() : - Optional.of(values.get(values.size() - 1)); -} -``` - -This appears to be what we need to get a String of the remark. But what about the Index? Let's take a quick peek at existing `Command` that uses an index to see how it is done. - -**`DeleteCommandParser.java`:** - -``` java -Index index = ParserUtil.parseIndex(args); -return new DeleteCommand(index); -``` - -There appears to be another utility class that obtains an `Index` from the input provided by the user. - -Now that we have the know-how to extract the data that we need from the user’s input, we can parse the user command and create a new instance of `RemarkCommand`, as given below. - -**`RemarkCommandParser.java`:** - -``` java -public RemarkCommand parse(String args) throws ParseException { - requireNonNull(args); - ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, - PREFIX_REMARK); - - Index index; - try { - index = ParserUtil.parseIndex(argMultimap.getPreamble()); - } catch (IllegalValueException ive) { - throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, - RemarkCommand.MESSAGE_USAGE), ive); - } - - String remark = argMultimap.getValue(PREFIX_REMARK).orElse(""); - - return new RemarkCommand(index, remark); -} -``` - -
- -:information_source: Don’t forget to update `AddressBookParser` to use our new `RemarkCommandParser`! - -
- -If you are stuck, check out the sample -[here](https://github.com/se-edu/addressbook-level3/commit/dc6d5139d08f6403da0ec624ea32bd79a2ae0cbf#diff-fc19ecee89c3732a62fbc8c840250508). - -## Add `Remark` to the model - -Now that we have all the information that we need, let’s lay the groundwork for propagating the remarks added into the in-memory storage of person data. We achieve that by working with the `Person` model. Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the person’s name). That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a person. - -### Add a new `Remark` class - -Create a new `Remark` in `seedu.address.model.person`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code. - -A copy-paste and search-replace later, you should have something like [this](https://github.com/se-edu/addressbook-level3/commit/4516e099699baa9e2d51801bd26f016d812dedcc#diff-af2f075d24dfcd333876f0fbce321f25). Note how `Remark` has no constrains and thus does not require input -validation. - -### Make use of `Remark` - -Let’s change `RemarkCommand` and `RemarkCommandParser` to use the new `Remark` class instead of plain `String`. These should be relatively simple changes. - -## Add a placeholder element for remark to the UI - -Without getting too deep into `fxml`, let’s go on a 5 minute adventure to get some placeholder text to show up for each person. - -Simply add the following to [`seedu.address.ui.PersonCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-0c6b6abcfac8c205e075294f25e851fe). - -**`PersonCard.java`:** - -``` java -@FXML -private Label remark; -``` - - -`@FXML` is an annotation that marks a private or protected field and makes it accessible to FXML. It might sound like Greek to you right now, don’t worry — we will get back to it later. - -Then insert the following into [`main/resources/view/PersonListCard.fxml`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-12580431f55d7880578aa4c16f249e71). - -**`PersonListCard.fxml`:** - -``` xml -