Skip to content

fix: Prevent modal container expansion when FAQ answers are opened - #276

Open
YadavAkhileshh wants to merge 3 commits into
meshery:masterfrom
YadavAkhileshh:fix/modal-container-expansion
Open

fix: Prevent modal container expansion when FAQ answers are opened#276
YadavAkhileshh wants to merge 3 commits into
meshery:masterfrom
YadavAkhileshh:fix/modal-container-expansion

Conversation

@YadavAkhileshh

@YadavAkhileshh YadavAkhileshh commented Dec 25, 2025

Copy link
Copy Markdown

Fixes #265

Current Behavior

The modal container expands in height when FAQ answers are clicked/opened, causing layout issues.

ps2.mp4

Changes

  • Added inline styles to Modal component to set fixed height (80vh) and prevent dynamic resizing
  • Updated Modal CSS to enable internal scrolling within the .content div
  • Removed redundant CSS properties that are now handled by inline styles
ps3.mp4

Solution

  • Modal now has a fixed height of 80vh with overflow: hidden
  • Only the .content div inside the modal scrolls when FAQ content expands
  • Prevents the modal from growing beyond its intended size

Signed-off-by: YadavAkhileshh yadavakhil2501@gmail.com

Summary by CodeRabbit

  • Style
    • Improved modal positioning for more consistent centering.
    • Added responsive sizing for narrower screens.
    • Enabled scrolling within modal content while keeping the surrounding layout stable.
    • Hidden scrollbars for a cleaner appearance.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @YadavAkhileshh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a layout issue where the modal container would expand unexpectedly when FAQ answers were opened, leading to a poor user experience. The solution involves centralizing the modal's sizing and positioning logic using inline styles in the App.js component, setting a fixed height and preventing the modal from growing. Concurrently, the internal content area of the modal is now configured to handle its own scrolling, ensuring that the modal's overall dimensions remain stable regardless of its content.

Highlights

  • Modal Sizing Control: Implemented inline styles on the Modal component in App.js to enforce a fixed height of 80vh and prevent dynamic resizing, ensuring the modal maintains a consistent size.
  • Internal Content Scrolling: Modified the CSS in index.style.js to enable vertical scrolling specifically within the .content div of the modal, ensuring that only the content scrolls, not the modal itself.
  • CSS Refactoring: Removed redundant CSS properties from the .Modal class in index.style.js as these styles are now managed directly via inline styles in the App.js component, streamlining the styling approach.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@YadavAkhileshh

YadavAkhileshh commented Dec 25, 2025

Copy link
Copy Markdown
Author

@saurabhraghuvanshii @kishore08-07 Please check my PR and review it

@netlify

netlify Bot commented Dec 25, 2025

Copy link
Copy Markdown

Deploy Preview for meshery-play ready!

Name Link
🔨 Latest commit dfd97e5
🔍 Latest deploy log https://app.netlify.com/projects/meshery-play/deploys/6a71fc9032c1ab00085fcf68
😎 Deploy Preview https://deploy-preview-276--meshery-play.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request effectively resolves the issue of the modal container expanding when FAQ answers are opened. The approach of setting a fixed height on the modal and enabling scrolling on the inner content is correct.

My review focuses on improving the maintainability of the styling changes. I've suggested moving the inline styles from the App.js component into the index.style.js stylesheet. This follows best practices by separating concerns and centralizing style definitions, which will make future updates easier. The proposed changes preserve the functional fix while enhancing the code structure.

Comment thread site/src/App.js Outdated
Comment thread site/src/index.style.js

@kishore08-07 kishore08-07 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@YadavAkhileshh Please incorporate Gemini’s suggestions and clean up any unused CSS in your changes.

@YadavAkhileshh
YadavAkhileshh force-pushed the fix/modal-container-expansion branch from a16002e to 65695c8 Compare January 15, 2026 09:58
Fixes meshery#265

Signed-off-by: YadavAkhileshh <yadavakhil2501@gmail.com>
@YadavAkhileshh
YadavAkhileshh force-pushed the fix/modal-container-expansion branch from 65695c8 to a0d5ee1 Compare January 15, 2026 10:00
@YadavAkhileshh

Copy link
Copy Markdown
Author

@kishore08-07 please review it

@kishore08-07 kishore08-07 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks @YadavAkhileshh , LGTM.

@YadavAkhileshh

Copy link
Copy Markdown
Author

@Rajesh-Nagarajan-11 This is ready for merge. Please proceed

@github-actions

github-actions Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployment: https://meshery.github.io/play/pr-preview/pr-276/

Signed-off-by: Rishi Raj <180109771+rishiraj38@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45a37205-1856-4dfc-a1ca-68338dd1fdd5

📥 Commits

Reviewing files that changed from the base of the PR and between c59e99b and dfd97e5.

📒 Files selected for processing (1)
  • site/src/index.style.js

📝 Walkthrough

Walkthrough

The .Modal styles now center the modal with fixed viewport dimensions. Overflow is hidden on the modal and scrolling is moved to .content. Responsive width is set to 90% below 59rem.

Changes

Modal layout

Layer / File(s) Summary
Modal sizing and scrolling
site/src/index.style.js
The modal uses top and left centering, 80vh height, and 85% width. The nested .content region handles scrolling. Responsive width is 90% below 59rem.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes preventing modal expansion when FAQ answers open.
Linked Issues check ✅ Passed The CSS changes fix the modal size and add internal scrolling, which meets issue #265.
Out of Scope Changes check ✅ Passed All changes are limited to modal sizing and scrolling behavior required by issue #265.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Fix Conatiner size

5 participants