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

Modify existing feature: add member details (add) #46

Merged
merged 9 commits into from
Oct 12, 2021

Conversation

ryanongra
Copy link
Collaborator

  • Modified add command to take telegram handles instead of address
    • /t tag now recognised as telegram handle
    • /tag used for other tags
    • automatically adds '@' character is not already preceded by it
  • Attempted to modify the validation regex to disallow spaces but to no avail :(, to be done in v1.2b
  • Making tags other than the name optional may take more work as the current implementation requires these parameters to be non-null

Closes #33

@ryanongra ryanongra added the enhancement New feature or request label Oct 10, 2021
Copy link
Member

@yongxiangng yongxiangng left a comment

Choose a reason for hiding this comment

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

Understandably, this renaming of address to telegram is rather problematic and I apologise for many repeated comments on the same issue (mostly just to mark and flag the issues so we can check if it has been resolved later on)

Here are some common issues I found:

  • Wild card imports
  • Address book accidentally refactored into telegram book
  • Forgetting to rename address value to telegram handle value. e.g. there are still parts where telegram handles are filled with the String value "4th street"
  • Error messages not renamed and the value not changed
  • address.png not updated to telegram.png (also change the picture to updated ui)
  • Several methods name are still not updated and the parameters of certain methods are not updated as well. e.g. setAddress

There might be more things I missed out that I didn't flag out in the review, please be careful and meticulous when refactoring. Once again, I understand this thing is quite a pain and there are many things to change and hard to catch, so it would be best if we all tried to catch the loose ends (5 pairs of eyes are better than 1 pair 👀 👀 👀 👀 👀 )

Please build and run tests before pushing into the master to ensure that you pass the CI. Note the team repo only does checkstyle and tests and doesn't track codecov in the ci.

![$address](../images/remove/$address.png)
![$telegram](../images/remove/$telegram.png)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you renamed the address.png to telegram.png
Since you're on this, perhaps you can change the address.png file to telegram.png and use this image that has the updated ui mockup

"address": "4th street"
"telegram": "4th street"
Copy link
Member

Choose a reason for hiding this comment

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

Needs update

3. Save the address book in the CSV format instead
3. Save the telegram book in the CSV format instead
Copy link
Member

Choose a reason for hiding this comment

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

Be careful not to accidentally refactor address book into telegram book. We should probably rename address book to ForYourInterest some time soon.

6. Add a new entity to the address book
6. Add a new entity to the telegram book
Copy link
Member

Choose a reason for hiding this comment

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

Be careful not to accidentally refactor address book into telegram book

Comment on lines 179 to 180
public void setAddress(Telegram telegram) {
this.telegram = telegram;
Copy link
Member

Choose a reason for hiding this comment

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

Please refactor the name of this method as well to something like setTelegram

Comment on lines 8 to 9
import seedu.address.model.person.*;
import seedu.address.model.person.Telegram;
Copy link
Member

Choose a reason for hiding this comment

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

Wild card import

Comment on lines 6 to 7
import seedu.address.model.person.*;
import seedu.address.model.person.Telegram;
Copy link
Member

Choose a reason for hiding this comment

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

Wild card

Comment on lines 37 to 34
address = new Address(DEFAULT_ADDRESS);
telegram = new Telegram(DEFAULT_ADDRESS);
Copy link
Member

Choose a reason for hiding this comment

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

DEFAULT_ADDRESS to DEFAULT_TELEGRAM

@@ -45,7 +42,7 @@ public PersonBuilder(Person personToCopy) {
name = personToCopy.getName();
phone = personToCopy.getPhone();
email = personToCopy.getEmail();
address = personToCopy.getAddress();
telegram = personToCopy.getAddress();
Copy link
Member

Choose a reason for hiding this comment

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

getTelegram()

Comment on lines 68 to 69
public PersonBuilder withAddress(String address) {
this.address = new Address(address);
this.telegram = new Telegram(address);
Copy link
Member

Choose a reason for hiding this comment

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

Update the method name and parameter name. withTelegram, String telegram, this.telegram = new Telegram(telegram)

@yongxiangng yongxiangng added this to the v1.2 milestone Oct 11, 2021
@yongxiangng yongxiangng added the type.Story A user story label Oct 11, 2021
@ryanongra
Copy link
Collaborator Author

Understandably, this renaming of address to telegram is rather problematic and I apologise for many repeated comments on the same issue (mostly just to mark and flag the issues so we can check if it has been resolved later on)

Here are some common issues I found:

  • Wild card imports
  • Address book accidentally refactored into telegram book
  • Forgetting to rename address value to telegram handle value. e.g. there are still parts where telegram handles are filled with the String value "4th street"
  • Error messages not renamed and the value not changed
  • address.png not updated to telegram.png (also change the picture to updated ui)
  • Several methods name are still not updated and the parameters of certain methods are not updated as well. e.g. setAddress

There might be more things I missed out that I didn't flag out in the review, please be careful and meticulous when refactoring. Once again, I understand this thing is quite a pain and there are many things to change and hard to catch, so it would be best if we all tried to catch the loose ends (5 pairs of eyes are better than 1 pair 👀 👀 👀 👀 👀 )

Please build and run tests before pushing into the master to ensure that you pass the CI. Note the team repo only does checkstyle and tests and doesn't track codecov in the ci.

@yongxiangng
Thank you so much for finding all these mistakes 🙏 Sorry for the trouble, I think because I removed some parts when refactoring since a lot of the 'address' keywords are actually part of AddressBook or other libraries which shouldn't be changed, but I removed too many in the end :"). I'll update the PR and run the tests asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type.Story A user story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify existing feature: add member details (add)
3 participants