Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

fix: subscribe form is having scrollbar on devices below 452px inside… #819

Closed
wants to merge 1 commit into from

Conversation

Koushik1311
Copy link

@Koushik1311 Koushik1311 commented Oct 20, 2023

… a section

Fixed the issue where subscribe for is has scrollbar on devices below 452px

Fixes Issue

This PR fixes the following issues:

closes #741

Update the NewsLetter.jsx file. Add an event listener that will update the windowWidth value coming from the browser

Changes proposed

Here comes all the changes proposed through this PR

Check List (Check all the boxes which are applicable)

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Before fix
261338216-6c2a0b99-46f2-4fb9-8613-9b126018b150

After fix
image

Summary by CodeRabbit

  • Improvement: Enhanced the responsiveness of the NewsLetter section on our website. The section now dynamically adjusts its size based on your screen size, providing a better viewing experience across different devices. This update ensures that the content is always displayed in the most optimal way, regardless of how you resize your browser window.

@coderabbitai
Copy link

coderabbitai bot commented Oct 20, 2023

Walkthrough

The introduced changes enhance the responsiveness of the NewsLetter component. The component now dynamically adjusts the iframe height based on the window width, improving the user experience on different screen sizes.

Changes

File Summary
src/components/layout/JoinUs/NewsLetter.jsx Added an event listener for the resize event to dynamically adjust the iframe height based on the window width. Also included a cleanup function to remove the event listener when the component is unmounted.

🐇

"In the land of code, where the shadows lie,

A rabbit hopped, with a twinkle in its eye.

With each resize, the iframe did grow,

Making the user experience flow.

So here's to changes, small and neat,

Making our component incredibly sweet!" 🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.

CodeRabbit Commands

  • Enter @coderabbitai pause as a PR comment to pause the reviews on a PR.
  • Enter @coderabbitai resume as a PR comment to resume the paused reviews.
  • For on-demand reviews, enter @coderabbitai review as a PR comment to trigger a review. This is useful when reviews are automatic disabled at the repository level.
  • Enter @coderabbitai: ignore in the PR description to stop a specific PR from being reviewed.

Note these commands work only in the PR comment. For conversations with the bot, please use the review comments on code diffs or files.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 5a2c8d9 and f864668.
Files selected for processing (1)
  • src/components/layout/JoinUs/NewsLetter.jsx (1 hunks)
Additional comments (Suppressed): 1
src/components/layout/JoinUs/NewsLetter.jsx (1)
  • 6-26: The changes made in this hunk are good. The updateIframeHeight function is now being called on window resize, which will ensure that the iframe height is updated in real-time as the window is resized. The cleanup function to remove the event listener when the component is unmounted is also a good practice to prevent potential memory leaks.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Woah! This is your first Pull Request in our community, Congratulations 🎉 and thank you for your contribution! 🚀 The team will review it on availability 💫. In the meantime join our Discord server and checkout our YouTube channel.

Copy link

Stale pull request message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subscribe form is having scrollbar on devices below 452px inside a section [bug]
1 participant