[FIX] Revert ProductContentLayout to original simple component - #1820
Conversation
The redesigned landing page content (compliance badges, stats, testimonials, provider logos) is handled by the cloud repo's ProductContentComponents.jsx with proper static imports. The OSS version used dynamic import() with @vite-ignore which caused runtime MIME type errors because the browser tried to load image files as ES modules. Reverts ProductContentLayout.jsx from commit 62dd072 back to its original form (title, description, image props with fallback defaults). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary by CodeRabbitRelease Notes
WalkthroughThe ProductContentLayout component was simplified: large asset-loading blocks and multiple content variants were removed. The component now accepts Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/src/components/log-in/ProductContentLayout.jsx`:
- Around line 16-21: Replace the boolean-OR fallbacks with nullish coalescing
for the title and description renderings: when rendering {title ||
defaultUnstractContent.title} and {description ||
defaultUnstractContent.description} use {title ?? defaultUnstractContent.title}
and {description ?? defaultUnstractContent.description} so only null/undefined
trigger the default; update the JSX expressions referencing title, description
and defaultUnstractContent accordingly.
- Around line 35-39: The propTypes for ProductContentLayout currently declare
image as PropTypes.any; change this to PropTypes.string because the image prop
is passed to an <img src> and should be validated as a URL/string. Update the
ProductContentLayout.propTypes definition to use image: PropTypes.string (and
keep title/description as-is) so runtime validation matches actual usage in the
render.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
frontend/src/components/log-in/ProductContentLayout.jsx
Use nullish coalescing (??) instead of logical OR (||) for title and description fallbacks, and tighten image prop type from PropTypes.any to PropTypes.string. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Frontend Lint Report (Biome)✅ All checks passed! No linting or formatting issues found. |
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
frontend/src/components/log-in/ProductContentLayout.jsx (1)
25-29: Consider treating the background image as decorative.If this image is non-informational, use an empty alt to reduce screen-reader noise.
♿ Optional accessibility tweak
<img src={image || loginRightBanner} - alt="login background" + alt="" className="login-background" />🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@frontend/src/components/log-in/ProductContentLayout.jsx` around lines 25 - 29, The login background image in ProductContentLayout.jsx is likely decorative; change its alt text to an empty string (alt="") on the <img> rendering (src={image || loginRightBanner}) so screen readers ignore it, and optionally add aria-hidden="true" to the same image element if you want to ensure assistive tech treats it as non-informative.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/src/components/log-in/ProductContentLayout.jsx`:
- Around line 35-39: The project uses PropTypes in
ProductContentLayout.propTypes but frontend/package.json does not declare
"prop-types" as a dependency; add "prop-types" to the dependencies section of
frontend/package.json (e.g., run npm/yarn/pnpm add prop-types or manually add
the package and version) so the import in ProductContentLayout.jsx resolves
reliably under strict package managers.
---
Nitpick comments:
In `@frontend/src/components/log-in/ProductContentLayout.jsx`:
- Around line 25-29: The login background image in ProductContentLayout.jsx is
likely decorative; change its alt text to an empty string (alt="") on the <img>
rendering (src={image || loginRightBanner}) so screen readers ignore it, and
optionally add aria-hidden="true" to the same image element if you want to
ensure assistive tech treats it as non-informative.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
frontend/src/components/log-in/ProductContentLayout.jsx



What
ProductContentLayout.jsxfrom the redesign commit (62dd072) back to its original simple component (title, description, image props with fallback defaults)ProductContentComponents.jsxwith proper static importsWhy
import(/* @vite-ignore */ path)for loading image assets, which bypassed Vite's build-time processingHow
ProductContentLayout.jsxto its pre-redesign state (simple component with title/description/image props)ProductContentComponents.jsx(merged via cloud PR [FIX] Revert JSON, Line-Item #1298) now owns the redesigned content using proper static imports that Vite processes at build timeCan this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
LoginForm.jsxalready importsLlmWhispererContentandUnstractContentfrom its ownProductContentComponents.jsx. It only importsProductContentLayoutfrom OSS as a default fallback, which this PR restores to its original working form.Database Migrations
Env Config
Relevant Docs
Related Issues or PRs
Dependencies Versions
Notes on Testing
/landing— verify the default login page renders without console errorsScreenshots
Checklist
I have read and understood the Contribution Guidelines.