From 9fdbc4a1259a466fd77e681707857426255bcea1 Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 16:56:10 +0800 Subject: [PATCH 1/7] fixes #151 --- src/main/java/seedu/address/ui/HelpWindow.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 12f5b63022d..b4a210e8a59 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -15,7 +15,7 @@ */ public class HelpWindow extends UiPart { public static final String USERGUIDE_URL = - "https://github.com/AY2122S2-CS2103T-W11-4/tp/blob/master/docs/UserGuide.md"; + "https://ay2122s2-cs2103t-w11-4.github.io/tp/UserGuide.html"; private static final String HELP_ADD_MESSAGE = "\nTo add contact:\n add n/{name} e/{email} a/{address}\n"; private static final String HELP_LIST_MESSAGE = From ebce6bdf4e54cea79d75ec5a062a85d3ab9d8626 Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 16:59:22 +0800 Subject: [PATCH 2/7] fixes #144 Improve tag field error message --- src/main/java/seedu/address/model/tag/Tag.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/model/tag/Tag.java b/src/main/java/seedu/address/model/tag/Tag.java index b0ea7e7dad7..988dc746384 100644 --- a/src/main/java/seedu/address/model/tag/Tag.java +++ b/src/main/java/seedu/address/model/tag/Tag.java @@ -9,7 +9,8 @@ */ public class Tag { - public static final String MESSAGE_CONSTRAINTS = "Tags names should be alphanumeric"; + public static final String MESSAGE_CONSTRAINTS = "Tag names should: " + + "\n1. Be alphanumeric \n2. Not contain spaces\n3. Not be empty"; public static final String VALIDATION_REGEX = "\\p{Alnum}+"; public final String tagName; From be3a6ad170cf458544700dabeeeeaac98ebee16b Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 17:04:19 +0800 Subject: [PATCH 3/7] fixes #117 Update error message for Add command --- docs/UserGuide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 3e686751355..7242a4ea66d 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -244,7 +244,7 @@ Format: `help` Adds a contact to the contact list. -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE [tele/TELEGRAM] [t/TAG]…​` +Format: `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE tele/TELEGRAM [t/TAG]…​` > :bulb: **TIP:** A contact can have any number of tags, or none at all. From 7da7fa470212c8b0775905a14121e89a8c1a5451 Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 17:19:40 +0800 Subject: [PATCH 4/7] fixes #113 and #120 regarding color schemes of UI 1. Text colour in the orange text box can make it hard to read messages. 2. Suggestion on colour scheme used. --- src/main/resources/view/NusTheme.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/view/NusTheme.css b/src/main/resources/view/NusTheme.css index 7eada016ae9..f668cc869c7 100644 --- a/src/main/resources/view/NusTheme.css +++ b/src/main/resources/view/NusTheme.css @@ -150,7 +150,7 @@ -fx-background-color: transparent; -fx-font-family: "Courier New"; -fx-font-size: 13pt; - -fx-text-fill: white; + -fx-text-fill: black; } .result-display .label { From 93e325e61e3d5e6f3a91ac1c535c325e7191c08c Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 18:18:03 +0800 Subject: [PATCH 5/7] fixes #123 Improve Telegram field error message Improved Email field error message --- src/main/java/seedu/address/model/person/Email.java | 3 ++- .../java/seedu/address/model/telegram/Telegram.java | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/seedu/address/model/person/Email.java b/src/main/java/seedu/address/model/person/Email.java index f866e7133de..b464dc60607 100644 --- a/src/main/java/seedu/address/model/person/Email.java +++ b/src/main/java/seedu/address/model/person/Email.java @@ -20,7 +20,8 @@ public class Email { + "The domain name must:\n" + " - end with a domain label at least 2 characters long\n" + " - have each domain label start and end with alphanumeric characters\n" - + " - have each domain label consist of alphanumeric characters, separated only by hyphens, if any."; + + " - have each domain label consist of alphanumeric characters, separated only by hyphens " + + "or underscores, if any."; // alphanumeric and special characters private static final String ALPHANUMERIC_NO_UNDERSCORE = "[^\\W_]+"; // alphanumeric characters except underscore private static final String LOCAL_PART_REGEX = "^" + ALPHANUMERIC_NO_UNDERSCORE + "([" + SPECIAL_CHARACTERS + "]" diff --git a/src/main/java/seedu/address/model/telegram/Telegram.java b/src/main/java/seedu/address/model/telegram/Telegram.java index 3498aee2d24..1f12bd98d2f 100644 --- a/src/main/java/seedu/address/model/telegram/Telegram.java +++ b/src/main/java/seedu/address/model/telegram/Telegram.java @@ -11,9 +11,13 @@ */ public class Telegram { - public static final String MESSAGE_CONSTRAINTS = "Following telegram's restrictions," - + " usernames must be 5 to 32 characters long and not ending with an underscore."; - + public static final String MESSAGE_CONSTRAINTS = "Telegram usernames should be of the format @name " + + "and adhere to the following constraints:\n" + + "- usernames should start with a '@' and followed by a name\n" + + "- name should be 5 to 32 characters long.\n" + + "- name should be alphanumeric.\n" + + "- name should not contain special characters except underscore.\n" + + "- name should not end with an underscore.\n"; /* * The first character of the address must not be a whitespace, * otherwise " " (a blank string) becomes a valid input. From 963d9fd1d8721998640b3a9a2b659f0eadbdee6a Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 18:58:28 +0800 Subject: [PATCH 6/7] fixes #117 Update error message for Add command --- docs/UserGuide.md | 2 +- src/main/java/seedu/address/logic/commands/AddCommand.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 7242a4ea66d..3e686751355 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -244,7 +244,7 @@ Format: `help` Adds a contact to the contact list. -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE tele/TELEGRAM [t/TAG]…​` +Format: `add n/NAME p/PHONE_NUMBER e/EMAIL f/FACULTY r/ROLE [tele/TELEGRAM] [t/TAG]…​` > :bulb: **TIP:** A contact can have any number of tags, or none at all. diff --git a/src/main/java/seedu/address/logic/commands/AddCommand.java b/src/main/java/seedu/address/logic/commands/AddCommand.java index 1f6af838628..e47330f50e1 100644 --- a/src/main/java/seedu/address/logic/commands/AddCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddCommand.java @@ -31,7 +31,7 @@ public class AddCommand extends Command { + PREFIX_EMAIL + "EMAIL " + PREFIX_FACULTY + "FACULTY " + PREFIX_ROLE + "ROLE " - + PREFIX_TELEGRAM + "TELEGRAM " + + "[" + PREFIX_TELEGRAM + "TELEGRAM] " + "[" + PREFIX_TAG + "TAG]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + "John Doe " From 172e0db99739b3d9c518d59efc16b07cd4ffd620 Mon Sep 17 00:00:00 2001 From: SimJM Date: Wed, 6 Apr 2022 19:09:46 +0800 Subject: [PATCH 7/7] checkstyle --- src/main/java/seedu/address/model/tag/Tag.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/address/model/tag/Tag.java b/src/main/java/seedu/address/model/tag/Tag.java index 988dc746384..774400036bc 100644 --- a/src/main/java/seedu/address/model/tag/Tag.java +++ b/src/main/java/seedu/address/model/tag/Tag.java @@ -9,8 +9,8 @@ */ public class Tag { - public static final String MESSAGE_CONSTRAINTS = "Tag names should: " + - "\n1. Be alphanumeric \n2. Not contain spaces\n3. Not be empty"; + public static final String MESSAGE_CONSTRAINTS = "Tag names should: " + + "\n1. Be alphanumeric \n2. Not contain spaces\n3. Not be empty"; public static final String VALIDATION_REGEX = "\\p{Alnum}+"; public final String tagName;