Skip to content

Commit 7847485

Browse files
authored
Merge pull request #4 from ziyi22/branch-A-UserGuide
Implement A-User Guide
2 parents 44adc51 + d3070b2 commit 7847485

File tree

8 files changed

+126
-39
lines changed

8 files changed

+126
-39
lines changed

docs/Judy.png

578 KB
Loading

docs/README.md

Lines changed: 104 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,120 @@
1-
# Duke User Guide
1+
# Judy User Guide
22

3-
// Update the title above to match the actual product name
3+
![judy image](./Judy.png)
44

5-
// Product screenshot goes here
5+
> Hi, I'm Judy! Your digital assistant for productivity.
66
7-
// Product intro goes here
7+
## Start Using Judy
8+
1. Click [here]() to download Judy.
9+
2. Navigate to your Downloads folder using the terminal.
10+
3. Enter `java -jar Judy.jar` in your terminal.
11+
4. Press enter.
12+
5. Start manage your task
813

9-
## Adding deadlines
14+
## Adding todo
1015

11-
// Describe the action and its outcome.
16+
Add a todo task in your list.
1217

13-
// Give examples of usage
18+
Example: `todo laundry`
1419

15-
Example: `keyword (optional arguments)`
20+
Expected output:
21+
```
22+
Got it! I've added this task:
23+
[T][ ] laundry
24+
Now you have 1 tasks in the list.
25+
```
26+
27+
## Adding Deadline
28+
29+
Add a deadline task in your list.
30+
31+
Example: `deadline Assignment 1 /by 2025-03-01 2359`
32+
33+
Expected output:
34+
```
35+
Got it! I've added this task:
36+
[D][ ] Assignment 1 (by: Jan 03 2025 11:59 PM)
37+
Now you have 2 tasks in the list.
38+
```
39+
40+
## Adding Event
41+
42+
Add an event task in your list.
43+
44+
Example: `event CNY party /from 2024-05-05 1400 /to 2024-05-05 2200`
45+
46+
Expected output:
47+
```
48+
Got it! I've added this task:
49+
[E][ ] CNY party (from: May 05 2024 02:00 PM to: May 05 2024 10:00 PM)
50+
Now you have 3 tasks in the list.
51+
```
52+
## Displaying task list
53+
54+
Display all the tasks in your task list.
55+
56+
Example: `list`
57+
58+
Expected output:
59+
```
60+
Here are the tasks in your task list:
61+
1. [T][ ] laundry
62+
2. [D][ ] Assignment 1 (by: Jan 03 2025 11:59 PM)
63+
3. [E][ ] CNY party (from: May 05 2024 02:00 PM to: May 05 2024 10:00 PM)
64+
```
65+
66+
## Mark a task
67+
68+
Use `mark` to mark a task as done by specifying the task index.
69+
The task index must be a positive integer.
70+
71+
Example: `mark 1`
72+
73+
Expected output:
74+
```
75+
Nice! I've marked this task as done:
76+
[T][X] laundry
77+
```
78+
79+
## Unmark a task
80+
81+
Use `unmark` to mark a task as undone by specifying the task index.
82+
The task index must be a positive integer.
1683

17-
// A description of the expected outcome goes here
84+
Example: `unmark 1`
1885

86+
Expected output:
1987
```
20-
expected output
88+
Nice! I've unmarked this task as done:
89+
[T][ ] laundry
2190
```
2291

23-
## Feature ABC
92+
## Delete a task
2493

25-
// Feature details
94+
Use `delete` to delete a task by specifying the task index.
95+
The task index must be a positive integer.
2696

97+
Example: `delete 1`
98+
99+
Expected output:
100+
```
101+
Noted. I've removed this task:
102+
[T][ ] laundry
103+
Now you have 2 tasks in the list.
104+
```
105+
106+
## Finding a task
107+
108+
Use `find` to find a task using keyword.
109+
110+
Example: `find Assingment`
111+
112+
Expected output:
113+
```
114+
Here are the matching tasks in your list:
115+
1. [D][ ] ssignment 1 (by: Jan 03 2025 11:59 PM)
116+
```
27117

28-
## Feature XYZ
118+
## Exit Judy
29119

30-
// Feature details
120+
Use `bye` to exit the chat.

judy.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
T | 0 | haha
2-
D | 1 | assignment 1 | May 05 2023 11:59 PM
3-
T | 0 | ziyi
41
E | 0 | formal night | Dec 12 2024 06:00 PM - Dec 12 2024 10:00 PM
52
T | 0 | grocery
63
T | 0 | return book
74
T | 0 | borrow book
8-
T | 0 | hi
9-
T | 0 | haha
5+
D | 0 | project | Feb 02 2024 11:59 PM

src/main/java/judy/javafx/DialogBox.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private DialogBox(String text, Image img, boolean isUser) {
4343

4444
Rectangle clip = new Rectangle(200, 200);
4545
dialog.setText(text);
46-
dialog.setWrappingWidth(300);
46+
//dialog.setWrappingWidth(300);
4747
displayPicture.setImage(img);
4848
displayPicture.setClip(clip);
4949
}

