Skip to content

[FIX] Revert ProductContentLayout to original simple component - #1820

Merged
Deepak-Kesavan merged 2 commits into
mainfrom
fix/revert-product-content-layout
Mar 3, 2026
Merged

[FIX] Revert ProductContentLayout to original simple component#1820
Deepak-Kesavan merged 2 commits into
mainfrom
fix/revert-product-content-layout

Conversation

@vishnuszipstack

@vishnuszipstack vishnuszipstack commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

What

  • Revert ProductContentLayout.jsx from the redesign commit (62dd072) back to its original simple component (title, description, image props with fallback defaults)
  • The redesigned landing page content (compliance badges, stats, testimonials, provider logos) is now handled by the cloud repo's ProductContentComponents.jsx with proper static imports

Why

  • The redesign used import(/* @vite-ignore */ path) for loading image assets, which bypassed Vite's build-time processing
  • At runtime, the browser tried to load images (SVG, PNG, JPEG, WEBP) as JavaScript ES modules, causing "blocked because of a disallowed MIME type" errors for all landing page assets on staging

How

  • Reverted ProductContentLayout.jsx to its pre-redesign state (simple component with title/description/image props)
  • The cloud repo's 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 time

Can 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)

  • No. The cloud repo's LoginForm.jsx already imports LlmWhispererContent and UnstractContent from its own ProductContentComponents.jsx. It only imports ProductContentLayout from OSS as a default fallback, which this PR restores to its original working form.

Database Migrations

  • None

Env Config

  • None

Relevant Docs

  • None

Related Issues or PRs

Dependencies Versions

  • None

Notes on Testing

  • Navigate to /landing — verify the default login page renders without console errors
  • Verify no MIME type errors in browser console
  • Verify the redesigned landing page (product toggle, compliance badges, stats, testimonials) renders correctly with the cloud build

Screenshots

image

Checklist

I have read and understood the Contribution Guidelines.

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>
@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

Release Notes

  • Refactor
    • Streamlined the login product content layout with a more minimal design
    • Consolidated multi-section content into a single, compact layout
    • Added support for customizable title, description, and image with sensible defaults

Walkthrough

The ProductContentLayout component was simplified: large asset-loading blocks and multiple content variants were removed. The component now accepts title, description, and image props with default fallbacks and PropTypes validation, and only ProductContentLayout is exported.

Changes

Cohort / File(s) Summary
Component Simplification
frontend/src/components/log-in/ProductContentLayout.jsx
Removed extensive multi-block asset loading and static asset constants; replaced with a minimal default content model and a compact right-section rendering. Signature changed to function ProductContentLayout({ title, description, image }). Added PropTypes for title, description, image. Consolidated previously multiple exported content components into a single export ProductContentLayout. Net change: +31 / -427 lines.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: reverting ProductContentLayout to its original simple component form.
Description check ✅ Passed The PR description comprehensively covers all required template sections including What, Why, How, impact assessment, testing notes, and related references.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/revert-product-content-layout

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 and usage tips.

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1cad9b7 and 4f0e8eb.

📒 Files selected for processing (1)
  • frontend/src/components/log-in/ProductContentLayout.jsx

Comment thread frontend/src/components/log-in/ProductContentLayout.jsx Outdated
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>
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Frontend Lint Report (Biome)

All checks passed! No linting or formatting issues found.

@sonarqubecloud

sonarqubecloud Bot commented Mar 3, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4f0e8eb and 70741f0.

📒 Files selected for processing (1)
  • frontend/src/components/log-in/ProductContentLayout.jsx

Comment thread frontend/src/components/log-in/ProductContentLayout.jsx
@Deepak-Kesavan
Deepak-Kesavan merged commit c067582 into main Mar 3, 2026
7 checks passed
@Deepak-Kesavan
Deepak-Kesavan deleted the fix/revert-product-content-layout branch March 3, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants