Skip to content

Commit

Permalink
Merge pull request AY2425S1-CS2103T-F15-2#63 from btbrandon/refactor-…
Browse files Browse the repository at this point in the history
…help-page

Refactor Help Page
  • Loading branch information
juliantayyc authored Oct 17, 2024
2 parents 0d9c02a + 42cadc6 commit 76924c3
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 16 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ dependencies {
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.7.4'

testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: jUnitVersion

testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jUnitVersion
}

Expand Down
Binary file modified docs/images/helpMessage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ public class EditCommand extends Command {
+ "by the studentId assigned to the corresponding student. "
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: STUDENTID (must be a valid and existing 8-digit Student ID) "
+ "[" + PREFIX_STUDENTID + "STUDENTID] "
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_PHONE + "PHONE] "
+ "[" + PREFIX_EMAIL + "EMAIL] "
+ "[" + PREFIX_ADDRESS + "ADDRESS] "
+ "[" + PREFIX_COURSE + " COURSE] "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ PREFIX_STUDENTID + "STUDENTID "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_ADDRESS + "ADDRESS "
+ PREFIX_COURSE + " COURSE "
+ PREFIX_TAG + "TAG...\n"
+ "Example: " + COMMAND_WORD + " 12345678 "
+ PREFIX_PHONE + "91234567 "
+ PREFIX_EMAIL + "[email protected]";
Expand Down
59 changes: 58 additions & 1 deletion src/main/java/seedu/address/ui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,64 @@
public class HelpWindow extends UiPart<Stage> {

public static final String USERGUIDE_URL = "https://se-education.org/addressbook-level3/UserGuide.html";
public static final String HELP_MESSAGE = "Refer to the user guide: " + USERGUIDE_URL;
public static final String HELP_MESSAGE =
"============================================================================================\n"
+ " H E L P M E N U\n"
+ "============================================================================================\n"
+ "\n1. Add Student\n"
+ " - Purpose: Adds a student and their details to the address book.\n"
+ " - Command Format:\n"
+ " add id/ [STUDENT_ID] n/ [STUDENT_NAME] p/ [PHONE_NUMBER] a/ [ADDRESS] c/ [COURSE] t/ [TAGS]\n"
+ " - Example:\n"
+ " add id/ 12345678 n/ John Doe p/ 99999999 a/ 123 Jane Doe Road "
+ "c/ Computer Science t/ Student\n"
+ "\n2. Add a Student Grade\n"
+ " - Purpose: Adds a grade for a student in a module.\n"
+ " - Command Format:\n"
+ " grade id/ [STUDENT_ID] m/ [MODULE] g/ [GRADE]\n"
+ " - Example:\n"
+ " grade id/ 12345678 m/ CS2103T g/ A\n"
+ "\n3. Add Module\n"
+ " - Purpose: Adds a module for a student.\n"
+ " - Command Format:\n"
+ " module id/ [STUDENT_ID] m/ [MODULE]\n"
+ " - Example:\n"
+ " module id/ 12345678 m/ CS2103T\n"
+ "\n4. Edit Student\n"
+ " - Purpose: Edits a student's details according to the fields specified.\n"
+ " - Command Format:\n"
+ " edit [STUDENT_ID] [FIELD_TO_EDIT_PREFIX] [NEW_VALUE]\n"
+ " - Editable Fields:\n"
+ " n/ [STUDENT_NAME], p/ [PHONE_NUMBER], e/ [EMAIL], a/ [ADDRESS], c/ [COURSE], t/ [TAG]\n"
+ " - Example:\n"
+ " edit 12345678 n/ Jane Doe p/ 88888888 e/ [email protected] "
+ "a/ 456 John Doe Road c/ Physics t/ Student\n"
+ "\n5. Delete Student\n"
+ " - Purpose: Removes a student from the address book.\n"
+ " - Command Format:\n"
+ " delete id/ [STUDENT_ID]\n"
+ " - Example:\n"
+ " delete id/ 12345678\n"
+ "\n6. List Students\n"
+ " - Purpose: Displays all students currently stored in the address book.\n"
+ " - Command Format:\n"
+ " list\n"
+ " - Example:\n"
+ " list\n"
+ "\n7. Clear Data\n"
+ " - Purpose: Clears all student data from the address book.\n"
+ " - Command Format:\n"
+ " clear\n"
+ " - Example:\n"
+ " clear\n"
+ "\n8. Exit Application\n"
+ " - Purpose: Exits the application.\n"
+ " - Command Format:\n"
+ " exit\n"
+ " - Example:\n"
+ " exit\n"
+ "\n============================================================================================\n"
+ "For more details, refer to the user guide: \n" + USERGUIDE_URL;

private static final Logger logger = LogsCenter.getLogger(HelpWindow.class);
private static final String FXML = "HelpWindow.fxml";
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/view/HelpWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.stage.Stage?>

<fx:root resizable="false" title="Help" type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
Expand All @@ -19,17 +19,17 @@
<URL value="@HelpWindow.css" />
</stylesheets>

<HBox alignment="CENTER" fx:id="helpMessageContainer">
<VBox alignment="CENTER" fx:id="helpMessageContainer">
<children>
<Label fx:id="helpMessage" text="Label">
<HBox.margin>
<VBox.margin>
<Insets right="5.0" />
</HBox.margin>
</VBox.margin>
</Label>
<Button fx:id="copyButton" mnemonicParsing="false" onAction="#copyUrl" text="Copy URL">
<HBox.margin>
<VBox.margin>
<Insets left="5.0" />
</HBox.margin>
</VBox.margin>
</Button>
</children>
<opaqueInsets>
Expand All @@ -38,7 +38,7 @@
<padding>
<Insets bottom="10.0" left="5.0" right="10.0" top="5.0" />
</padding>
</HBox>
</VBox>
</Scene>
</scene>
</fx:root>

0 comments on commit 76924c3

Please sign in to comment.