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

Improve trip alert template (push + email) #196

Merged
merged 17 commits into from
Dec 20, 2023
Merged

Conversation

AdrianaCeric
Copy link
Contributor

@AdrianaCeric AdrianaCeric commented Nov 28, 2023

Checklist

  • Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
  • The description lists all applicable issues this PR seeks to resolve
  • The description lists any configuration setting(s) that differ from the default settings
  • All tests and CI builds passing

Description

Push
Bullet point only present if >1 alert
image

Email
Also moves initial reminder ("Reminder for your upcoming trip...") outside of the list and to top of email
image

@AdrianaCeric AdrianaCeric changed the title Improve trip alert messages (push + email) Improve trip alert template (push + email) Nov 29, 2023
@JymDyerIBI JymDyerIBI self-requested a review December 14, 2023 03:26
…files are first generated and need to be regenerated when template files are changed.
@JymDyerIBI
Copy link
Contributor

I stuck a Javadoc comment on the unit test, to describe the magical behind-the-scenes snapshot file creation.

Copy link
Contributor

@JymDyerIBI JymDyerIBI left a comment

Choose a reason for hiding this comment

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

👍 Code looks good to me.

@AdrianaCeric
Copy link
Contributor Author

Thanks for the Javadoc @JymDyerIBI !

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

One piece of code needs to be updated, and some formatting comments.

Comment on lines 431 to 438
"notifications", new ArrayList<>(notifications).stream()
// Make certain notifications, such as the initial reminder one, appear on top.
.sorted(Comparator.comparingInt(TripMonitorNotification::sortOrder))
.map(notification -> notification.body)
.map(notification -> Map.of(
"type", notification.type.toString(),
"body", notification.body
))
.collect(Collectors.toList())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Haha I think this should be simply:

Suggested change
"notifications", new ArrayList<>(notifications).stream()
// Make certain notifications, such as the initial reminder one, appear on top.
.sorted(Comparator.comparingInt(TripMonitorNotification::sortOrder))
.map(notification -> notification.body)
.map(notification -> Map.of(
"type", notification.type.toString(),
"body", notification.body
))
.collect(Collectors.toList())
"notifications", new ArrayList<>(notifications)

Copy link
Collaborator

@binh-dam-ibigroup binh-dam-ibigroup left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the changes!

@binh-dam-ibigroup binh-dam-ibigroup merged commit dab8318 into dev Dec 20, 2023
2 checks passed
@binh-dam-ibigroup binh-dam-ibigroup deleted the push-notif-message branch December 20, 2023 16:13
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.

3 participants