You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Experiments Portlet — migration: delete the old per-page experiments UI and remove the flag #37008
The epic's strategy is: build the new portlet complete, then migrate and delete the old one. This is the issue where the duplication ends. It is filed up front — together with the rest of the epic — so "delete old later" is a scheduled step, not a wish that never happens.
This is deliberately the only issue that rewrites/removes existing code at scale.
Entry condition: every "port" row of the functional-parity inventory verified working in the new portlet on the dev/QA instance, and the E2E suite (#37006) green. Nothing is deleted before its replacement is verified.
Delete
The old per-page UI in libs/portlets/dot-experiments/portlet/src/lib/: dot-experiments-shell/, dot-experiments-list/ (including the drawer create component), dot-experiments-configuration/, dot-experiments-reports/, dot-experiments-analytic-app-misconfiguration/, the old shared/ tree, and the old lib.routes.ts (dotExperimentsRoutes).
With them go: the three @ngrx/component-store stores, the 10 hardcoded router.navigate(['/edit-page/…']) calls, and the window.location.href-parsing getUrl() — no decoupling refactor needed; the code that holds them disappears.
Do not remove FEATURE_FLAG_EXPERIMENTS. Despite the name, it is not a frontend flag: it is the backend kill-switch for the whole Experiments feature, read by ConfigExperimentUtil.isExperimentEnabled() and gating experiment JS injection (ExperimentWebAPIImpl:338) and experiment resolution during page render (HTMLPageAssetRenderedAPIImpl:176,239). Removing it would stop experiments from serving to visitors. It keeps its name, meaning, default and consumers. The unused enum entry FeaturedFlags.LOAD_FRONTEND_EXPERIMENTS = 'FEATURE_FLAG_EXPERIMENTS' (shared-models.ts:28) never gained a consumer and can be deleted here — the property cannot.
Update libs/portlets/edit-ema/portlet/src/lib/lib.routes.ts:117 (the lazy import of dotExperimentsRoutes) and the nav spec dot-ema-shell.component.spec.ts:117-120 to the new routes.
Promote site-wide/ to the lib root; the components copied into site-wide/shared/ become the only copies.
Description
The epic's strategy is: build the new portlet complete, then migrate and delete the old one. This is the issue where the duplication ends. It is filed up front — together with the rest of the epic — so "delete old later" is a scheduled step, not a wish that never happens.
This is deliberately the only issue that rewrites/removes existing code at scale.
Entry condition: every "port" row of the functional-parity inventory verified working in the new portlet on the dev/QA instance, and the E2E suite (#37006) green. Nothing is deleted before its replacement is verified.
Delete
libs/portlets/dot-experiments/portlet/src/lib/:dot-experiments-shell/,dot-experiments-list/(including the drawer create component),dot-experiments-configuration/,dot-experiments-reports/,dot-experiments-analytic-app-misconfiguration/, the oldshared/tree, and the oldlib.routes.ts(dotExperimentsRoutes).@ngrx/component-storestores, the 10 hardcodedrouter.navigate(['/edit-page/…'])calls, and thewindow.location.href-parsinggetUrl()— no decoupling refactor needed; the code that holds them disappears.Rewire
FEATURE_FLAG_EXPERIMENTS_PORTLET— the entry-point flag introduced by Experiments Portlet — UVE integration behind FEATURE_FLAG_EXPERIMENTS_PORTLET + variant Edit Content round-trip #37005 — itswithFlagswiring, itsFeaturedFlagsentry, itsConfigurationResourceallow-list entry, and its explicitfalseindotmarketing-config.properties.FEATURE_FLAG_EXPERIMENTS. Despite the name, it is not a frontend flag: it is the backend kill-switch for the whole Experiments feature, read byConfigExperimentUtil.isExperimentEnabled()and gating experiment JS injection (ExperimentWebAPIImpl:338) and experiment resolution during page render (HTMLPageAssetRenderedAPIImpl:176,239). Removing it would stop experiments from serving to visitors. It keeps its name, meaning, default and consumers. The unused enum entryFeaturedFlags.LOAD_FRONTEND_EXPERIMENTS = 'FEATURE_FLAG_EXPERIMENTS'(shared-models.ts:28) never gained a consumer and can be deleted here — the property cannot.libs/portlets/edit-ema/portlet/src/lib/lib.routes.ts:117(the lazy import ofdotExperimentsRoutes) and the nav specdot-ema-shell.component.spec.ts:117-120to the new routes.site-wide/to the lib root; the components copied intosite-wide/shared/become the only copies.Clean up
libs/dotcms-models/src/lib/dot-experiments.model.ts:204-215behind a lazy getter, removing the import-timegetComputedStyle(document.body)and the spec stubs Experiments Portlet — Screen 1: portlet base + site-wide List #36989 added.AllowedActionsByExperimentStatuskeys that no longer have a consumer (verify — the matrix itself stays; the new portlet reads it).Acceptance Criteria
dotExperimentsRoutesare gone;pnpm nx build dotcms-uiand all specs pass.FEATURE_FLAG_EXPERIMENTS_PORTLETand its consumers are removed.FEATURE_FLAG_EXPERIMENTSand its backend consumers are untouched; experiments still serve to site visitors after the migration.@ngrx/component-storeremains underlibs/portlets/dot-experiments/.dot-experiments.model.tsno longer runsgetComputedStyleat import time.FEATURE_FLAG_EXPERIMENTS_PORTLET-off regression spec is retired with that flag).edit-page/…navigation remains under the experiments lib.Priority
Low until Screens 1-3 + UVE land; then it is the closing step of the epic.
Additional Context
pnpm nx lint|test portlets-dot-experiments-portlet·pnpm nx test portlets-edit-ema-portlet·pnpm nx test dotcms-ui --testPathPattern=app.routes·pnpm nx build dotcms-ui·npx playwright test --grep @experiments