-
Notifications
You must be signed in to change notification settings - Fork 3
Batch Newsletter Service #404
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
base: main
Are you sure you want to change the base?
Conversation
- Update backend/.eslintrc.json to reference the correct tsconfig.json path - Enable JSX support in tsconfig.json with "jsx": "react-jsx"
- Create email sending scripts - Create basic components for newsletter
- Create assets folder in email directory - Add email icons to assets
- Create Newsletter templates - Create components for newsletter sections - Create generateNewsletter component to allow customization - Update README (WIP) - Update emailService to mail newsletter created by GenerateNewsletter
- Edit tsconfig to allow JSX in react files - Add working directory configuration in eslintrc to prevent parsing errors - TODO: figure out why these errors keep on occuring
- Create ReelsFeature, SubleaseSpotlight, FeatureSpotlight and NeighborhoodComparison components - Edit styling of existing newsletter components - Add prop types for new components to Types.tsx - Add new components to Newsletter template - Add customization options for new components in GenerateNewsletter
- Implement all components of Newsletter - Render property cards in AreaSpotlight and LandlordHighlight (based on property id) - TODO: finish styling, add documentation
- Add top-level documentation to all Newsletter components
- Load firebase users in batches of 50 - Implement script to send emails out to all users in loaded batches
- Update README for email directory - Update import in firebase_users_loader
|
Lauren Pothuru seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
- Fix relative vs absolute path in property fetch - Add info to README
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 PR is comprehensive with a lot of detailed carried out well. Here are some main points to note:
- The README file is very informative and thorough. The "important" notices are helpful!
- For the styling of component, you could organize them with useStyle, which could make styling more intuitive and clear, and mainly more reusable. You could checkout the other files to see how it is done. (this is more of a code pattern issue, this could be done next semester on a separate task by you or someone else so no worries now)
- For backend/scripts/email/emailService.ts file, you have some commented out logic from line 84 to 92. It would be nice to remove them if they are no longer needed
- Abstract unnecessary comments and clean up code - Fix environment variable handling in firebase config - Update README for clarity and formatting
|
[diff-counting] Significant lines: 2215. This diff might be too big! Developer leads are invited to review the code. |
- Update image icons for better compatibility - Add mobile header; prevent dark mode (only supported in some email clients) - Abstract email sending into separate functions
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.
Great implementation with good structured code and layout.
After conducting the testings, you could organize the test cases in a separate testing files to better separate feature and test files.
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.
Great implementation of the html template with the approach to resolve the preloading issues.
Some small details to clean up wrapping up include a brief check of removing unused/commented-out sections, organizing testing functions into a separata testing file for code quality and organization.
Looking forward to the new design updates and the admin end input! Good job!
Summary
This pull request is the first step towards implementing the email service for batch newsletter distribution.
Completed features:
Test Plan
The backend route was tested using my email (so that no email campaigns were sent to CUApts users).
This is how a received Newsletter email appears on desktop (Gmail):



This is how a received newsletter appears on mobile (Apple mail app):


Note: Email clients render HTML and CSS differently, so emails may appear slightly different across inboxes. For example, Apple Mail supports custom fonts, while Gmail does not. The images above may also look different depending on the email client. Please test any emails that are being sent out vigorously among different clients to ensure consistent and responsive results!