fix: prevent homepage hero preview image overflow on mid-range screens - #8105
tejaswiverma121-byte wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe homepage hero preview now uses responsive image and video sizing. The right column clips overflow and centers its content. Mobile-specific video sizing overrides are removed. ChangesHomepage hero preview
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The hero media is constrained to its responsive column, and the investigated overflow concern is not reachable at the cited widths. No current-head issue is identified that should block merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
src/sections/Home/CloudNativeManagement/statement.style.jsParsing error: [BABEL] /src/sections/Home/CloudNativeManagement/statement.style.js: 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. Comment |
|
Preview deployment for PR #8105 removed. This PR preview was automatically pruned because we keep only the 3 most recently updated previews on GitHub Pages to stay within deployment size limits. If needed, push a new commit to this PR to generate a fresh preview. |
|
Give a screen recording of the fix, by doing adjustment in responsiveness and showing that the right section is now properly fixed and not showing overflow. |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Copilot review overview
Review effort: Lite
Findings: None
What changed in this PR
This PR fixes homepage hero media overflow on intermediate and mobile screen sizes by making the video and image media responsive within the right-hand column.
Changes:
- Constrains
ReactPlayerto the parent container using percentage-based sizing. - Adds centered, clipped layout behavior to the media column.
- Applies responsive sizing and 16:9 behavior to the hero video while removing the obsolete mobile offset and fixed height.
| File | Description |
|---|---|
src/sections/Home/CloudNativeManagement/index.js |
Updates ReactPlayer sizing and wrapper styles for responsive scaling. |
src/sections/Home/CloudNativeManagement/statement.style.js |
Adds media constraints, flex centering, overflow handling, and responsive video styling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@piyushtripathi9424 added the video reference and changed one more thing i have given a few padding between those images so that it look good |
LGTM 🚀 |
dhruveshmishra
left a comment
There was a problem hiding this comment.
One small improvement: I’d prefer explicit sizing on .imgHero/.vidHero (width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9) instead of relying on inherited widths and vertical offsets, since that’s more robust across browsers and reduces the chance of future overflow regressions
|
i have made the changes as per requested @dhruveshmishra |
- Constrain ReactPlayer container to width 100% and maxWidth 100% - Add overflow hidden and flex centering to right-col - Set imgHero and vidHero to maintain responsive 16:9 aspect ratio - Remove obsolete fixed-height and offset transform from mobile query Fixes layer5io#8091 Signed-off-by: tejaswiverma <tejaswiverma121@gmail.com>
6967bcb to
3ed70bb
Compare
Fixes #8091
Description
This PR fixes #8091
Changes:
src/sections/Home/CloudNativeManagement/index.js:ReactPlayerprops towidth="100%"withstyle={{ margin: "auto", maxWidth: "100%" }}so the player scales relative to its parent container rather than intrinsic asset width.src/sections/Home/CloudNativeManagement/statement.style.js:.right-colwithoverflow: hidden,display: flex,align-items: center, andjustify-content: center..imgHerowithdisplay: block,width: 100%,max-width: 100%, andheight: auto..vidHerowithwidth: 100% !important,max-width: 100% !important,height: auto !important, andaspect-ratio: 16 / 9..vidHero > div, .vidHero iframe, .vidHero videofill 100% of their container.height: 25rem !important) and offset transform (transform: translate(0, -52%)) in the mobile breakpoint (max-width: 767px) to preserve natural 16:9 responsive scaling without layout overlapping.Notes for Reviewers
Tested locally on Gatsby dev server across various breakpoints:
Screen.Recording.2026-09-22.at.12.21.08.PM.mov
Signed commits
Summary by CodeRabbit