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

SDK: Create DotCMSPageBody React Component to render page content #31178

Open
9 tasks
Tracked by #30943
rjvelazco opened this issue Jan 21, 2025 · 0 comments
Open
9 tasks
Tracked by #30943

SDK: Create DotCMSPageBody React Component to render page content #31178

rjvelazco opened this issue Jan 21, 2025 · 0 comments

Comments

@rjvelazco
Copy link
Contributor

rjvelazco commented Jan 21, 2025

Caution

GitHub Issue Blocked by: #31134

Parent Issue

#30943

Background

The DotcmsLayout component was originally designed to render the page and listen for changes from the UVE. However, its responsibilities have grown too complex by combining layout rendering with editor-specific logic. To address this, we will deprecate the DotcmsLayout component and introduce a new, cleaner component called DotCMSPageBody.

DotCMSPageBody will focus solely on rendering the content, ensuring a separation of concerns. UVE-related logic will no longer be included in this component, and developers can rely on other mechanisms for editor communication.

Tasks

Preview Give feedback

Proposed Objective

Same as Parent Issue

Proposed Priority

Priority 3 - Average

Acceptance Criteria

Important

Make sure the withExperiments works with this new component.

  • Deprecate DotcmsLayout.
  • Build DotCMSPageBody.
  • Test Compatibility.
  • Update Examples and Documentation.
  • DotcmsLayout should still work.

Pseudo-code

Use Case

Important

The new implementation should emphasize simplicity and flexibility.

import { DotCMSPageBody } from '@dotcms/client';

export function MyPage({ pageAsset }) {
    return (
        <DotCMSPageBody 
            pageAsset={pageAsset} 
            components={componentsMap} 
        />
    );
}

Quality Assurance Notes

  • Test DotCMSPageBody with and without the components prop to ensure both scenarios are functional.
  • Verify rendering behavior in both Edit and Live modes to confirm consistent functionality.
  • Confirm no residual UVE-related logic is left in the new component.

Sub-Tasks & Estimates

  • Mark DotcmsLayout as deprecated in the SDK (2h).
  • Build DotCMSPageBody as a standalone component (8h).
  • Update SDK examples and documentation to reflect the changes (4h).
  • Perform regression testing to ensure no breaking changes (6h).
@rjvelazco rjvelazco changed the title SDK: make DotcmsLayout Component render SDK: Refactor DotcmsLayout Components to Remove UVE Communication Logic Jan 21, 2025
@rjvelazco rjvelazco changed the title SDK: Refactor DotcmsLayout Components to Remove UVE Communication Logic SDK: Create DotCMSPageBody Components to render page content Jan 23, 2025
@rjvelazco rjvelazco changed the title SDK: Create DotCMSPageBody Components to render page content SDK: Create DotCMSPageBody React Component to render page content Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: New
Development

No branches or pull requests

2 participants