Fix: Newsletter subscription 'No Thanks' button now closes the block #353
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.
Fixed an issue where clicking the 'No Thanks' button in the Stay Updated block at the bottom of the user page wouldn't close the block.
Which issue does this PR close?
Modified
NewsletterSubscriptions.jsxto properly handle the 'No Thanks' when clicked and added functionality to collapse the newsletter block when 'No Thanks' is clicked.Rationale for this change
The 'No Thanks' button in the Stay Updated newsletter subscription block was
not functioning as expected. When I clicked this button to dismiss the
newsletter prompt, the block remained visible instead of closing.
What changes are included in this PR?
Modified the
NewsletterSubscription.jsxcomponent to handle the 'No Thanks' button click eventAre these changes tested?
Yes, I have manually tested and verified that clicking the 'No Thanks' button now properly closes the newsletter block.
Are there any user-facing changes?
Yes, this is a user-facing bug fix:
Before: Users clicking 'No Thanks' would see no response, and the newsletter block remained visible
After: Users can now successfully dismiss the newsletter block by clicking 'No Thanks'