Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Remark command #129

Merged
merged 11 commits into from
Nov 1, 2023

Conversation

cyaoxuan
Copy link

@cyaoxuan cyaoxuan commented Nov 1, 2023

Closes #86

  • Add remark command to add remarks to Person
  • Add Remark field for Person, which is optional to have (currently displayed as an empty line if no remark, which should be fixed in the next commits)
  • Update tests to support new field and constructors

- Add `remark` field to Person
- Add `remark` command to add / edit remarks
- Update UI to reflect remarks (to be changed)

To do:
- Change tests to cater additional field
@cyaoxuan cyaoxuan added this to the v1.3b milestone Nov 1, 2023
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Files Coverage Δ
...java/seedu/address/logic/commands/EditCommand.java 87.50% <100.00%> (+0.09%) ⬆️
...va/seedu/address/logic/commands/RemarkCommand.java 100.00% <100.00%> (ø)
...a/seedu/address/logic/parser/AddCommandParser.java 82.14% <100.00%> (+0.32%) ⬆️
...ain/java/seedu/address/logic/parser/CliSyntax.java 92.85% <100.00%> (+0.54%) ⬆️
.../java/seedu/address/model/util/SampleDataUtil.java 6.34% <100.00%> (+1.51%) ⬆️
.../java/seedu/address/storage/JsonAdaptedPerson.java 69.69% <100.00%> (-1.58%) ⬇️
.../seedu/address/logic/parser/AddressBookParser.java 75.00% <0.00%> (-3.27%) ⬇️
src/main/java/seedu/address/ui/PersonCard.java 0.00% <0.00%> (ø)
...c/main/java/seedu/address/model/person/Remark.java 75.00% <75.00%> (ø)
...c/main/java/seedu/address/model/person/Person.java 71.01% <62.50%> (+0.24%) ⬆️
... and 1 more

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

* Changes the remark of an existing person in the address book.
*/
public class RemarkCommand extends Command {
public static final String COMMAND_WORD = "remark";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make more sense to put this in the MESSAGES class

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting COMMAND_WORD in the class itself seems to be the pattern for other commands too. Can you clarify why it should be shifted to the MESSAGES class?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Rohan was confused by the use of COMMAND_WORD being able to be publicly accessed by other classes, I don't see an issue here as this is the command that we will use for the feature.

Copy link
Collaborator

@brendanneojw brendanneojw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment on lines +29 to +30
public static final String MESSAGE_ADD_REMARK_SUCCESS = "Added remark to Person: %1$s";
public static final String MESSAGE_DELETE_REMARK_SUCCESS = "Removed remark from Person: %1$s";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice way to show that the command succeeded

Comment on lines +10 to +12
public final String value;

/**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there is no regex for this field, which makes sense since is just a remark of a person

@brendanneojw brendanneojw merged commit 811327e into AY2324S1-CS2103T-W16-3:master Nov 1, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add remarks command for adding of comments to Person
3 participants