Skip to content

Commit

Permalink
Merge branch 'master' into fix-ug-pdf-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mfjkri committed Nov 11, 2023
2 parents d0ddd3e + fb47d96 commit b1d53de
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ public ThemeCommand parse(String args) throws ParseException {
String.format(MESSAGE_INVALID_COMMAND_FORMAT, ThemeCommand.MESSAGE_USAGE));
}

String[] splitArgs = trimmedArgs.split("\\s+");
if (splitArgs.length > 1) {
throw new ParseException(
String.format(MESSAGE_UNKNOWN_THEME, ThemeCommand.MESSAGE_USAGE));
}

String theme = splitArgs[0];
String theme = trimmedArgs.split("\\s+")[0];

switch(theme) {

Expand Down
8 changes: 1 addition & 7 deletions src/main/resources/view/CalendarRow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>

<GridPane xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<HBox fx:id="rowLeftBox" alignment="CENTER_LEFT" minHeight="50" prefWidth="200" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="15" />
</padding>
<HBox spacing="5" alignment="CENTER_LEFT">
<Label fx:id="id" styleClass="cell_big_label">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
<Label fx:id="id" styleClass="cell_big_label"/>
<Label fx:id="name" styleClass="cell_big_label" />
</HBox>
</HBox>
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/view/PersonListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
</columnConstraints>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="15" />
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/view/ScheduleListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<?import javafx.scene.layout.VBox?>
<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150"/>
</columnConstraints>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="15"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package seedu.address.logic.parser;

import static seedu.address.logic.Messages.MESSAGE_DUPLICATE_FIELDS;
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CommandParserTestUtil.assertParseFailure;
import static seedu.address.logic.parser.CommandParserTestUtil.assertParseSuccess;
Expand Down Expand Up @@ -70,9 +69,4 @@ public void parse_validArgs_success() {
// valid Schedule status for Completed
assertParseSuccess(parser, "1 m/1", new MarkScheduleCommand(INDEX_FIRST_PERSON, Status.COMPLETED));
}

@Test
public void parse_multiplePrefixes_failure() {
assertParseFailure(parser, "1 m/0 m/1", MESSAGE_DUPLICATE_FIELDS + "m/");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ public void parse_unknownTheme_throwsParseException() {
ThemeCommand.MESSAGE_USAGE));
}

@Test
public void parse_twoThemes_throwsParseException() {
assertParseFailure(parser, "blue green", String.format(MESSAGE_UNKNOWN_THEME,
ThemeCommand.MESSAGE_USAGE));
}

@Test
public void parse_validArgs_returnsThemeCommand() {
ThemeCommand expectedThemeCommand1 =
Expand Down

0 comments on commit b1d53de

Please sign in to comment.