Feat:Newsletter Subscription Component that allows visitors to subscr… #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…Added a Newsletter Subscription feature to the React Kolkata website, allowing visitors to subscribe to community updates about events, workshops, tech talks, and news. The feature includes full i18n support for English, Bengali, and Hindi.
Changes
Created newsletter type definitions (newsletter.ts)
Implemented NewsletterSubscription component with email validation and interest selection
Added newsletter section to home page after the blog section
Added comprehensive translations for EN, BN, and HI locales
Created unit tests for the newsletter component
Integrated with existing UI components (Button, Badge) and animated sections
Testing:
Added comprehensive unit tests using Vitest and React Testing Library
Tested email validation (invalid/valid email formats)
Tested interest selection/deselection functionality
Tested form submission flow (loading, success, error states)
Tested form disable during submission
Manual testing across different locales (EN/BN/HI)
Verified responsive design and dark mode compatibility
Notes:
The component currently simulates the API call with a timeout. Reviewers should note that an actual API endpoint at /api/newsletter/subscribe needs to be implemented for production use
The component is fully accessible and follows existing design patterns
All text content is internationalized and ready for the three supported languages
The feature is non-blocking and enhances user engagement without affecting existing functionality