Skip to content

Experiments Portlet — migration: delete the old per-page experiments UI and remove the flag #37008

Description

@oidacra

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

  • 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.

Rewire

  • UVE entry point permanently targets the new flow; remove 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 — its withFlags wiring, its FeaturedFlags entry, its ConfigurationResource allow-list entry, and its explicit false in dotmarketing-config.properties.
  • 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.

Clean up

  • Move the chart colors in libs/dotcms-models/src/lib/dot-experiments.model.ts:204-215 behind a lazy getter, removing the import-time getComputedStyle(document.body) and the spec stubs Experiments Portlet — Screen 1: portlet base + site-wide List #36989 added.
  • Remove i18n keys used only by the deleted screens.
  • Remove AllowedActionsByExperimentStatus keys that no longer have a consumer (verify — the matrix itself stays; the new portlet reads it).

Acceptance Criteria

  • Entry condition documented as met: parity checklist signed off on dev/QA; Experiments Portlet — E2E test suite (incl. flag-off regression of the old flow) #37006 green.
  • The old tree and dotExperimentsRoutes are gone; pnpm nx build dotcms-ui and all specs pass.
  • UVE experiments entry lands in the new flow with no flag involved; FEATURE_FLAG_EXPERIMENTS_PORTLET and its consumers are removed.
  • FEATURE_FLAG_EXPERIMENTS and its backend consumers are untouched; experiments still serve to site visitors after the migration.
  • No import of @ngrx/component-store remains under libs/portlets/dot-experiments/.
  • dot-experiments.model.ts no longer runs getComputedStyle at import time.
  • The whole E2E suite passes (the FEATURE_FLAG_EXPERIMENTS_PORTLET-off regression spec is retired with that flag).
  • Grep proof in the PR: no 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

Activity

  1. added theissue type on Aug 11, 2026
  2. moved this from New to Current Sprint Backlog in dotCMS - Product Planningon Aug 11, 2026
  3. erickgonzalez commented on Aug 21, 2026

    @erickgonzalez
    Member

    Needs to include: update Doc in dotcms site

  4. moved this from Current Sprint Backlog to Next Sprint in dotCMS - Product Planningon Sep 3, 2026
  5. moved this from Next Sprint to Future in dotCMS - Product Planningon Sep 3, 2026
  6. moved this from Future to Next Sprint in dotCMS - Product Planningon Sep 3, 2026
  7. moved this from Next Sprint to Next 2-4 Sprints in dotCMS - Product Planningon Sep 8, 2026
  8. moved this from Next 2-4 Sprints to Next Sprint in dotCMS - Product Planningon Sep 8, 2026
  9. moved this from Next Sprint to Future in dotCMS - Product Planningon Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions