Repository navigation
Description
Description
The one place where the new flow overlaps something customers use today is the experiments entry point inside the Universal Visual Editor. This issue (a) completes the Variants card of #37003 with the Edit Content round-trip into UVE, and (b) switches the UVE entry point to the new portlet flow behind a feature flag, off by default — the old per-page screens keep working unchanged in every build until the flag is flipped, and it can be flipped back.
This is the only issue before the migration that modifies existing behavior.
1. Variant Edit Content round-trip
Edit Contenton a variant navigates to UVE for{pageId, variantName}using the existing deep-link shape:/edit-page/content?url=…&variantName=…&experimentId=…(current construction:dot-uve-toolbar.component.ts:262-277).- Build the URL from the experiment's page data in the store — do not copy the current
getUrl()that parseswindow.location.href(dot-experiments-configuration-variants.component.ts:187-234). - Returning from UVE lands back in the portlet, on
/experiments/:id/configurationfor the experiment the editor came from — resolved by experiment identity, not by page, since a page can host more than one experiment. - Control variant and locked experiments open UVE read-only (
Preview), per the design. - No "edited" indicator. No edited/revision signal exists on the variant model on either side of the wire (
AbstractExperimentVariant,Variant), and the legacy per-page Variants card shows no edit indication at all. Do not invent one — not persisted, not derived, not session-held. The deliverable is the correct round-trip, not a badge. - One consequence: the new Variants card renders the fixed string
No content changes yetfor every non-control variant (experiments.configure.variants.meta.variant). That is true today only because the Edit Content button beside it is disabled. This issue is what makes it capable of being false, so the string must be reworded to something state-neutral or dropped.
2. UVE entry-point switch behind the flag
The flag. Add a new, dedicated flag — FEATURE_FLAG_EXPERIMENTS_PORTLET — shipped explicitly false in dotmarketing-config.properties, with a matching FeaturedFlags entry and an allow-list entry in ConfigurationResource so the frontend can read it.
- Do not reuse
FEATURE_FLAG_EXPERIMENTS. It is already read byConfigExperimentUtil.isExperimentEnabled()and gates experiment JS injection (ExperimentWebAPIImpl:338) and experiment resolution during page render (HTMLPageAssetRenderedAPIImpl:176,239). Setting it tofalse— this issue's intended default — would take running experiments off the air. It keeps its current name, meaning, default and consumers; this work does not touch it. - The explicit
falseis required, not optional:DotPropertiesService.getFeatureFlags()andwithFlags()both map an absent flag (NOT_FOUND) to enabled. A flag that is merely declared ships on. - The unused frontend enum entry
FeaturedFlags.LOAD_FRONTEND_EXPERIMENTS = 'FEATURE_FLAG_EXPERIMENTS'(libs/dotcms-models/src/lib/shared-models.ts:28) gains no consumer under this decision and can be deleted in the migration — the property must survive.
Behavior.
- Flag on: the UVE experiments nav item routes to the portlet's site-wide list, filtered to the page in hand — not an unfiltered list, and not straight to a single experiment. Must behave for zero (empty state scoped to the page, with a way to create one), one, and many experiments; the filter is visible and clearable.
- Flag off (default): byte-identical behavior to today — nav item, per-page list, deep-links.
- Mechanism:
withFlags([...])/DotPropertiesService.getFeatureFlags(); precedent:FEATURE_FLAG_EDIT_CONTENT_SIDE_PANELindot-content-driveandedit-ema.
Must not break (flag off)
The UVE nav item (dot-ema-shell.component.ts:143-149), the toolbar deep-links (dot-ema-running-experiment.component.html:2-7, dot-uve-toolbar.component.ts:262-277), and the nav-href spec dot-ema-shell.component.spec.ts:117-120.
Acceptance Criteria
- With the flag off, the UVE experiments experience is unchanged (specs + E2E regression).
- With the flag off — including on a build where an operator never set it — experiments still serve to site visitors;
FEATURE_FLAG_EXPERIMENTSis untouched by this work. - The new flag resolves to off when unset, and is reversible in both directions without a redeploy.
- With the flag on, the UVE entry point lands on the site-wide list filtered to the page, correct for zero, one and many experiments.
-
Edit Contenton a non-control variant opens UVE for that variant; Save/back returns to/experiments/:id/configurationfor the originating experiment, including on a page with more than one experiment. - Control variant / locked experiment opens UVE in preview mode, and returns to the same place as the editable case.
- No
window.location.hrefparsing — the deep-link is built from store data. - The Variants card makes no claim about whether a variant's content has been modified.
Priority
Medium.
Additional Context
- Depends on: Experiments Portlet — Screen 1: portlet base + site-wide List #36989, Experiments Portlet — Screen 2: Create/Update (/experiments/new + /:id/configuration) #37003, Experiments Portlet — Screen 3: View Results #37004.
- Spec:
specs/37005-experiments-uve-integration/spec.md(D1/D2/D3 record the three corrections and why). - Migration (Experiments Portlet — migration: delete the old per-page experiments UI and remove the flag #37008): it retires
FEATURE_FLAG_EXPERIMENTS_PORTLET, notFEATURE_FLAG_EXPERIMENTS— the latter gates visitor-facing experiment delivery and must survive. The unusedLOAD_FRONTEND_EXPERIMENTSenum entry can be dropped there. - Out of scope: removing the flag or the old screens (migration issue); any change to UVE's own editor behavior; any variant edit-history or last-modified indicator.
- E2E (round-trip flag on; old-flow regression flag off) lives in the dedicated E2E issue.
- Manual check: flag off → walk the current per-page flow end-to-end; flag on → create in the portlet, edit a variant in UVE, return, start.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
docs(experiments): the spec says what the code does
[-]Experiments Portlet — UVE integration behind FEATURE_FLAG_EXPERIMENTS + variant Edit Content round-trip[/-][+]Experiments Portlet — UVE integration behind FEATURE_FLAG_EXPERIMENTS_PORTLET + variant Edit Content round-trip[/+]github-actions commentedon Aug 27, 2026
PRs linked to this issue
49 remaining items
docs(experiments): record D15's agreement with #37005 on the flag's l…
feat(experiments): return from a variant to where the editor left, wi…
jcastro-dotcms commentedon Sep 16, 2026
🧪 Post-Merge Test Plan
Source PR: #37256
Related issues: #37005
Ownership and status
Test summary
View full test plan
Summary
Covers merged PR #37256 for issue #37005: the
FEATURE_FLAG_EXPERIMENTS_PORTLETswitch (default off) that routes UVE's Experiments entry point to the new portlet, plus the Variants card's Edit Content round-trip into UVE. Cases below exercise the four spec user stories and edge cases end-to-end in a real browser; logic already asserted by the ~90 unit/component specs the PR added (deep-link building, breadcrumb resolution, filter store logic) was not re-tested manually. The "switch is unreadable" edge case (spec line 268) is not represented here — it requires artificially breaking the config-read path, which is impractical to trigger manually and is exercised byConfigurationResourceTest/ConfigExperimentUtilTestadded in this PR. None of the cases below have been executed.Test Cases
jcastro-dotcms commentedon Sep 17, 2026
QA: PASSED ✅
trunk_8f0c9faI ran all 13 Test Cases and did some manual smoke testing. The new Experiments portlet seems to be working as expected.
spec(experiments): editing a page while an experiment is active (#37308)
spec(experiments): the variant path is experiment-independent (#37308)
plan(experiments): design artifacts, and O1 resolved as the legacy li…