-
-
Notifications
You must be signed in to change notification settings - Fork 115
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(api): Add workspace removal notification email template #476
feat(api): Add workspace removal notification email template #476
Conversation
PR Reviewer Guide 🔍(Review updated until commit 055755c)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 055755c
Previous suggestions✅ Suggestions up to commit 0a1f923
|
Hey man! Nice work on the PR. Although, I think there's a bit of slack from our end. We created that issue at the very initial days. So it would be "Removal frrom Workspace" and not project. Can you please make the changes accordingly? |
@rajdip-b Can you also share a URL of your logo if it's deployed on S3 or hosted anywhere, so that I can include in template. Also can you send the URL so that user can visit that page to know what workspaces he/she currently has, I can add a button also |
Unfortunately, currently we have none! This issue is a design issue so most of our things are in figma. Your PR will be closing the code-related stuff only. Eitherways, we will be working on a proper email template. So you won't need to worry too much about that. |
@rajdip-b I have made the changes. UI will now look like below ss |
@darksaiii @kriptonian1 thoughts on the UI? |
I'll have to create template using React email. Will update once completed |
@rajdip-b Where should I place the templates? Should I create folder names |
Yes, I think that will work fine. |
2fff238
to
05cfe56
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.
- I'm not sure why we have the email in two files.
- We can reuse the CSS designs, so maybe you can move them into some place reusable
@rajdip-b I'm facing issue. I have imported react component, but it's not detecting the component. Anything I'm missing? |
@kriptonian1 would be able to help you out in here, but he's on a leave until the upcoming Monday. So, im afraid your PR has to wait :/ |
…com/Allan2000-Git/keyshade into feat/project-removal-email-template
Hey @rajdip-b, the issue is |
TSX sounds fine to me. Eitherways we shouldnt be using js |
05cfe56
to
f64752a
Compare
React email supports typescript |
@rajdip-b @kriptonian1 Can you review it? UI looks the same as above image. |
@Allan2000-Git can you update your lockfile using pnpm i and push it? |
@rajdip-b Any idea why is this happening? |
This might be because turbo was updated. try deleting all the node modules folder and do pnpm i |
No luck, its still the same error |
This is hopefully going to fix the lint issue. Update |
@rajdip-b Can you review the changes? Once merged, I can use this as a base codepath for creating other email templates |
Persistent review updated to latest commit 055755c |
@muntaxir4 tried the flow. He says he didn't get any emails after he left a workspace. Maybe you forgot to call the function in |
The sending of email upon removal from workspace isnt't implemented yet at https://github.com/keyshade-xyz/keyshade/blob/3a638239a216a7919254222c04fbac0391c85d43/apps/api/src/workspace-membership/service/workspace-membership.service.ts#L276C1-L293C6. Creating a rough implementation for that, I was able to receive the desired email. Currently, the removedOn string will be a Date's ISO strring : UPDATE 1: Choose a type for removedOn (string/Date), preferably Date. Then format the removedOn to a more readable time. |
…e removedOn type to Date
@Allan2000-Git I have pushed the changes that implements sending of email once user is removed from workspace. You may continue with formatting the |
## [2.8.0](v2.7.0...v2.8.0) (2024-12-03) ### 🚀 Features * **api:** Add workspace removal notification email template ([#476](#476)) ([40b754f](40b754f)) * **cli:** Store `metrics_enabled` key in profile config ([#536](#536)) ([9283b22](9283b22)) * **package, api, cli:** Add api-key schemas and types; Fix schema inconsistencies; Minor fix for CLI build errors ([#557](#557)) ([126d024](126d024)) * **platform:** Added screen for CREATE NEW PROJECT ([#540](#540)) ([b644633](b644633)) * **platform:** Updated the empty state of dashboard ([#522](#522)) ([28739d9](28739d9)) * **schema, api-client:** Migrate auth types to @keyshade/schema ([#532](#532)) ([d880098](d880098)) * **schema, api-client:** Migrate event schemas and types to @keyshade/schema ([#546](#546)) ([a3267de](a3267de)) * **schema, api-client:** Migrate integration schemas and types to @keyshade/schema ([#547](#547)) ([08868c3](08868c3)) * **schema, api-client:** Migrate project schemas and environment schemas along with their types to @keyshade/schema ([#538](#538)) ([c468af0](c468af0)) * **schema, api-client:** Migrate [secure] types and schemas to @keyshade/schema ([#539](#539)) ([bc3100b](bc3100b)) * **schema, api-client:** Migrate user types and schemas to @keyshade/schema ([#535](#535)) ([c24695e](c24695e)) * **schema, api-client:** Migrate variable schemas and types to @keyshade/schema ([#545](#545)) ([0ee8f9a](0ee8f9a)) * **schema, api-client:** Migrate workspace-membership schemas and types to @keyshade/schema ([#569](#569)) ([4398969](4398969)) * **schema, api-client:** Migrate workspace-role schemas and types to @keyshade/schema ([#568](#568)) ([9efbf2d](9efbf2d)) * **schema:** Add User type inference from UserSchema ([#574](#574)) ([84c1db5](84c1db5)) ### 🐛 Bug Fixes * **api:** Incorrect oauth redirect url ([58d96e5](58d96e5)) * **platform:** Resolve loading SVG blocking input field interaction ([#571](#571)) ([30f4f65](30f4f65)) ### 📚 Documentation * Add pictures to Bruno setup ([#541](#541)) ([210c0fd](210c0fd)) * Migrate to Bruno ([#525](#525)) ([1793d92](1793d92)) ### 🔧 Miscellaneous Chores * **ci:** Add script to validate schema package ([59e4280](59e4280)) * Fixed codecov client version ([a998ae4](a998ae4)) * **package:** Fixed tests and did housekeeping ([#544](#544)) ([40008e3](40008e3)) * Update test coverage settings ([5b27e32](5b27e32)) * Update Turbo to 2.3.1 ([#564](#564)) ([3a63823](3a63823)) * **web:** Update dockerfile ([10d9cc5](10d9cc5)) ### 🔨 Code Refactoring * **api-client, schema:** Add workspace's schemas and types in @keyshade/schema ([#520](#520)) ([7c8ee5d](7c8ee5d))
User description
Description
This PR adds a project removal notification email template. It provides users with key information regarding the project removal, including project name and removal date.
Fixes #56
Dependencies
No new dependencies introduced.
Future Improvements
Make it consistent with Keyshade's theme.
Mentions
@rajdip-b
Screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement, Dependencies
Description
@react-email/components
.removedFromWorkspace
method in the mail service to send the new email template..tsx
and.jsx
files.Changes walkthrough 📝
3 files
workspace-removal.tsx
Add workspace removal notification email template
apps/api/src/mail/emails/workspace-removal.tsx
@react-email/components
for email structure.interface.service.ts
Extend mail service interface for workspace removal
apps/api/src/mail/services/interface.service.ts
removedFromWorkspace
to the mail service interface.mail.service.ts
Implement workspace removal email sending functionality
apps/api/src/mail/services/mail.service.ts
removedFromWorkspace
method to send workspace removalemails.
@react-email/render
for email rendering.1 files
mock.service.ts
Add mock service for workspace removal email
apps/api/src/mail/services/mock.service.ts
removedFromWorkspace
method.3 files
jest.config.ts
Update Jest config for JSX/TSX support
apps/api/jest.config.ts
.tsx
and.jsx
files.jest.e2e-config.ts
Update Jest E2E config for JSX/TSX support
apps/api/jest.e2e-config.ts
.tsx
and.jsx
files.tsconfig.json
Enable JSX support in TypeScript config
apps/api/tsconfig.json
3 files
package.json
Add React Email dependencies and update React version
apps/api/package.json
@react-email
components and rendering.package-lock.json
Update package-lock for new email dependencies
apps/api/package-lock.json
pnpm-lock.yaml
Update pnpm lock file for React Email dependencies
pnpm-lock.yaml