Skip to content
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

(Fix)-Address scrolling issue in CommentSection #6661

Closed
wants to merge 2 commits into from

Conversation

parthksingh1
Copy link

@parthksingh1 parthksingh1 commented Nov 17, 2023

WHAT

To specifically address the issue of the page scrolling to the bottom when multiple comments were posted, we implemented the following modifications to the CommentSection component:

  1. Container Restructuring: Introduced a max-h-[400px] overflow-y-auto styling to the container housing the comment list. This adjustment ensures that the comment section is limited to a maximum height of 400 pixels and provides a scrollbar for easy navigation, preventing the entire page from stretching to the bottom.

  2. Pagination Button Placement: Aligned the pagination button to be below the comment list, ensuring it does not interfere with the overall page scroll. By placing it within the confined space of the comment section, users can scroll through comments without affecting the position of the pagination button.

These changes effectively restrict the scroll behavior to the comment section, providing a more controlled and intuitive user experience. Users can now scroll within the comments without unintentionally navigating to the bottom of the page.

Proposed Changes

  • Fixes Comment Section in the shifting detail page is stretching the page #6637 ?
  • Container Styling:
    Added max-h-[400px] overflow-y-auto styling to the container wrapping the comment list.
    This styling limits the maximum height of the comment section to 400 pixels and introduces a vertical scrollbar when the
    content exceeds this height
    -Pagination Button Placement:
    Positioned the pagination button below the comment list.
    This adjustment ensures that the pagination button is confined within the limited space of the comment section, preventing it from interfering with the overall page scroll.

These changes collectively restrict the scrolling behavior to the comment section, preventing the entire page from stretching to the bottom when multiple comments are posted. Users can now scroll through comments independently without affecting the scroll position of the entire page.

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

-Step 1: Identify the Issue
Recognize the problem: When posting multiple comments, the page was stretching to the bottom.
-Step 2: Analyze the Code
Inspect the CommentSection component in the codebase to understand the existing styling and structure.
-Step 3: Introduce Container Styling
Added max-h-[400px] overflow-y-auto styling to the container wrapping the comment list.
This restricts the maximum height of the comment section to 400 pixels.
Enables a vertical scrollbar when the content exceeds the specified height.
-Step 4: Adjust Pagination Button Placement
Positioned the pagination button below the comment list.
Ensured that the pagination button is confined within the limited space of the comment section.
-Step 5: Test the Changes
Checked the modified CommentSection component to ensure that scrolling is now limited to the comment section, preventing the entire page from stretching.

Video of Change-

Care.issue6637.mp4

ScreenShot-
care

@parthksingh1 parthksingh1 requested a review from a team November 17, 2023 09:40
@parthksingh1 parthksingh1 requested a review from a team as a code owner November 17, 2023 09:40
Copy link

vercel bot commented Nov 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 21, 2023 1:06pm

Copy link

netlify bot commented Nov 17, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 6d78d8c
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/655cab29dbd06b000844ecdc
😎 Deploy Preview https://deploy-preview-6661--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@parthksingh1
Copy link
Author

parthksingh1 commented Nov 17, 2023

@mathew-alex If any additional adjustments are needed, kindly inform me.

@parthksingh1
Copy link
Author

@mathew-alex please review it

@rithviknishad
Copy link
Member

@parthksingh1

@nihal467 will be testing it this week

@nihal467
Copy link
Member

nihal467 commented Nov 22, 2023

@parthksingh1 it still doesn't look like a good UI, the entire right side is empty, try doing a mock for the page where we can try looking effectively rearrange the page cards, to better space utilization

Copy link

github-actions bot commented Dec 4, 2023

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 4, 2023
@nihal467
Copy link
Member

nihal467 commented Dec 5, 2023

@parthksingh1 what is the update on this PR, and the mock-up design

@github-actions github-actions bot removed the stale label Dec 6, 2023
Copy link

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 18, 2023
@parthksingh1
Copy link
Author

parthksingh1 commented Dec 23, 2023

yes working on it, was confused with the design that what to implement .

@github-actions github-actions bot removed the stale label Dec 24, 2023
@parthksingh1
Copy link
Author

@nihal467 please can you give me some suggestions what should UI be looking, I tried implementing many but nothing looked great , if you have any suggestions please let me know

@nihal467
Copy link
Member

nihal467 commented Jan 1, 2024

@parthksingh1 can you post the mock design you worked on, so we can give some suggestion

Copy link

github-actions bot commented Jan 9, 2024

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 9, 2024
Copy link

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr.

@github-actions github-actions bot closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comment Section in the shifting detail page is stretching the page
3 participants