Skip to content

MEP Next v1#6201

Open
AdobeLinhart wants to merge 75 commits into
stagefrom
mep-next-v1
Open

MEP Next v1#6201
AdobeLinhart wants to merge 75 commits into
stagefrom
mep-next-v1

Conversation

@AdobeLinhart

@AdobeLinhart AdobeLinhart commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

This is a complete rewrite of the MEP button.

The primary objective is to clean up the code base, decouple functions and maintain readability for future edits while implementing new features. All overlay code should live in the mep-overlay folder with shared functions eventually being moved into mep-next.js as needed.

GENERAL

  • Each card should expand/collapse.
  • Expansion should retain states per session.
  • All options should update based on corresponding URL params upon load in.

AUTHENTICATION
Logged in

  • Should display the Actions tab content.

Logged out

  • Should display a Login to AEM Sidekick card for the actions tab content

MEP TAB

  • Toggles the drawer.

DRAWER
Mep Logo

  • Should link to MMM.

Close Icon

  • Toggles the drawer.

Tabs

  • Should switch between Actions and Summary.

ACTIONS
MEP Manifest List

  • Should list manifests running on page.
  • Should list details about the manifest when expanded.
  • Should have a select with the experiments which updates the Preview button on change.

Highlight Toggles

  • Should have toggles for MEP, CaaS, M@S and Other Fragments.
  • Each toggle lists the amount of "updates" on the page with the element count tracked by a mutation observer.
  • Toggles should highlight the corresponding amount of changes on the page and update the Preview button on change.

Toggles

  • Preview Linke MepButton=off should update the Preview button and turn mep off on preview.
  • If avaiable, show toggle for 7 day MMM manifest data.
  • 7 day MMM manifest data should append available manifests to the list when toggled on following the normal manifest requirements.

Spoof Geo

  • Should always display Top Markets.
  • Should disable MEP Lingo and Lingo M@S if unavaiable.
  • Should have a select with available Geo options per radio button.
  • Should update Geo spoof in real time upon change.
  • Upon reload, should default to the first available select that matches the akamaiLocale parameter, otherwise Top Markets "none".

Load Manifest

  • Accepts a manifest URL provided by MEP sidekick.
  • Should update the preview button.

Preview button

  • Should load in with default active manifests for the href.
  • Should update with a param for any changed input options.
  • Should preview options selected upon click.

SUMMARY
Should have Page, Consent, Lingo, M@S and CaaS cards with the following data.

Page

  • Manifests Found
  • Foundation
  • Theme
  • Target Integration
  • Personalization

Consent

  • Level 2 | Performance
  • Level 4 | Advertising

Lingo

  • Mep Lingo Updates
  • Lang First | Lingo
  • Geo Folder
  • Country Cookie
  • User Country
  • Geo + User

Resolves: MWPW-195019

Test URLs:
(Any Milo page, compare old MEP button to new MEP button.)

  • Before: TBD
  • After: TBD

Psi: https://mep-next-v1--milo--adobecom.aem.page/?martech=off

AdobeLinhart and others added 30 commits June 12, 2026 17:07
Pure rename to preserve git history under the new mep-next/ structure. Import path updates follow in the next commit.
Clears the path so the upcoming `git mv preview.js → mep-next.js` will be detected as a rename rather than a modification.
Pure rename to preserve full git history under mep-next/. The empty mep-next.js placeholder was removed in the prior commit so git detects this as a clean rename (100% similarity), not a modification. Import path updates follow in the next commit.
Updates 5 external callers + the moved files' own relative paths after moving preview.js/.css/.test to libs/features/mep/mep-next/mep-next.{js,css,test.js}.
Splits the 466-line M@S section (MAS_OSI_SELECTOR, market detection, card action stacks, badge injection, content observer) module. mep-next.js shrinks from 1805 → 1340 lines.
Extracts the 54-line CaaS section (CAAS_BADGE_CLASS, derivePathsForCards, injectCaasBadges, removeCaasBadges, caasObserver, watchForCaasBlocks, unwatchForCaasBlocks) into its own module. mep-next.js shrinks from 1340 → 1286 lines.

Preview-host rewrite helpers (PREVIEW_HOST_RE, BLOG_PATH_RE, PREVIEW_REPO_HOST_RE, rewriteForPreviewHost, rewriteBlogPreviewHost) stay in mep-next.js — they were physically adjacent to CaaS code but are shared utilities used by the popup logic elsewhere in the file.

Imports:
- mep-next.js: drops mepCaasConfigUrls (only used in CaaS); adds import block from ./mep-caas.js for the 4 identifiers still referenced (injectCaasBadges, removeCaasBadges, watchForCaasBlocks, unwatchForCaasBlocks)
- mep-caas.js: imports createTag from utils and mepCaasConfigUrls from caas/utils

Single commit so `git log -C --find-copies-harder mep-caas.js` traces provenance back through mep-next.js → preview.js.

Tests: no test file changes needed (no test references CaaS internals). mep-next (118), mep-mas-subcollection (34), and mmm tests all pass.
…observers

- Remove mock-auth URL param and console.log of auth state from
  checkAuthAndBuild
- Narrow auth gate envs from ['prod', 'stage'] to ['prod']
- Add drawer-open gate to setMasObserver callback (skip refresh work when
  drawer closed)
- Bind MutationObservers to variables in setMasObserver and the module-scope
  highlight observer so future teardown is possible

Addresses review comments 3439360609 (TEMP), 3463811758 (drawer gate + vaf binding),
  3439387563 / 3463849068 (observer hygiene).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants