dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
864 stars 466 forks source link

UVE: Future Time Machine #29574

Open dotCMS-Machine-User opened 2 months ago

dotCMS-Machine-User commented 2 months ago

The Future Time Machine lets you preview your dotCMS pages as they'll appear on any future date. Eliminate uncertainty by seeing scheduled content changes in context. Simply select a date, language, and user persona to visualize your page's future, ensuring perfect content timing and presentation.

Ask from customer Newell and partner DSS.

User stories

Enablement

Definition

Ideation

Research and competitive analysis

nollymar commented 2 months ago

Spike: #29816

Epic for BE implementation: https://github.com/dotCMS/core/issues/30554

KevinDavilaDotCMS commented 2 weeks ago

WIP - Future Time Machine

Findings

Constrains

Links

Figma design

Backend Spike

PRD Document

Approach

Currently we manage part of the UVE state guided by the queryParams, since we manually added the following queryParams to the pageApi service

        const pageApiUrl = createPageApiUrlWithQueryParams(url, {
            language_id: params.language_id,
            'com.dotmarketing.persona.id': params['com.dotmarketing.persona.id'],
            variantName: params.variantName,
            experimentId: params.experimentId,
            depth: params['depth'] || '0',
            mode,
            tm_date: isFTMEnaled ? params['tm_date'] : null
        });

In this way we can synchronize the UVE information with the FTM response.

If we have FTM active, the toolbar shown in UVE will have a different design than the current Toolbar. Both in design and functionality, since we will have a date selector to indicate the FTM date.

All of this will work under a FF, so this FF, along with the queryParam, will be the indicator of which toolbar to display and if FTM should be rendered

The suggested flow for this would be:

The queryParam value will also be added to the PageAPI query.

These changes involve modifying the current UveStore, as well as the handling of queryParams. It is not necessary to create a new Store or affect the current operation of Orientation/Preview/Social media.

By already having a Toolbar component with the current functionality, we can use it as a wrapper and render one layout or another according to the FF, maintaining the same functionality.

<p-toolbar>
    @if(isFTMEnabled) {
        // new design
    } @else {
        // current design
    }
</p-toolbar>

Tasklist