Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

Implement remark command #599

Closed
wants to merge 9 commits into from

Commits on Aug 18, 2018

  1. Logic: Teach the app to accept 'remark' but do nothing

    . Add a RemarkCommand that just throws an Exception.
    . Add RemarkCommandTest that will test that executeUndoableCommand()
    throws an Exception.
    . Modify AddressBookParser to accept a RemarkCommand.
    . Add new test to AddressBookParserTest, which will test that typing
    "remark" returns an instance of RemarkCommand.
    yamgent committed Aug 18, 2018
    Configuration menu
    Copy the full SHA
    1ebeded View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2018

  1. Logic: Teach the app to accept 'remark' arguments but still do nothing

    . Modify RemarkCommand to take in an Index and String for remark, and
    print those two parameters as the error message
    . Modify RemarkCommandTest to test the equals method
    . Add RemarkCommandParser that will know how to parse two arguments, one
    index and one with prefix 'r/'
    . Add RemarkCommandParserTest that will test different boundary values
    for RemarkCommandParser.
    . Modify AddressBookParser to use the newly implemented
    RemarkCommandParser
    . Modify AddressBookParserTest to ensure that what the user input
    generated the correct command.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    caae7a8 View commit details
    Browse the repository at this point in the history
  2. Ui: Add a placeholder for remark in PersonCard GUI

    . Add label with any random text inside PersonListCard.fxml
    . Add FXML annotation in PersonCard to tie the variable to the actual
    label.
    . Modify PersonCardHandle so that future tests can read the remarks in
    the cards.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    3d5983b View commit details
    Browse the repository at this point in the history
  3. Model: Add Remark class

    . Add Remark to model component (copy from Address, remove the regex and
    rename accordingly).
    . Add test for Remark (to test the equals method).
    . Modify RemarkCommand to now take in a Remark instead of a String.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    ae53a78 View commit details
    Browse the repository at this point in the history
  4. Model: Modify Person to support a Remark field

    . Add `Person#getRemark()`
    . You may assume that the user will not be able to use the `add`
    and `edit` commands to modify the remarks field (i.e. the person will
    be created without a remark).
    . Modify `SampleDataUtil` to add remarks for the sample data.
    
    I recommend deleting your addressBook.xml after this step so that you
    can see the remarks field come to life in your application.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    6e87781 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9bee27e View commit details
    Browse the repository at this point in the history
  6. Test: Add withRemark() for PersonBuilder

    . Add a new method `withRemark()` for `PersonBuilder`. This method will
    create a new `Remark` for the person that it is currently building.
    . Try and use the method on any sample `Person` in `TypicalPersons`.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    b3a1c56 View commit details
    Browse the repository at this point in the history
  7. Ui: Connect Remark field to PersonCard

    . Just modify PersonCard's constructor to add the new method.
    . For test, modify GuiTestAssert#assertCardDisplaysPerson(...) to
    compare the now-functioning remark label.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    e841d50 View commit details
    Browse the repository at this point in the history
  8. Logic: Implement RemarkCommand execute() logic

    . Replace the error message with the actual logic to modify the remarks
    of a person.
    . Update `RemarkCommandTest` to test that the `execute()` logic works.
    yamgent committed Aug 21, 2018
    Configuration menu
    Copy the full SHA
    8e446e8 View commit details
    Browse the repository at this point in the history