-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: listings approval emails #3600
Conversation
✅ Deploy Preview for bloom-demo-public ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for bloom-exygy-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for bloom-partners-listings-approval ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
28a07c2
to
f89c69f
Compare
c40b1c3
to
99d45ba
Compare
@ColinBuyck thanks for drafting these messages! A couple of questions: 1) are these consistent with error messaging elsewhere in our system? 2) Is there something actionable the user can do here to troubleshoot? |
@eajensenwa 1) Other error messages in the system are usually more generic, so something like "Oops something went wrong" - and 2) there isn't something actionable within the portal but it might be helpful to know and they could reach out directly |
A note for other reviewers, the emails don't always send to all the right recipients if you're using the +suffix at the end of one emails, using separate accounts worked as expected (ie I expected a +partner and +jurisdictional-admin to both get an email but it would only send it to one of them) |
backend/core/src/migration/1692122923259-listings-approval-emails.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still reviewing, but wanted to get my initial comments out in case I don't have time to finish it today
Thanks for the feedback and catches 🧤 Believe everything should be addressed now except for the ongoing error discussion and future feature flag considerations @emilyjablonski @ludtkemorgan! |
Request from design for the error message to read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think functionally this looks good. Just one suggestion to add more tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the error message copy and touching base w Morgan on the last few comments! ⛱️
f421607
to
2274283
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Can you create a ticket in the listing approval epic to add those tests so it is not lost?
Thanks @emilyjablonski and @ludtkemorgan! Just got confirmation on error messaging copy and will merge once the tests pass 🥼 |
* fix: wip email setup * fix: wip BE service work * fix: wip email endpoint * fix: wip module error resolution * fix: nest error resolution * fix: functional email endpoint * fix: email formatting completed * fix: remove console logs * fix: undo dto approach * fix: test coverage * fix: listing service test cleanup * fix: final clean up * fix: are tests going to run? * fix: corrected permissioning * fix: start of listings approved * fix: shift to updateAndNotify * fix: wip all email flow * fix: all three email flow * fix: all email test coverage * fix: translation error resolution * fix: logic refactoring + cleanup * fix: no notification case * fix: improved type approach * fix: req user corrections * fix: listing service commenting * fix: custom error handling * fix: remove testing error state * fix: futher commenting * fix: pr feedback updates * fix: remove unused email mock * fix: error message from design
* fix: wip email setup * fix: wip BE service work * fix: wip email endpoint * fix: wip module error resolution * fix: nest error resolution * fix: functional email endpoint * fix: email formatting completed * fix: remove console logs * fix: undo dto approach * fix: test coverage * fix: listing service test cleanup * fix: final clean up * fix: are tests going to run? * fix: corrected permissioning * fix: start of listings approved * fix: shift to updateAndNotify * fix: wip all email flow * fix: all three email flow * fix: all email test coverage * fix: translation error resolution * fix: logic refactoring + cleanup * fix: no notification case * fix: improved type approach * fix: req user corrections * fix: listing service commenting * fix: custom error handling * fix: remove testing error state * fix: futher commenting * fix: pr feedback updates * fix: remove unused email mock * fix: error message from design
* chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (bloom-housing#3522) * chore(deps): bump fast-xml-parser from 4.1.3 to 4.2.4 (bloom-housing#3500) * chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 (bloom-housing#3354) * fix: remove updated_at field from listing details page (bloom-housing#3527) * feat: uptake field value v2 (bloom-housing#3509) * fix: partners listings table sort by status (bloom-housing#3576) * fix: add sorting by status * fix: change default sort to status * fix: default sorting by status * fix: sort by application when the same status * fix: orderBy test using default value * fix: trigger backend sorting on initial load * fix: add unsort icon to indicate that column might be sorted * test: rollback test changes * fix: use enums to order by status * chore: upgrade uic * refactor: use new seeds tag component (bloom-housing#3597) * feat: submit for approval flow (bloom-housing#3598) * fix: cors origin deploy preview issues (bloom-housing#3564) * fix: update label for monthly minimum income (bloom-housing#3609) * feat: update label for monthly minimum income * fix: change string to Minimum Monthly Income * feat: listings approval superadmin flow (bloom-housing#3611) * fix: add backend url validation for url fields (bloom-housing#3568) * fix: add backend url validation for url fields * fix: validate only if externalUrl should be URL * fix: use form values for application types on failed form submit * fix: hide url field when no digital application * fix: set proper default value to common digital application choice * fix: add hasHttps decorator for second error variant * fix: add four and five bedrooms keys to sort array (bloom-housing#3618) * fix: sort table with listings approval statuses (bloom-housing#3622) * test: add listings approval cypress tests (bloom-housing#3612) * feat: listings approval emails (bloom-housing#3600) * fix: use primary tag variants in partners (bloom-housing#3632) * fix: amiPercentage being unset on unit edit (bloom-housing#3635) --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krzysztof Zięcina <kziecina@airnauts.com> Co-authored-by: Emily Jablonski <65367387+emilyjablonski@users.noreply.github.com> Co-authored-by: ColinBuyck <53269332+ColinBuyck@users.noreply.github.com> Co-authored-by: Yazeed Loonat <YazeedLoonat@gmail.com>
Pull Request Template
Issue Overview
This PR addresses metrotranscom#299, metrotranscom#300,
metrotranscom#302
Description
This PR creates a combined endpoint that will update the listing and send a corresponding email to the appropriate users based on the update. The three cases are as follows:
Figma: https://www.figma.com/file/cNRVrLdz8cjXQdSr54BRao/Approval?type=design&node-id=1607-68638&mode=design&t=iL57CewScqDs0pGR-0
Note for Eng: Definitely looking for feedback on my email error handling approach and using the status code of 500 here. I'm feeling unsure if big try/catches is the most elegant solution for this case.
Note for Design (@eajensenwa): I made some guesses on error handling for when the listing is successfully updated but the email fails to send along with when the "broader something went wrong error" occurs but from the details page rather than the edit page.
Currently, the errors are either "Oops! Looks like something went wrong" if the update failed (existing functionality) or "Listing updated but the associated emails failed to send." if just the notify step fails.
How Can This Be Tested/Reviewed?
Pull down locally
Checklist:
yarn generate:client
and/or created a migration if I made backend changes that require themReviewer Notes:
Steps to review a PR:
On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.