Skip to content

Commit

Permalink
Merge pull request #103 from KrashKart/branch-tag-space
Browse files Browse the repository at this point in the history
Add spacing between tags in UI display
  • Loading branch information
yooplo authored Oct 20, 2024
2 parents 9cdc5e8 + 5360baf commit 204df07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ public class PersonCard extends UiPart<Region> {
private Label id;
@FXML
private Label phone;
// @FXML
// private Label address;
@FXML
private Label email;
@FXML
Expand All @@ -50,10 +48,13 @@ public PersonCard(Person person, int displayedIndex) {
id.setText(displayedIndex + ". ");
name.setText(person.getName().fullName);
phone.setText(person.getPhone().value);
// address.setText(person.getAddress().value); // to be removed completely
email.setText(person.getEmail().value);
person.getTags().stream()
.sorted(Comparator.comparing(tag -> tag.tagName))
.forEach(tag -> tags.getChildren().add(new Label(tag.tagName)));

// add horizontal and vertical gaps for the tags FlowPane
tags.setHgap(5);
tags.setVgap(5);
}
}

0 comments on commit 204df07

Please sign in to comment.