From 327a2f1a26ce145038644da9e8551826db60f2d2 Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 17:41:01 +0800 Subject: [PATCH 01/23] Fix issue 152 --- docs/DeveloperGuide.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 9c29130afc7..eccf49ad3c8 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -485,11 +485,10 @@ testers are expected to do more *exploratory* testing. ## **Appendix: Planned Enhancements** Team size: 5 -1. **Allow `filter` command to filter the contact list based on a combination of categories**: The current `filter` - command only allows the contact list to be filtered based on one specific category such as tags, salary range etc - and this may not be useful for users with a very huge number of contacts as filtering by only one category may still - return a long list. It is also not convenient for users who want to find contacts more specifically. We plan to - allow `filter` to filter the contact list more specifically. (e.g. `filter t/TAG s/SALARY_RANGE` will return - contacts with matching `TAG` and `SALARY_RANGE` that falls within what is specified) +1. **Have an error message show up when the data file is corrupted on startup**: The current address book simply starts +up with an empty list when the data in the json file is corrupted or has an invalid format. The current implementation +has a logger warning shown in the developer console, but not the app itself. We plan have an error message show up on +results display after startup of the app when the data is corrupted. + 2. **Store** the resume such that From e56b4770ebaa60477d6858701f4ee40e90949845 Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 17:56:49 +0800 Subject: [PATCH 02/23] Update issue 132 --- docs/DeveloperGuide.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index eccf49ad3c8..32877428f18 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -490,5 +490,12 @@ up with an empty list when the data in the json file is corrupted or has an inva has a logger warning shown in the developer console, but not the app itself. We plan have an error message show up on results display after startup of the app when the data is corrupted. -2. **Store** the resume such that +2. **Allow `filter` command to filter the contact list based on a combination of categories**: The current `filter` +command only allows the contact list to be filtered based on one specific category such as tags, salary range etc +and this may not be useful for users with a very huge number of contacts as filtering by only one category may still +return a long list. It is also not convenient for users who want to find contacts more specifically. We plan to +allow `filter` to filter the contact list more specifically. (e.g. `filter t/TAG s/SALARY_RANGE` will return +contacts with matching `TAG` and `SALARY_RANGE` that falls within what is specified) + +3**Store** the resume such that From 52d6d51e5503df9865c1d7548e6b3984c4fee55f Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 17:59:12 +0800 Subject: [PATCH 03/23] Fix issue 137 --- 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 f1a0d4e233b..8c2c9dbdcf4 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 = "Should be a single alphanumerical word that does" + + " not contain spaces."; public static final String VALIDATION_REGEX = "\\p{Alnum}+"; public final String tagName; From 673dbe7d4f3a2e58649d911933de42ac887e8c7d Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 18:12:31 +0800 Subject: [PATCH 04/23] Fix issue 119 --- src/main/java/seedu/address/model/person/Info.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/model/person/Info.java b/src/main/java/seedu/address/model/person/Info.java index 90ddfce28f8..5afeb8a7750 100644 --- a/src/main/java/seedu/address/model/person/Info.java +++ b/src/main/java/seedu/address/model/person/Info.java @@ -12,11 +12,15 @@ public class Info { * @param info Information about the person in the address book */ public Info(String info) { - value = info; + String curr = info.trim(); + if (curr.length() == 0) { + value = "No additional info"; + } else { value = curr; } } + public Info() { - value = ""; + value = "No additional info"; } public static boolean isValidInfo(String test) { @@ -29,7 +33,11 @@ public String getInfo() { @Override public String toString() { - return value; + + if (value.length() == 0) { + return "No additional info"; + } + return value; } @Override From a11f9ce02c8867c7c29f41870c43db8b35820653 Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 18:14:01 +0800 Subject: [PATCH 05/23] Update issue 137 --- 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 8c2c9dbdcf4..9d6c2efb32a 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 = "Should be a single alphanumerical word that does" + - " not contain spaces."; + public static final String MESSAGE_CONSTRAINTS = "Should be a single alphanumerical word that does" + + " not contain spaces."; public static final String VALIDATION_REGEX = "\\p{Alnum}+"; public final String tagName; From f7a2f664deb385f711526a59afbc2f1caaac09ec Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 18:25:07 +0800 Subject: [PATCH 06/23] Update issue 119 --- src/main/java/seedu/address/model/person/Info.java | 2 +- src/main/java/seedu/address/model/tag/Tag.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/model/person/Info.java b/src/main/java/seedu/address/model/person/Info.java index 5afeb8a7750..bd51107823e 100644 --- a/src/main/java/seedu/address/model/person/Info.java +++ b/src/main/java/seedu/address/model/person/Info.java @@ -37,7 +37,7 @@ public String toString() { if (value.length() == 0) { return "No additional info"; } - return value; + return value; } @Override diff --git a/src/main/java/seedu/address/model/tag/Tag.java b/src/main/java/seedu/address/model/tag/Tag.java index 8c2c9dbdcf4..9d6c2efb32a 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 = "Should be a single alphanumerical word that does" + - " not contain spaces."; + public static final String MESSAGE_CONSTRAINTS = "Should be a single alphanumerical word that does" + + " not contain spaces."; public static final String VALIDATION_REGEX = "\\p{Alnum}+"; public final String tagName; From 7869f3bf663dd52803f3029637bab9a2dd6f8d54 Mon Sep 17 00:00:00 2001 From: Dexter-Wong Date: Mon, 15 Apr 2024 18:29:10 +0800 Subject: [PATCH 07/23] Fix tests for issue 119 --- src/test/java/seedu/address/model/person/InfoTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/seedu/address/model/person/InfoTest.java b/src/test/java/seedu/address/model/person/InfoTest.java index 75995c79e3c..bbf92e3c9be 100644 --- a/src/test/java/seedu/address/model/person/InfoTest.java +++ b/src/test/java/seedu/address/model/person/InfoTest.java @@ -12,7 +12,7 @@ public class InfoTest { public void emptyConstructorTest() { // empty info constructor Info info = new Info(); - assertEquals("", info.value); + assertEquals("No additional info", info.value); } @Test From 58408f456283ec8cc68a6a19c279f9e7e329c049 Mon Sep 17 00:00:00 2001 From: Lalelulilulela Date: Mon, 15 Apr 2024 18:29:27 +0800 Subject: [PATCH 08/23] Ensure that Programming language titles shows up once and each programming language displayed is enclosed in square brackets --- .../seedu/address/model/language/ProgrammingLanguage.java | 2 +- src/main/java/seedu/address/ui/PersonCard.java | 4 +++- src/main/resources/view/PersonListCard.fxml | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/seedu/address/model/language/ProgrammingLanguage.java b/src/main/java/seedu/address/model/language/ProgrammingLanguage.java index a541681abb3..f1989718a0a 100644 --- a/src/main/java/seedu/address/model/language/ProgrammingLanguage.java +++ b/src/main/java/seedu/address/model/language/ProgrammingLanguage.java @@ -72,6 +72,6 @@ public int hashCode() { */ @Override public String toString() { - return "[Programming Language: " + languageName + "]"; + return "[" + languageName + "]"; } } diff --git a/src/main/java/seedu/address/ui/PersonCard.java b/src/main/java/seedu/address/ui/PersonCard.java index a1fa95b63c0..9b26bd462bc 100644 --- a/src/main/java/seedu/address/ui/PersonCard.java +++ b/src/main/java/seedu/address/ui/PersonCard.java @@ -49,6 +49,8 @@ public class PersonCard extends UiPart { @FXML private Label jobDifficulty; @FXML + private Label programmingLanguagesLabel; + @FXML private FlowPane tags; @FXML private FlowPane programmingLanguages; @@ -74,7 +76,7 @@ public PersonCard(Person person, int displayedIndex) { person.getProgrammingLanguages().stream() .sorted(Comparator.comparing(pl -> pl.languageName)) .forEach(pl -> programmingLanguages.getChildren().add( - new Label("Programming Languages: " + pl.languageName))); + new Label("[" + pl.languageName + "] "))); updateCardColor(person); } private void updateCardColor(Person person) { diff --git a/src/main/resources/view/PersonListCard.fxml b/src/main/resources/view/PersonListCard.fxml index 403bba109d0..1b650661748 100644 --- a/src/main/resources/view/PersonListCard.fxml +++ b/src/main/resources/view/PersonListCard.fxml @@ -29,7 +29,12 @@