Skip to content

Conversation

@mayur-driod
Copy link
Contributor


Name: Added Subscribe Functionality.
about: In this PR I have currently added the subscribe functionality for the newsletter.

Description

In the src\components\Donation.tsx I have added the logic and functionality for allowing users to subscribe to the newsletter.

Related Issue

This PR fixes #51

Changes Made

  • Change 1 in src\components\Donation.jsx I wrapped the input and button in <motion.form> tag
  • Change 2 in the form tag I added action="https://buttondown.com/api/emails/embed-subscribe/sugarlabs" and method="post"
  • Change 3 in the input tag I added name: email and to a required field.
  • Change 4 in the submit tag I added type: submit
  • ...

Testing Performed

I tried to sign myself up and it has successfully worked
image

  • Ran sign up test on my email
  • Tested on browsers Opera GX and Edge
  • ...

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Additional Notes for Reviewers

After multiple attempts to test the feature, the site has blocked me. It worked successfully the first two times. Please verify whether this is a platform restriction rather than an issue on my end.

@sa-fw-an
Copy link
Member

Works perfect. Please also add this feature that the email placeholder is cleared on clicking the subscribe button

Comment on lines 155 to 157
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
transition={{ type: 'spring', stiffness: 400, damping: 10 }}
Copy link
Member

Choose a reason for hiding this comment

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

Please add this animation in the Animations.ts file under src/styles

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I will add this today.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @sa-fw-an do I need to open a new PR for the changes made in Animations.ts?

Copy link
Member

Choose a reason for hiding this comment

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

Hey @sa-fw-an do I need to open a new PR for the changes made in Animations.ts?

Not needed just change it and commit :)

@FirePheonix
Copy link
Contributor

Amazing work by the work @mayur-driod
Do attend www-v2 meets from now on in case you're interested in taking up more issues. We're in bug fixing and improvement of design phase right now.

@mayur-driod
Copy link
Contributor Author

Amazing work by the work @mayur-driod
Do attend www-v2 meets from now on in case you're interested in taking up more issues. We're in bug fixing and improvement of design phase right now.

Hey I would love to join. Please let me know whenever it's happening. Thanks :)

@mayur-driod
Copy link
Contributor Author

Works perfect. Please also add this feature that the email placeholder is cleared on clicking the subscribe button

Hey, I have added this functionality. Here is the demo of it working.

Subscribe.to.newsletter.2.mp4

@sa-fw-an
Copy link
Member

Please Build & Check Linting of your project before committing.

  • Build: npm run build
  • Linting check: npm run format:check

@mayur-driod
Copy link
Contributor Author

mayur-driod commented Mar 18, 2025

Please Build & Check Linting of your project before committing.

  • Build: npm run build
  • Linting check: npm run format:check

Yes, I'm sorry about that. VS code imported something automatically, causing errors. But now it's working as expected.

please take a look:

Subscribe.button.animation.mp4

Also thanks for the support @Niranjan7407

@mayur-driod mayur-driod requested a review from sa-fw-an March 18, 2025 05:21
@sa-fw-an sa-fw-an merged commit 321b373 into sugarlabs:main Mar 18, 2025
2 checks passed
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.

Add the Functionality of subscribing to the newsletter on main page

3 participants