src/main/java/judy/ui/Messages.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public class Messages {
2222
* @return The help message.
2323
*/
2424
public static String helpMessage() {
25-
return (" Here are the commands that I understand!\n"
26-
+ " 1. To add a todo, type 'todo <description>'\n"
27-
+ " 2. To add a deadline, type 'deadline <description> /by <yyyy-mm-dd HHmm>' \n"
28-
+ " 3. To add an event, type 'event <description> /from <yyyy-mm-dd HHmm> /to <yyyy-mm-dd HHmm>'\n"
29-
+ " 4. To list out your tasks, type 'list'\n"
30-
+ " 5. To mark a task as done, type 'mark <task number>' \n"
31-
+ " 6. To mark a task as undone, type 'unmark <task number>' \n"
32-
+ " 7. To delete a task, type 'delete <task number>' \n"
33-
+ " 8. To exit the chat, type 'bye'\n"
25+
return ("Here are the commands that I understand!\n"
26+
+ "To add a todo, type 'todo <description>'\n"
27+
+ "To add a deadline, type 'deadline <description> /by <yyyy-mm-dd HHmm>' \n"
28+
+ "To add an event, type 'event <description> /from <yyyy-mm-dd HHmm> /to <yyyy-mm-dd HHmm>'\n"
29+
+ "To list out your tasks, type 'list'\n"
30+
+ "To mark a task as done, type 'mark <task number>' \n"
31+
+ "To mark a task as undone, type 'unmark <task number>' \n"
32+
+ "To delete a task, type 'delete <task number>' \n"
33+
+ "To exit the chat, type 'bye'"
3434
);
3535
}
3636

src/main/resources/view/DialogBox.fxml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@
99
<style>
1010
-fx-padding: 10px;
1111
</style>
12-
<HBox maxHeight="2E308" maxWidth="2E308" prefWidth="500.0">
12+
<HBox layoutY="10.0" maxHeight="2E308" maxWidth="2E308" prefHeight="174.0" prefWidth="400.0">
1313
<style>
1414
-fx-background-color: #FECBBB;
15-
-fx-background-radius: 30px;
15+
-fx-background-radius: 25px;
1616
-fx-spacing: 10px;
1717
-fx-padding: 20px;
1818
</style>
1919
<padding>
2020
<Insets bottom="15.0" left="5.0" right="5.0" top="15.0" />
2121
</padding>
22-
<ImageView fx:id="displayPicture" fitHeight="120" fitWidth="100" preserveRatio="true">
22+
<ImageView fx:id="displayPicture" fitHeight="102.0" fitWidth="95.0" preserveRatio="true">
2323
<HBox.margin>
24-
<Insets bottom="0.0"/>
24+
<Insets bottom="0.0" />
2525
</HBox.margin></ImageView>
26-
<Text fx:id="dialog" text="Label" textAlignment="LEFT">
26+
27+
<Text fx:id="dialog" lineSpacing="2.0" text="Label" wrappingWidth="350.0">
2728
<font>
2829
<Font name="Comic Sans MS" size="16.0" />
2930
</font>

src/main/resources/view/MainWindow.fxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<?import javafx.scene.layout.*?>
55
<?import javafx.scene.text.*?>
66

7-
<AnchorPane prefHeight="600" prefWidth="600" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="judy.javafx.MainWindow">
7+
<AnchorPane prefHeight="600" prefWidth="450" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="judy.javafx.MainWindow">
88

99
<!-- Root layout -->
1010
<children>

src/main/resources/view/UserDialogBox.fxml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
<style>
1010
-fx-padding: 10 10 10 90;
1111
</style>
12-
<HBox maxHeight="2E308" maxWidth="2E308" prefWidth="500">
12+
<HBox maxHeight="2E308" maxWidth="2E308" prefWidth="550">
1313
<style>
1414
-fx-background-color: #AAD9BB;
15-
-fx-background-radius: 30px;
15+
-fx-background-radius: 25px;
1616
-fx-spacing: 10px;
1717
-fx-padding: 20px;
1818
</style>
1919
<padding>
2020
<Insets bottom="15.0" left="5.0" right="4.0" top="15.0" />
2121
</padding>
22-
<Text fx:id="dialog" text="Label" textAlignment="RIGHT" >
22+
<Text fx:id="dialog" text="Label" textAlignment="RIGHT" wrappingWidth="300">
2323
<font>
2424
<Font name="Comic Sans MS" size="16.0" />
2525
</font>
2626
</Text>
27-
<ImageView fx:id="displayPicture" fitHeight="80" fitWidth="80" preserveRatio="true" />
27+
<ImageView fx:id="displayPicture" fitHeight="102.0" fitWidth="95.0" preserveRatio="true" />
2828
<HBox.margin>
2929
<Insets bottom="15.0" left="5.0" right="5.0" top="15.0" />
3030
</HBox.margin>

0 commit comments

Comments
 (0)